Authentication
Send your API key in the Authorization header. That's the only credential any endpoint needs.
Every request to the Wistfare Voice API, REST or WebSocket, is authenticated with your API key as a bearer token:
Authorization: Bearer wv_sk_…The same header works on the live transcription WebSocket handshake. There's no separate login, session or token exchange.
Making requests
from wistfareai import WistfareAI
client = WistfareAI(api_key="wv_sk_...") # or set WISTFARE_API_KEY and call WistfareAI()A missing, invalid or revoked key returns 401:
{
"error": {
"code": "unauthorized",
"message": "Invalid API key.",
"request_id": "9b2f4c1e6a8d4e0fb3c7a5d2e1f09a64"
}
}On the live transcription WebSocket, a bad key is refused during the handshake with HTTP 403, so the socket never opens. The SDKs raise AuthenticationError in both cases.
API keys
Create keys in the console at voice.wistfare.com under API Keys. Each key:
- belongs to a project: usage and spend are attributed to that project and its budget;
- starts with
wv_sk_and is shown once, at creation (we store only a hash); - can be renamed or revoked instantly from the console.
If you lose a key, revoke it and create a new one.
Permissions
| Permission | Can call |
|---|---|
all | Every endpoint, including transcription, live streaming, jobs and speech generation. |
read | Read-only endpoints: GET /v1/voices, GET /v1/voices/{id}/preview, GET /v1/usage, and retrieving transcriptions, jobs and batches. |
A read-only key calling a write endpoint gets 403 read_only_key. Use read-only keys for dashboards and monitoring. If spending is suspended on the account (for example during a payment dispute), endpoints that spend credits return 403 account_suspended for every key.
Keep your key safe
- Call the API from your server. Never ship a
wv_sk_key in a browser, mobile or desktop app: anything on a user's device can be extracted. - Load it from the environment or a secrets manager. Never commit it to version control.
- Use one key per environment (development, staging, production) so a leaked development key never touches production, and revoking one doesn't take down the others.
- Revoke immediately if a key may have been exposed. Revocation applies to the next request.
export WISTFARE_API_KEY="wv_sk_..."Client-side streaming
To stream a microphone straight from a browser or mobile app without exposing the key, your server can mint a single-use stream token for the client. This is optional and only applies to live transcription; see Streaming from a browser or app.