Unauthorized
unauthorized
VoiceLabs could not identify who is calling. Either no credential was presented, or the one that was presented is not usable.
Why it happens
A missing x-api-key header; a key that was revoked, disabled, or has expired; a secret truncated by a copy-paste; or a browser session cookie. The public API never accepts cookies — it is credential-authenticated only, which is what lets it serve a permissive CORS policy safely.
How to fix it
Send a live key in x-api-key, or as Authorization: Bearer <key> if your HTTP client only speaks bearer auth. Key secrets are shown once at creation and stored only as a hash, so a lost key is replaced, not recovered: mint a new one in the developer console and swap it into your environment.
Safe to retry?
No. A 401 never becomes a 200 on its own — the credential has to change.
What it looks like on the wire
{
"type": "https://voicelabs.now/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "A human-readable explanation of this particular occurrence.",
"instance": "/v1/speech",
"code": "unauthorized"
}
Branch on code, never on status or on the prose in detail: two different problems can share a status, and detail is written for humans and may be reworded. Problems a settings page can resolve also carry settings_url, and a scope failure carries required_scope.
Every VoiceLabs API error is an RFC 9457 problem document with a stable code.