Authentication
The Waridi API uses secret API keys. Send your key as a bearer token on every request.
curl https://api.waridi.io/v1/tts \
-H "Authorization: Bearer $WARIDI_API_KEY" \
...
Key types
| Prefix | Environment | Billing | Use it for |
|---|---|---|---|
wrd_test_ |
Sandbox | Free, counts toward the 10 minute monthly sandbox allowance | Development and CI |
wrd_live_ |
Production | Billed to your plan | Real traffic |
Sandbox and production share the same base URL. The key decides which environment you hit. Voices you clone in one environment are not visible in the other.
Using keys with the SDKs
Both SDKs look for WARIDI_API_KEY first. You can also pass a key directly.
from waridi import Waridi
client = Waridi(api_key="wrd_live_...")
import { Waridi } from "@waridi/sdk";
const client = new Waridi({ apiKey: process.env.WARIDI_API_KEY });
curl https://api.waridi.io/v1/stt \
-H "Authorization: Bearer wrd_live_..." \
-F model=sikia-1 -F file=@call.wav
Keep keys on the server
Never ship a secret key in a mobile app, a browser bundle or a public repository. Anyone with the key can spend your quota.
For browsers and mobile apps, your server creates a short-lived session and passes only its client_secret to the device. Client secrets expire after 10 minutes and are scoped to one agent or one stream. See Telephony → WebRTC.
WebSocket authentication
For wss://api.waridi.io/v1/stream, send the key in the Authorization header during the handshake. If your WebSocket client cannot set headers, pass a client secret as the token query parameter instead. Never put a secret key in a URL.
Rotating and revoking keys
- Create a new key in Studio, deploy it, then revoke the old one. Both work during the overlap.
- Revoked keys stop working within one minute.
- If a key leaks, revoke it straight away and write to hello@waridi.io so we can check usage with you.
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key |
No Authorization header was sent |
| 401 | invalid_api_key |
The key is malformed, revoked or does not exist |
| 403 | permission_denied |
The key is valid but your plan does not include this feature |
Full list in Errors.