Speko Docs

Authentication

Bearer keys, required headers, and the response headers on every relay call.

Bearer authentication

Every relay request — HTTP and WebSocket alike — authenticates with a Speko API key:

Authorization: Bearer sk_speko_...

The scheme must be exactly Bearer and the token must be a single non-blank string. Failures return 401 with code authentication_failed:

{"error":{"code":"authentication_failed","message":"a Bearer authorization header is required","retryable":false}}

See API keys for creating and protecting keys.

Required request headers

HeaderRequired onNotes
Authorizationeverything except /healthz, /readyzBearer sk_speko_...
Idempotency-Keyevery POST and every WebSocket upgradeopaque, at most 256 bytes — see Idempotency
Content-TypePOST bodiesapplication/json, or multipart/form-data for transcriptions

GET /v1/models needs only the Authorization header.

Response headers

Every routed response carries correlation and route headers:

HeaderMeaning
Speko-Request-IDStable ID for the request (rreq_...). Quote it in support requests.
Speko-Attempt-IDThe provider attempt that produced this response. Changes on failover.
Speko-ProviderProvider that served the request
Speko-ModelModel that served the request
Speko-RegionThe Speko region that served you — a proximity fact about Speko infrastructure, not a provider data-residency guarantee
Speko-Usage-CharactersTTS one-shot only: characters metered for the synthesis

Error responses also carry Speko-Request-ID whenever one was assigned, and the same ID appears as request_id inside the error envelope.

GET /v1/models responses use an edge-local correlation ID of the form req_edge_... rather than rreq_... — listing the catalog does not create an admitted request.

On this page