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

# Create speech

`POST /v2/router/audio/speech`

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.
  - `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
    - `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 — Array of models with weights for load balancing requests
      - `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.

---

[API](https://skmtc.net/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.net/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/3c22f56a94b4/schema)
