Example Usage
import { SpeechRequest } from "@openrouter/sdk/models";
let value: SpeechRequest = {
input: "Hello world",
model: "mistralai/voxtral-mini-tts-2603",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
input | string | :heavy_check_mark: | Text to synthesize | Hello world |
inputReferences | models.SpeechInputReference[] | :heavy_minus_sign: | Reference content for stateless voice cloning: one input_audio part carrying the voice sample, optionally accompanied by one text part with its transcript. Only routed to endpoints that support voice cloning. | [ { “input_audio”: { “data”: “data:audio/wav;base64,UklGRuQXDABXQVZF…” }, “type”: “input_audio” }, { “text”: “I used to rule the world.”, “type”: “text” } ] |
model | string | :heavy_check_mark: | TTS model identifier | mistralai/voxtral-mini-tts-2603 |
provider | models.SpeechRequestProvider | :heavy_minus_sign: | Provider-specific passthrough configuration | |
responseFormat | models.SpeechRequestResponseFormat | :heavy_minus_sign: | Audio output format | pcm |
speed | number | :heavy_minus_sign: | Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. | 1 |
voice | string | :heavy_minus_sign: | Voice identifier (provider-specific). | en_paul_neutral |