{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatra-ai/json-schema/beatra-ai-speech-validate-request-schema.json",
  "title": "SpeechValidateRequest",
  "description": "Read-only speech check. No callback, signing key, metadata, or idempotency.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatra-ai-audio-api-openapi.yml#/components/schemas/SpeechValidateRequest",
  "properties": {
    "voice": {
      "type": "string",
      "title": "Voice",
      "description": "Opaque beatra voice_id (preset or cloned)"
    },
    "input": {
      "type": "string",
      "maxLength": 50000,
      "minLength": 1,
      "title": "Input",
      "description": "Text to synthesize. It may contain speech markup such as {pause 0.5}, {laugh}, {pron 行 hang2} or {sub W3C 万维网联盟}; read the vocabulary and limits from the model card (beatra.models.list)."
    },
    "model": {
      "type": "string",
      "enum": [
        "auto",
        "minimax-speech-2.8-hd",
        "minimax-speech-2.8-turbo",
        "doubao-seed-tts-2.0"
      ],
      "title": "Model",
      "description": "Model to check against (default auto)",
      "default": "auto"
    },
    "language": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 32,
          "minLength": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Language",
      "description": "BCP-47 language hint"
    },
    "format": {
      "type": "string",
      "enum": [
        "mp3",
        "wav",
        "flac",
        "opus",
        "pcm"
      ],
      "title": "Format",
      "description": "Audio format the create call would use",
      "default": "mp3"
    },
    "sample_rate": {
      "anyOf": [
        {
          "type": "integer",
          "enum": [
            8000,
            16000,
            22050,
            24000,
            32000,
            44100
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Sample Rate",
      "description": "Sample rate in Hz for the chosen format"
    },
    "speed": {
      "type": "number",
      "maximum": 2.0,
      "minimum": 0.5,
      "title": "Speed",
      "description": "Speaking rate (0.5 to 2.0)",
      "default": 1.0
    },
    "volume": {
      "type": "number",
      "maximum": 10.0,
      "exclusiveMinimum": 0.0,
      "title": "Volume",
      "description": "Volume (0 to 10)",
      "default": 1.0
    },
    "pitch": {
      "type": "number",
      "maximum": 1.0,
      "minimum": -1.0,
      "title": "Pitch",
      "description": "Normalized pitch (-1.0 to 1.0)",
      "default": 0.0
    },
    "emotion": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "happy",
            "sad",
            "angry",
            "fearful",
            "disgusted",
            "surprised",
            "calm",
            "fluent"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Emotion",
      "description": "Emotion preset for the whole request"
    },
    "subtitle_enable": {
      "type": "boolean",
      "title": "Subtitle Enable",
      "description": "Whether the create call would request subtitles",
      "default": false
    },
    "direction": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Direction",
      "description": "Optional natural-language performance direction for the whole request, for example '像在耳边说悄悄话一样，轻声地说' or 'read it like breaking news'. Models and voices that follow it list direction under controls on their model card (with direction_max_characters); anywhere else it is ignored with an option_ignored warning. Effects vary with the voice and the text and are not a guarantee of intensity."
    },
    "previous_text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Previous Text",
      "description": "Optional text that comes right before this clip, for example the previous line of a dialogue or the previous paragraph, so separate calls keep a continuous tone. It is never spoken and never billed; any length is accepted and only its end is used (previous_text_tail_characters on the model card). Models and voices that do not use it ignore it with an option_ignored warning."
    },
    "model_options": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model Options",
      "description": "Expert provider options, same as the create call"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "voice",
    "input"
  ]
}