GET

/v1/schemas/openrouter/audio/audio/speech

kind inputactivity audiohash 4c34e854…extracted Nov 13, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
0d19a8453874651361f64fbd51045d9d1d4868b39f7eb85b9866fee302c50de2
{
  "fetchedAt": 1794547804,
  "extractorVersion": "2",
  "verifiedAt": null
}

Request body

11 properties · 2 required · 11 $defs
propertytypedescriptionconstraints
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*stringTTS model identifier
input_referencesSpeechInputReference[]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…
instructionsstringDelivery 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.
providerobjectProvider configuration: provider routing preferences (`order`, `only`, `ignore`, `allow_fallbacks`), data policy routing preferences (`zdr`, `data_collection`) and provider-specific passthrough options
response_formatenumAudio output formatmp3 | pcm · default: "pcm"
session_idstringA 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
speednumberPlayback 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
traceTraceConfigMetadata 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.
userstringA unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.length ≤ 256
voicestringVoice identifier (provider-specific).length ≥ 1

Types

11 $defs

ProviderNameenum

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…

01aiobject
ai21object
aion-labsobject
akashmlobject
alibabaobject
amazon-bedrockobject
amazon-bedrock/claude-on-awsobject
amazon-novaobject
ambientobject
antdigitalobject
anthropicobject
anthropic/2object
anyscaleobject
arcee-aiobject
assemblyaiobject
atlas-cloudobject
atomaobject
avianobject
azureobject
baiduobject
basetenobject
black-forest-labsobject
byteplusobject
centmlobject
cerebrasobject
chutesobject
cirrascaleobject
clarifaiobject
claude-on-awsobject
cloudflareobject
cohereobject
coreweaveobject
cosineobject
crofaiobject
crucibleobject
crusoeobject
darkbloomobject
databricksobject
decartobject
deepgramobject
deepinfraobject
deepseekobject
dekallmobject
digitaloceanobject
elevenlabsobject
enferobject
fake-providerobject
featherlessobject
fireworksobject
fish-audioobject
friendliobject
gmicloudobject
google-ai-studioobject
google-vertexobject
gopomeloobject
groqobject
heygenobject
huggingfaceobject
hyperbolicobject
hyperbolic-quantizedobject
inceptionobject
inceptronobject
inferact-vllmobject
inference-netobject
infermaticobject
inflectionobject
inocloudobject
io-netobject
ionstreamobject
klusteraiobject
kreaobject
ktobject
lambdaobject
leptonobject
liquidobject
lynnobject
lynn-privateobject
makoraobject
mancerobject
mancer-oldobject
maraobject
metaobject
minimaxobject
mistralobject
modalobject
modelrunobject
modularobject
moonshotaiobject
morphobject
ncompassobject
near-aiobject
nebiusobject
nex-agiobject
nextbitobject
nineteenobject
novitaobject
nvidiaobject
octoaiobject
ollamaobject
open-inferenceobject
openaiobject
parallelobject
parasailobject
pareto-alphaobject
particle-aiobject
pearl-researchobject
perceptronobject
perplexityobject
phalaobject
poolsideobject
primalabsobject
primeintellectobject
quiverobject
recraftobject
recursalobject
recursiveobject
reflectionobject
rekaobject
relaceobject
replicateobject
respanobject
riverobject
runwayobject
sail-researchobject
sakanaobject
sakana-aiobject
sambanovaobject
sambanova-cloakedobject
scaledownobject
seedobject
sf-computeobject
siliconflowobject
sourcefulobject
speechifyobject
stealthobject
stepfunobject
streamlakeobject
switchpointobject
targonobject
tencentobject
tenstorrentobject
thinkingmachinesobject
togetherobject
together-liteobject
typesafeobject
ubicloudobject
unbiasedobject
upstageobject
veniceobject
voyageaiobject
waferobject
wandbobject
wandb-legacyobject
xaiobject
xiaomiobject
z-aiobject

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*SpeechInputReferenceAudioInputReference audio input object
type*enuminput_audio

SpeechInputReferenceAudioInputobject

Reference audio input object

datastringBase64-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
formatstringAudio format of the reference audio (e.g., wav, mp3). Optional; most providers detect the format from the audio bytes.
urlstringPublic 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*SpeechInputReferenceImageInputReference image input object
type*enumimage_url

SpeechInputReferenceImageInputobject

Reference image input object

url*stringJPEG, 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*stringTranscript 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*enumtext

SpeechTurnobject

instructionsstringDelivery instructions for this turn, such as tone, pacing, or emotion. Overrides the top-level `instructions`.
text*stringText to synthesize
voicestringVoice 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_namestring
parent_span_idstring
span_namestring
trace_idstring
trace_namestring

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"openrouter","endpointId":"audio/speech","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}