/v1/schemas/openrouter/audio/audio/speech
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace0d19a8453874651361f64fbd51045d9d1d4868b39f7eb85b9866fee302c50de2{
"fetchedAt": 1794547804,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
11 properties · 2 required · 11 $defs| property | type | description | constraints |
|---|---|---|---|
| input* | string | SpeechTurn[] | Text to synthesize, or a list of turns for multi-speaker input. Each turn has its own text, voice, and instructions. Multi-speaker input is supported by Gemini TTS models, by Fish Audio models other than S1, and by Speechify dialogue models. | |
| model* | string | TTS model identifier | |
| input_references | SpeechInputReference[] | Reference content for stateless voice cloning or voice design. Audio mode: one to three `input_audio` parts, each optionally paired with a `text` part carrying its transcript (a single clip accepts its transcript before or after it; with multiple clips each tr… | |
| instructions | string | Delivery instructions for the whole request, such as tone, pacing, or emotion. Supported by OpenAI gpt-4o-mini-tts, Gemini TTS, and Fish Audio models. Ignored by other providers. | |
| provider | object | Provider configuration: provider routing preferences (`order`, `only`, `ignore`, `allow_fallbacks`), data policy routing preferences (`zdr`, `data_collection`) and provider-specific passthrough options | |
| response_format | enum | Audio output format | mp3 | pcm · default: "pcm" |
| session_id | string | A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body… | length ≤ 256 |
| speed | number | Playback speed multiplier. Honored by models that support it (e.g. OpenAI TTS). Other providers either ignore it or return a 400 for a non-default value when the model has no speed control. | format: double |
| trace | TraceConfig | Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. | |
| user | string | A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. | length ≤ 256 |
| voice | string | Voice identifier (provider-specific). | length ≥ 1 |
Types
11 $defsProviderNameenum
Modal | AkashML | AI21 | AionLabs | Alibaba | Ambient · +118 more
ProviderOptionsobject
Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silentl…
| 01ai | object | ||
| ai21 | object | ||
| aion-labs | object | ||
| akashml | object | ||
| alibaba | object | ||
| amazon-bedrock | object | ||
| amazon-bedrock/claude-on-aws | object | ||
| amazon-nova | object | ||
| ambient | object | ||
| antdigital | object | ||
| anthropic | object | ||
| anthropic/2 | object | ||
| anyscale | object | ||
| arcee-ai | object | ||
| assemblyai | object | ||
| atlas-cloud | object | ||
| atoma | object | ||
| avian | object | ||
| azure | object | ||
| baidu | object | ||
| baseten | object | ||
| black-forest-labs | object | ||
| byteplus | object | ||
| centml | object | ||
| cerebras | object | ||
| chutes | object | ||
| cirrascale | object | ||
| clarifai | object | ||
| claude-on-aws | object | ||
| cloudflare | object | ||
| cohere | object | ||
| coreweave | object | ||
| cosine | object | ||
| crofai | object | ||
| crucible | object | ||
| crusoe | object | ||
| darkbloom | object | ||
| databricks | object | ||
| decart | object | ||
| deepgram | object | ||
| deepinfra | object | ||
| deepseek | object | ||
| dekallm | object | ||
| digitalocean | object | ||
| elevenlabs | object | ||
| enfer | object | ||
| fake-provider | object | ||
| featherless | object | ||
| fireworks | object | ||
| fish-audio | object | ||
| friendli | object | ||
| gmicloud | object | ||
| google-ai-studio | object | ||
| google-vertex | object | ||
| gopomelo | object | ||
| groq | object | ||
| heygen | object | ||
| huggingface | object | ||
| hyperbolic | object | ||
| hyperbolic-quantized | object | ||
| inception | object | ||
| inceptron | object | ||
| inferact-vllm | object | ||
| inference-net | object | ||
| infermatic | object | ||
| inflection | object | ||
| inocloud | object | ||
| io-net | object | ||
| ionstream | object | ||
| klusterai | object | ||
| krea | object | ||
| kt | object | ||
| lambda | object | ||
| lepton | object | ||
| liquid | object | ||
| lynn | object | ||
| lynn-private | object | ||
| makora | object | ||
| mancer | object | ||
| mancer-old | object | ||
| mara | object | ||
| meta | object | ||
| minimax | object | ||
| mistral | object | ||
| modal | object | ||
| modelrun | object | ||
| modular | object | ||
| moonshotai | object | ||
| morph | object | ||
| ncompass | object | ||
| near-ai | object | ||
| nebius | object | ||
| nex-agi | object | ||
| nextbit | object | ||
| nineteen | object | ||
| novita | object | ||
| nvidia | object | ||
| octoai | object | ||
| ollama | object | ||
| open-inference | object | ||
| openai | object | ||
| parallel | object | ||
| parasail | object | ||
| pareto-alpha | object | ||
| particle-ai | object | ||
| pearl-research | object | ||
| perceptron | object | ||
| perplexity | object | ||
| phala | object | ||
| poolside | object | ||
| primalabs | object | ||
| primeintellect | object | ||
| quiver | object | ||
| recraft | object | ||
| recursal | object | ||
| recursive | object | ||
| reflection | object | ||
| reka | object | ||
| relace | object | ||
| replicate | object | ||
| respan | object | ||
| river | object | ||
| runway | object | ||
| sail-research | object | ||
| sakana | object | ||
| sakana-ai | object | ||
| sambanova | object | ||
| sambanova-cloaked | object | ||
| scaledown | object | ||
| seed | object | ||
| sf-compute | object | ||
| siliconflow | object | ||
| sourceful | object | ||
| speechify | object | ||
| stealth | object | ||
| stepfun | object | ||
| streamlake | object | ||
| switchpoint | object | ||
| targon | object | ||
| tencent | object | ||
| tenstorrent | object | ||
| thinkingmachines | object | ||
| together | object | ||
| together-lite | object | ||
| typesafe | object | ||
| ubicloud | object | ||
| unbiased | object | ||
| upstage | object | ||
| venice | object | ||
| voyageai | object | ||
| wafer | object | ||
| wandb | object | ||
| wandb-legacy | object | ||
| xai | object | ||
| xiaomi | object | ||
| z-ai | object |
SpeechInputstring | SpeechTurn[]
Text to synthesize, or a list of turns for multi-speaker input. Each turn has its own text, voice, and instructions. Multi-speaker input is supported by Gemini TTS models, by Fish Audio models other than S1, and by Speechify dialogue models.
SpeechInputReferenceobject | object | object
Reference content part for stateless voice cloning or voice design
SpeechInputReferenceAudioobject
Reference audio input for stateless voice cloning. Up to three parts per request; the Nth audio part is addressable from `input` as `@AudioN` on providers that support multiple references.
| input_audio* | SpeechInputReferenceAudioInput | Reference audio input object | |
| type* | enum | input_audio |
SpeechInputReferenceAudioInputobject
Reference audio input object
| data | string | Base64-encoded reference audio (optionally a data URI). Supported audio formats are provider-specific. Limited to 20 MiB of base64 (15 MiB of decoded audio). Exactly one of `data` or `url` is required. | length ≥ 1 · length ≤ 20971520 |
| format | string | Audio format of the reference audio (e.g., wav, mp3). Optional; most providers detect the format from the audio bytes. | |
| url | string | Public http(s) URL of the reference audio. OpenRouter downloads it (15 MiB max) and forwards the bytes, never the URL. Exactly one of `data` or `url` is required. | length ≤ 2048 · format: uri |
SpeechInputReferenceImageobject
Reference image. On its own it describes the desired voice (voice design); alongside an `input_audio` part it is a scene image describing the setting the cloned voice speaks in. At most one per request. Only routed to endpoints that support image references.
| image_url* | SpeechInputReferenceImageInput | Reference image input object | |
| type* | enum | image_url |
SpeechInputReferenceImageInputobject
Reference image input object
| url* | string | JPEG, PNG, or WebP reference image as a base64 data URI or a public http(s) URL. Remote images are downloaded (15 MiB max) and forwarded as bytes, never as the URL. | length ≥ 1 · length ≤ 20971520 |
SpeechInputReferenceTextobject
Transcript of an `input_audio` part
| text* | string | Transcript of an `input_audio` part. With a single clip it may appear before or after the clip; with multiple clips it must immediately follow the clip it transcribes. | length ≤ 10000 |
| type* | enum | text |
SpeechTurnobject
| instructions | string | Delivery instructions for this turn, such as tone, pacing, or emotion. Overrides the top-level `instructions`. | |
| text* | string | Text to synthesize | |
| voice | string | Voice for this turn. Defaults to the top-level `voice`. | length ≥ 1 |
TraceConfigobject
Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
| generation_name | string | ||
| parent_span_id | string | ||
| span_name | string | ||
| trace_id | string | ||
| trace_name | string |
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"openrouter","endpointId":"audio/speech","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}