{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/venice-ai/json-schema/venice-ai-create-speech-request-schema-schema.json",
  "title": "CreateSpeechRequestSchema",
  "description": "Request to generate audio from text.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/venice-ai-audio-api-openapi.yml#/components/schemas/CreateSpeechRequestSchema",
  "type": "object",
  "properties": {
    "input": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "description": "The text to generate audio for. The maximum length is 4096 characters."
    },
    "language": {
      "type": "string",
      "minLength": 2,
      "maxLength": 32,
      "description": "Optional language hint. Accepted values are model-specific: Qwen 3 accepts full names (English, Chinese, ...); xAI/ElevenLabs accept ISO 639-1 codes (en, ja, ...); MiniMax accepts full names. Unsupported values are silently ignored. Omit to let the model auto-detect."
    },
    "model": {
      "type": "string",
      "enum": [
        "tts-kokoro",
        "tts-qwen3-0-6b",
        "tts-qwen3-1-7b",
        "tts-xai-v1",
        "tts-inworld-1-5-max",
        "tts-chatterbox-hd",
        "tts-orpheus",
        "tts-elevenlabs-turbo-v2-5",
        "tts-minimax-speech-02-hd",
        "tts-gemini-3-1-flash",
        "tts-gradium-v1"
      ],
      "default": "tts-kokoro",
      "description": "The model ID of a Venice TTS model."
    },
    "prompt": {
      "type": "string",
      "maxLength": 500,
      "description": "A style prompt to control the emotion and delivery of the speech. Supported by models advertising `supportsPromptParam` (currently Qwen 3 TTS). Ignored by other models. Examples: \"Very happy.\", \"Sad and slow.\", \"Excited and energetic.\""
    },
    "response_format": {
      "type": "string",
      "enum": [
        "mp3",
        "opus",
        "aac",
        "flac",
        "wav",
        "pcm"
      ],
      "description": "Requested audio output format. Supported formats and the default when omitted are model-specific; see `model_spec.supported_formats` and `model_spec.default_format` from GET /models?type=tts. An explicit unsupported format returns HTTP 400."
    },
    "speed": {
      "type": "number",
      "minimum": 0.25,
      "maximum": 4,
      "default": 1,
      "description": "The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default."
    },
    "streaming": {
      "type": "boolean",
      "default": false,
      "description": "Should the content stream back sentence by sentence or be processed and returned as a complete audio file."
    },
    "temperature": {
      "type": "number",
      "minimum": 0,
      "maximum": 2,
      "description": "Sampling temperature for speech generation. Higher values produce more varied output. Supported by models advertising `supportsTemperatureParam` (Qwen 3, Orpheus, Chatterbox HD). Ignored by other models."
    },
    "top_p": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Nucleus sampling parameter. Supported by models advertising `supportsTopPParam` (currently Qwen 3 TTS). Ignored by other models."
    },
    "voice": {
      "type": "string",
      "maxLength": 512,
      "default": "af_sky",
      "description": "The voice to use when generating the audio. The maximum length is 512 characters. Voices are model-specific: Kokoro (e.g. af_sky, af_bella, am_adam), Qwen 3 (e.g. Vivian, Serena, Dylan), xAI (26 voices, e.g. eve, ara, rex, sal, leo, luna, orion, carina), Orpheus (tara, leah, jess, leo, dan, mia, zac, zoe), Inworld (Craig, Ashley, ...), Chatterbox (Aurora, Blade, ...), ElevenLabs Turbo (Rachel, Aria, ...), MiniMax (WiseWoman, DeepVoiceMan, ...), Gradium (Emma, Kent, Mia, Maximilian, Valentina, Sergio, Elise, Leo, Alice, Davi — spanning en/de/es/fr/pt). You can also pass a cloned-voice handle (`vv_<id>`) returned by POST /v1/audio/voices to synthesize in a previously cloned voice; the handle must be paired with the same model used to create it. Models that advertise `supports_custom_voice_id` (e.g. ElevenLabs) additionally accept a raw provider Voice ID here. Using an incompatible voice returns a 400 error. Call GET /models/{id} to list voices for a specific model."
    }
  },
  "required": [
    "input"
  ],
  "additionalProperties": false
}