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

# Create speech

`POST /v2/router/audio/speech`

## Request

- Base URL: `https://my.orq.ai`
- URL: `https://my.orq.ai/v2/router/audio/speech`
- Auth: HTTP bearer

Generates audio from the input text.

## Request body

- object
  - `input` string, required: The text to generate audio for. The maximum length is 4096 characters
  - `model` string, required: ID of the model to use
  - `voice` string, required: The voice to use. Available voices for OpenAI `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer` Available voices for ElevenLabs `aria`, `roger`, `sarah`, `laura`, `charlie`, `george`, `callum`, `river`, `liam`, `charlotte`, `alice`, `matilda`, `will`, `jessica`, `eric`, `chris`, `brian`, `daniel`, `lily`, `bill`
  - `response_format` 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm': The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. If a format is provided but not supported by the provider, the response will be in the default format. When the provided format is not supported by the provider, the response will be in the default format.
  - `speed` number: The speed of the generated audio.
  - `name` string: The name to display on the trace. If not specified, the default system name will be used.
  - `fallback_on_codes` integer[]: HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
  - `fallbacks` object[]: Array of fallback models to use if primary model fails
    - `model` string, required: Fallback model identifier
  - `retry` object: Retry configuration for the request
    - `count` number: Number of retry attempts (1-5)
    - `on_codes` number[]: HTTP status codes that trigger retry logic
  - `load_balancer` object: Load balancer configuration for the request.
    - `type` 'weight_based', required
    - `models` object[], required
      - `model` string, required: Model identifier for load balancing
      - `weight` number: Weight assigned to this model for load balancing
  - `timeout` object: Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
    - `call_timeout` number, required: Timeout value in milliseconds
  - `orq` object
    - `retry` object: Retry configuration for the request
      - `count` number: Number of retry attempts (1-5)
      - `on_codes` number[]: HTTP status codes that trigger retry logic
    - `fallbacks` object[]: Array of fallback models to use if primary model fails
      - `model` string, required: Fallback model identifier
    - `fallback_on_codes` integer[]: HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
    - `name` string: The name to display on the trace. If not specified, the default system name will be used.
    - `identity` PublicIdentity: Information about the identity making the request. If the identity does not exist, it will be created automatically.
      - `id` string, required: Unique identifier for the contact
      - `display_name` string: Display name of the contact
      - `email` string, email: Email address of the contact
      - `metadata` object[]: A hash of key/value pairs containing any other data about the contact
      - `logo_url` string: URL to the contact's avatar or logo
      - `tags` string[]: A list of tags associated with the contact
    - `contact` PublicContact: @deprecated Use identity instead. Information about the contact making the request.
      - `id` string, required: Unique identifier for the contact
      - `display_name` string: Display name of the contact
      - `email` string, email: Email address of the contact
      - `metadata` object[]: A hash of key/value pairs containing any other data about the contact
      - `logo_url` string: URL to the contact's avatar or logo
      - `tags` string[]: A list of tags associated with the contact
    - `thread` object: Thread information to group related requests
      - `id` string, required: Unique thread identifier to group related invocations.
      - `tags` string[]: Optional tags to differentiate or categorize threads
    - `load_balancer` object: Load balancer configuration for the request.
      - `type` 'weight_based', required
      - `models` object[], required
        - `model` string, required: Model identifier for load balancing
        - `weight` number: Weight assigned to this model for load balancing
    - `timeout` object: Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
      - `call_timeout` number, required: Timeout value in milliseconds

## Response `200`

The audio file content.

## Other responses

- `401`: Authentication required. See https://docs.orq.ai/reference/errors for the error codes.

## Changes

> 554 revisions in range; 71 not diffed.

- **2026-10-23** `0b4e519a544f`: 3 info
  - added the new optional request property `fallback_on_codes`
  - added the new optional request property `orq/fallback_on_codes`
  - added the non-success response with the status `401`
- **2026-10-23** `732aed62833a`: 2 warning, 1 info
  - removed the request property `fallback_on_codes`
  - removed the request property `orq/fallback_on_codes`
  - removed the non-success response with the status `401`
- **2026-10-22** `4f826b2c3a0e`: 3 info
  - added the new optional request property `fallback_on_codes`
  - added the new optional request property `orq/fallback_on_codes`
  - added the non-success response with the status `401`
- **2026-10-22** `8f0dc569f247`: 2 warning, 1 info
  - removed the request property `fallback_on_codes`
  - removed the request property `orq/fallback_on_codes`
  - removed the non-success response with the status `401`
- **2026-10-21** `08b800d640e6`: 3 info
  - added the new optional request property `fallback_on_codes`
  - added the new optional request property `orq/fallback_on_codes`
  - added the non-success response with the status `401`

[Operation history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/router/audio/speech/post.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) - [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orq-ai/apis/orq-ai-api/revisions/928a71e92252?raw)
