TTS

Get a text-to-speech model

Changed on

Returns a text-to-speech model with each endpoint's own inputs and speech output parameters.

get/audio/speech/models/{author}/{slug}

Request

  • Base URL
    https://openrouter.ai/api/v1
  • Auth
    none required

Path parameters

author, string required

Model author/organization

Example:openai
slug, string required

Model slug

Example:gpt-4o-mini-tts

Response

A text-to-speech model and its endpoints

SpeechModelResponse required

A text-to-speech model. Its members are the envelope of its endpoints': enums are unioned and ranges widened, so a value inside a range may be accepted by no single endpoint. Each record in endpoints lists exactly what that endpoint accepts.

created, integer required

Unix timestamp (seconds) of when the model was created

description, string required
endpoints, SpeechModelEndpoint[] required

Each endpoint serving the model, with exactly the inputs and parameters it accepts. Some endpoints route only after the caller accepts a provider requirement such as a self-attestation; until then, a request to them is rejected with a 403 that names the requirement.

id, string required

Model slug

input_modalities, SpeechInputModality[] required
name, string required
output_modalities, SpeechOutputModality[] required

Example response

{
  "created": 1742428800,
  "description": "Text-to-speech model with steerable delivery.",
  "endpoints": [
    {
      "input_modalities": [
        {
          "type": "text"
        }
      ],
      "output_modalities": [
        {
          "supported_parameters": {
            "instructions": {
              "type": "unknown"
            },
            "response_format": {
              "type": "enum",
              "values": [
                "mp3",
                "pcm"
              ]
            },
            "speed": {
              "max": 4,
              "min": 0.25,
              "type": "range"
            },
            "voice": {
              "type": "enum",
              "values": [
                "alloy",
                "coral"
              ]
            }
          },
          "type": "speech"
        }
      ],
      "provider_name": "OpenAI",
      "provider_slug": "openai"
    }
  ],
  "id": "openai/gpt-4o-mini-tts",
  "input_modalities": [
    {
      "type": "text"
    }
  ],
  "name": "OpenAI: GPT-4o mini TTS",
  "output_modalities": [
    {
      "supported_parameters": {
        "instructions": {
          "type": "unknown"
        },
        "response_format": {
          "type": "enum",
          "values": [
            "mp3",
            "pcm"
          ]
        },
        "speed": {
          "max": 4,
          "min": 0.25,
          "type": "range"
        },
        "voice": {
          "type": "enum",
          "values": [
            "alloy",
            "coral"
          ]
        }
      },
      "type": "speech"
    }
  ]
}

Changes

    • info

      added the optional property endpoints/items/output_modalities/items/languages to the response with the status

    • info

      added the optional property output_modalities/items/languages to the response with the status

    • info

      endpoint added