v2

latestOpenAPI 3.1.02026-08-0514431.6 KB

Open an incremental TTS WebSocket

Upgrade to WebSocket, then send {"type":"config","language":"en","voice":"..."} as the first text frame, optionally carrying an opening "text". Push more with {"type":"text","text":"..."} and finish with {"type":"end"}. The router answers one {"type":"ready"} frame naming the chosen provider, then binary 24 kHz mono PCM chunks, then {"type":"end"}. Offer the speko.realtime.v1 subprotocol. {"type":"end"} is required -- a vendor will not finish an utterance without it -- and is idempotent, so sending it twice is safe. Incremental text needs a provider that accepts it; the others take all text in the config frame and reject later pushes.

get/v1/synthesize/stream

Headers

X-Speko-Objective'latency' | 'quality' | 'cost' | 'balanced'

Routing objective. Defaults to the route policy.

X-Speko-Languagestring

BCP 47 language tag used for benchmark selection and provider transcription.

X-Speko-Allowstring

Comma-separated providers or provider:model ids to allow.

X-Speko-Denystring

Comma-separated providers or provider:model ids to exclude.

X-Speko-Max-Pricenumber

Maximum published benchmark price for the request stage: STT in USD per minute, LLM in USD per 1M tokens, or TTS in USD per 1M characters. Candidates without a published price are excluded when this constraint is set.

Response

Error