---
title: "Create speech"
method: POST
path: "/audio/speech"
tags: ["TTS"]
---

# Create speech

`POST /audio/speech`

Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).

## Request body

- SpeechRequest — Text-to-speech request input
  - `input` string, required — Text to synthesize
  - `input_references` SpeechInputReference[] — 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.
    - union — Reference content part for stateless voice cloning
      - SpeechInputReferenceAudio — Reference audio input for stateless voice cloning
        - `input_audio` SpeechInputReferenceAudioInput, required — Reference audio input object
          - `data` string, required — 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).
          - `format` string — Audio format of the reference audio (e.g., wav, mp3). Optional; most providers detect the format from the audio bytes.
        - `type` 'input_audio', required
      - SpeechInputReferenceText — Transcript of the accompanying reference audio
        - `text` string, required — Transcript of the accompanying reference audio.
        - `type` 'text', required
  - `model` string, required — TTS model identifier
  - `provider` object — Provider-specific passthrough configuration
    - `options` ProviderOptions — Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped.
      - `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
      - `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
      - `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
      - `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
      - `parasail` object
      - `perceptron` object
      - `perplexity` object
      - `phala` object
      - `poolside` object
      - `primeintellect` object
      - `quiver` object
      - `recraft` object
      - `recursal` object
      - `reflection` object
      - `reka` object
      - `relace` object
      - `replicate` object
      - `runway` object
      - `sail-research` object
      - `sakana` object
      - `sakana-ai` object
      - `sambanova` object
      - `sambanova-cloaked` object
      - `seed` object
      - `sf-compute` object
      - `siliconflow` object
      - `sourceful` 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
  - `response_format` 'mp3' | 'pcm' — Audio output format
  - `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 value takes precedence. Maximum of 256 characters.
  - `speed` number, double — Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.
  - `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.
    - `generation_name` string
    - `parent_span_id` string
    - `span_name` string
    - `trace_id` string
    - `trace_name` string
  - `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.
  - `voice` string — Voice identifier (provider-specific).

## Response `200`

Audio bytes stream

## Other responses

- `400` — Bad Request - Invalid request parameters or malformed input
- `401` — Unauthorized - Authentication required or invalid credentials
- `402` — Payment Required - Insufficient credits or quota to complete request
- `403` — Forbidden - Authentication successful but insufficient permissions
- `404` — Not Found - Resource does not exist
- `413` — Payload Too Large - Request payload exceeds size limits
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error - Unexpected server error
- `502` — Bad Gateway - Provider/upstream API failure
- `503` — Service Unavailable - Service temporarily unavailable
- `524` — Infrastructure Timeout - Provider request timed out at edge network
- `529` — Provider Overloaded - Provider is temporarily overloaded

## Changes

- **2026-09-17** `3066544509b5` — 1 info
  - added the new optional request property `provider/options/unbiased`
- **2026-09-17** `2de027b6dfcd` — 1 info
  - added the new optional request property `provider/options/typesafe`
- **2026-09-16** `98e12733cd62` — 1 info
  - added the new optional request property `session_id`
- **2026-09-15** `81e9c582ae1c` — 1 info
  - added the new optional request property `trace`
- **2026-09-15** `407c2ddfad8c` — 1 info
  - added the new optional request property `user`

[Full history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/audio/speech/post.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/1212b12392a8?raw)
