GET
/v1/schemas/llmgateway/audio/v1%2Faudio%2Fspeech
Accept:
Request body
9 properties · 2 required · 0 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | ID of the speech generation (text-to-speech) model to use. | |
| input* | string | The text to synthesize into speech. | length ≥ 1 |
| safety_identifier | string | Opaque end-user identifier stored in log params.safety_identifier. Never forwarded upstream and never replaces LLM Gateway's provider-facing identifier. | length ≤ 128 |
| user | string | Legacy end-user identifier, recorded as params.safety_identifier when safety_identifier is absent and it is at most 128 characters. Never forwarded upstream. | |
| stream_format | enum | Return binary audio (default) or `sse` speech events: `speech.audio.delta` events with base64 audio, then a `speech.audio.done` event whose `usage` carries the request's `cost`. | audio | sse |
| voice | string | The prebuilt voice to use. Defaults to the model's default voice when omitted. | |
| response_format | enum | The audio format of the returned audio. OpenAI models support mp3 (default), opus, aac, flac, wav and pcm. Gemini models emit PCM, so only wav (default) and pcm are supported. | wav | pcm | mp3 | opus | aac | flac |
| speed | number | Playback speed hint. Forwarded to OpenAI models; not applied by Gemini speech models. | 0.25 ≤ n ≤ 4 |
| instructions | string | Optional style/delivery instructions prepended to the input as a natural-language directive (e.g. 'Say cheerfully'). |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"llmgateway","endpointId":"v1/audio/speech","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}