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

# Create speech

`POST /v1/audio/speech`

Generates audio from the input text. Returns audio data or streams via SSE.

## Request body

- SpeechRequest
  - `model` string, required — Model in provider/model format
  - `input` string, required — Text to convert to speech
  - `fallbacks` string[]
  - `stream_format` 'sse' — Set to "sse" to enable streaming
  - `voice` union, required
    - string
    - object[]
      - `speaker` string, required
      - `voice` string, required
  - `instructions` string
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'
  - `speed` number
  - `language_code` string
  - `pronunciation_dictionary_locators` object[]
    - `pronunciation_dictionary_id` string, required
    - `version_id` string
  - `enable_logging` boolean
  - `optimize_streaming_latency` boolean
  - `with_timestamps` boolean

## Response `200`

Successful response

- SpeechResponse
  - `audio` string, byte — Audio data (binary)
  - `usage` object
    - `input_tokens` integer
    - `output_tokens` integer
    - `total_tokens` integer
  - `alignment` object
    - `char_start_times_ms` number[]
    - `char_end_times_ms` number[]
    - `characters` string[]
  - `normalized_alignment` object
    - `char_start_times_ms` number[]
    - `char_end_times_ms` number[]
    - `characters` string[]
  - `audio_base64` string
  - `extra_fields` BifrostResponseExtraFields — Additional fields included in responses
    - `request_type` string — Type of request that was made
    - `provider` 'openai' | 'azure' | 'anthropic' | 'bedrock' | 'cohere' | 'vertex' | 'vllm' | 'mistral' | 'ollama' | 'groq' | 'sgl' | 'parasail' | 'perplexity' | 'replicate' | 'cerebras' | 'deepseek' | 'gemini' | 'openrouter' | 'elevenlabs' | 'huggingface' | 'nebius' | 'xai' | 'runway' | 'fireworks' — AI model provider identifier
    - `model_requested` string — The model that was requested
    - `model_deployment` string — The actual model deployment used
    - `latency` integer — Request latency in milliseconds
    - `chunk_index` integer — Index of the chunk for streaming responses
    - `raw_request` object — Raw request if enabled
    - `raw_response` object — Raw response if enabled
    - `cache_debug` BifrostCacheDebug
      - `cache_hit` boolean
      - `cache_id` string
      - `hit_type` string
      - `requested_provider` string
      - `requested_model` string
      - `provider_used` string
      - `model_used` string
      - `input_tokens` integer
      - `threshold` number
      - `similarity` number

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
