> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SpeechRequest

Text-to-speech request input

## Fields

| Field | Type | Required | Description | Example |
| - | - | - | - | - |
| `Input` | [components.SpeechInput](../../models/components/speechinput.mdx) | ✔️ | 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. | Hello world |
| `InputReferences` | \[][components.SpeechInputReference](../../models/components/speechinputreference.mdx) | ➖ | 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 transcript immediately follows its clip), plus at most one `image_url` part as a scene image on providers that condition the cloned voice on its setting; only routed to endpoints that support voice cloning (and multiple references or image references when those parts are sent). Image mode: exactly one `image_url` part; only routed to endpoints that support image references. Video mode: exactly one `video_url` part with a public http(s) URL, optionally with one to three `input_audio` parts (and their `text` transcripts) grouped as in audio mode, and no `image_url` part; Seed Audio 1.5 ignores those transcripts, so the words the voices speak go in `input`; only routed to endpoints that support video references (and voice cloning when clips are sent, plus multiple references for two or three clips). An empty array is treated as no reference. | \[ \{ "input\_audio": \{ "data": "data:audio/wav;base64,UklGRuQXDABXQVZF..." }, "type": "input\_audio" }, \{ "text": "I used to rule the world.", "type": "text" } ] |
| `Instructions` | `*string` | ➖ | Delivery instructions for the whole request, such as tone, pacing, or emotion. For the selected endpoint in the [Speech Models API](https://openrouter.ai/docs/guides/overview/multimodal/tts.md#via-the-speech-models-api), look for `supported_parameters.instructions` in the `output_modalities` entry with `type: speech`. | Speak in a warm and friendly tone. |
| `Model` | `string` | ✔️ | TTS model identifier | mistralai/voxtral-mini-tts-2603 |
| `OutputDelivery` | [\*components.OutputDelivery](../../models/components/outputdelivery.mdx) | ➖ | `stream` (default) streams the audio bytes directly in the response body (or returns inline base64 JSON when `timestamp_granularities` is nonempty). `url` stores the generated audio in OpenRouter storage and returns a JSON response with a signed download `url`, `expires_at`, and `media_type` (plus `words` and/or `characters` when `timestamp_granularities` is nonempty). The URL is a bearer link: anyone holding it can download the audio until it expires, up to 24 hours after the audio was stored (use `expires_at`); the stored copy is deleted by the storage lifecycle within the following day. When a URL cannot be issued (zero-data-retention via account settings, guardrails, `provider.zdr`, or a ZDR endpoint; no workspace; or storage failure), untimed requests fall back to streaming raw audio bytes (except on a storage failure for responses larger than 10 MiB, which returns an error), and timed requests fall back to inline base64 JSON (`{audio, media_type, words?, characters?}`) with no `url`. | stream |
| `Provider` | [\*components.SpeechRequestProvider](../../models/components/speechrequestprovider.mdx) | ➖ | Provider configuration: provider routing preferences (`order`, `only`, `ignore`, `allow_fallbacks`), data policy routing preferences (`zdr`, `data_collection`) and provider-specific passthrough options | |
| `ResponseFormat` | [\*components.SpeechRequestResponseFormat](../../models/components/speechrequestresponseformat.mdx) | ➖ | Audio output format. Defaults to `pcm`, or to `mp3` when `timestamp_granularities` is nonempty. | pcm |
| `SessionID` | `*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 value takes precedence. Maximum of 256 characters. | session-1234 |
| `Speed` | `*float64` | ➖ | 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. | 1 |
| `TimestampGranularities` | \[][components.TimestampGranularity](../../models/components/timestampgranularity.mdx) | ➖ | Timings to return with the audio. When nonempty, the response is JSON instead of raw audio bytes: `{audio, media_type, words?, characters?}` with base64 audio, or `{url, expires_at, media_type, words?, characters?}` when `output_delivery` is `url`. If a signed URL cannot be issued (ZDR, no workspace, or storage failure), timed `url` requests fall back to the inline `{audio, media_type, ...}` envelope with no `url`. The audio defaults to `mp3` unless `response_format` is set. Each timing entry is `{text, start, end}` in seconds. Only routed to endpoints that support every requested granularity (`supported_parameters.timestamp_granularities` on the speech models list). A timed response is sent once the whole audio is generated, not streamed, and is capped at 10 MiB of decoded audio for both inline and `url` delivery (the provider timed response, including its alignment data, is capped too); longer outputs return an error, so use a shorter input or a smaller audio format. Generated SDKs still type the 200 response as binary audio for compatibility; call the HTTP endpoint directly and parse the JSON response when using `timestamp_granularities`. An empty array is treated as no timings. | \[ "word" ] |
| `Trace` | [\*components.TraceConfig](../../models/components/traceconfig.mdx) | ➖ | 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. | \{ "trace\_id": "trace-abc123", "trace\_name": "my-app-trace" } |
| `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. | user-1234 |
| `Voice` | `*string` | ➖ | Voice identifier (provider-specific). Required by most providers; only Seed Audio, HeyGen, Fish Audio, AssemblyAI, Speechify accept requests without it. | en\_paul\_neutral |
