Docs
Get an API key

Create Speech

POST /v1/audio/speech Models: Speech View .md

Generate speech from text. OpenAI's request shape plus OpenRouter's, so both SDKs work unchanged. The response body is the audio itself.

Voices: voice selects the mode as well as the voice. A built-in speaker (GET /v1/audio/voices?model= lists them) speaks the input, and instructions can direct its style. design creates a new voice from the description in instructions. clone (or leaving voice out) with input_references speaks in the voice of a reference clip: send it base64-encoded in input_audio.data, with its transcript in a text part for the closest match. Clip URLs are not accepted. A cloned voice cannot follow instructions.

Formats: response_format is mp3 (the default), opus, flac, wav or pcm (24 kHz 16-bit mono, labelled audio/pcm;rate=24000;channels=1). aac returns 400.

Streaming: stream_format audio (the default) returns the audio; pcm at speed 1 streams as it is generated. sse returns speech.audio.delta events with base64 audio and a final speech.audio.done event with usage; pcm at speed 1 streams, other formats arrive as one delta. A failure mid-stream ends an SSE stream with a speech.audio.error event.

Billing: Per second of audio generated, before speed, rounded up. The seconds and cost are in the X-Usage-Seconds and X-Usage-Cost headers, or in the speech.audio.done usage; a raw pcm stream reports neither.

OpenRouter's provider, user, session_id and trace are accepted and ignored, except that provider.options under our OpenRouter slug can carry instructions, language, speed, seed, temperature, top_p and top_k.

Text-to-Speech Request Payload

  • model string required

    The text-to-speech model, e.g. qwen3-tts-12hz-1.7b, chatterbox or auk.

  • input string required

    The text to speak, up to the model's max_prompt_length in characters.

  • voice string or object

    One of the model's voices (GET /v1/audio/voices), as a string or as OpenAI's {"id": ...}: for Qwen3-TTS a built-in speaker, design or clone; for Chatterbox default or clone; for AuK default, design or clone. Defaults to the model's default voice, or clone when input_references is sent.

    One of 2
    • string
    • object
      • id string required
  • instructions string

    Style for a built-in speaker, or the description of the voice for design. Not accepted with clone, nor by a model that does not follow instructions (Chatterbox).

  • input_references array of objects

    OpenRouter's reference parts for clone. One input_audio clip and, optionally, its transcript as a text part (Chatterbox clones from the audio alone and does not use it).

    3 fields
    • type string required
      input_audiotext
    • input_audio object
      2 fields
      • data string required

        The clip, base64-encoded or a base64 data URI. Up to 15 MB decoded. URLs are not accepted.

      • format string
        wavmp3flacoggm4awebm
    • text string

      What the clip says.

      at most 10000 characters
  • language string

    The language of the input, as auto (the default), an ISO 639-1 code, a BCP 47 tag or a name. For chatterbox it picks the checkpoint: auto or English is the English Original, any other of its 23 languages is Multilingual V3. Nothing is guessed from the text.

  • response_format string
    default mp3mp3opusflacwavpcm
  • stream_format string
    default audioaudiosse
  • speed number
    default 1range 0.25–4
  • seed integer
  • temperature number
    range 0–2
  • top_p number

    The engine takes values above 0, so 0 is sent as 0.000001, which keeps only the likeliest token.

    range 0–1
  • top_k integer
    at least -1
  • exaggeration number

    Emotion intensity, for a model whose catalog entry lists it (Chatterbox, default 0.5). Higher is more expressive and tends to speak faster.

    range 0.25–2
  • cfg_weight number

    Guidance toward the voice, for a model whose catalog entry lists it (Chatterbox, default 0.5). Lower slows the pacing; 0 keeps a voice's accent out of another language, and is the default for Chatterbox's built-in voice outside English.

    range 0–1
  • num_inference_steps integer

    Denoising steps, for a model whose catalog entry lists it (AuK, default 32). Fewer is faster and coarser.

    range 4–64
  • guidance_scale number

    How closely the speech follows its prompt and reference voice, for a model whose catalog entry lists it (AuK, default 2).

    range 1–5

The audio, or SSE events when stream_format is sse.

audio/mpeg, audio/ogg, audio/flac, audio/wav, audio/pcm, text/event-stream

curl https://api.vultrinference.com/v1/audio/speech \
  -H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-tts-12hz-1.7b",
    "input": "Welcome to Vultr Serverless Inference.",
    "voice": "aiden",
    "instructions": "Warm and upbeat, like a radio host."
  }'