{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/speakvora-com/json-schema/speakvora-com-speak-request-schema.json",
  "title": "SpeakRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/speakvora-com-openapi.yml#/components/schemas/SpeakRequest",
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 500,
      "description": "One or more sentences. Whitespace and quote normalization is applied."
    },
    "voice": {
      "type": "string",
      "default": "af_heart",
      "description": "A voice id from /v1/voices."
    },
    "lang": {
      "type": "string",
      "default": "en",
      "description": "Language code (en, es, zh, hi, ja, ko, fr, de, pt, ar, ...) or 'auto'. 'auto' is never guessed: if detection is unsure you get 422 cannot_detect_language."
    },
    "format": {
      "enum": [
        "m4a",
        "mp3"
      ],
      "default": "m4a"
    },
    "category": {
      "type": "string",
      "description": "Optional: urgent | navigation | conversation | other. 'urgent' lines are never composed from stored pieces."
    },
    "personality": {
      "type": "boolean",
      "default": false,
      "description": "Allow nonverbal reactions such as [chuckle] where the voice supports them. Never applied to urgent lines."
    },
    "visibility": {
      "enum": [
        "public",
        "private"
      ],
      "default": "public",
      "description": "private clips are stored for you only and never placed on the public CDN."
    },
    "stream": {
      "type": "boolean",
      "default": true,
      "description": "Default true: a line that is not stored yet returns stream:true with a one-use stream_url, token and request id; POST the text to stream_url with 'authorization: Bearer <token>' and play the raw 16-bit mono 24 kHz PCM as it arrives (about 50 to 100 ms to first audio on the Phonon voices). Send false to get a stored clip url instead. Requests with marks, or return=audio (the Polly, OpenAI and ElevenLabs compatible routes), always return a stored clip. A line that is already stored returns its url with stream:false either way."
    },
    "compose": {
      "type": "boolean",
      "default": true,
      "description": "English only: build new sentences from stored clauses at zero generation cost; composed clips are flagged for review."
    }
  }
}