{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-generate-speech-request-schema.json",
  "title": "GenerateSpeechRequest",
  "description": "Request body for `POST /audio/generate`. `voiceId` must be one of the voices returned by\n`GET /testing/voices`.\n",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nopaque-co-uk-audio-api-openapi.yml#/components/schemas/GenerateSpeechRequest",
  "type": "object",
  "required": [
    "voiceId",
    "text"
  ],
  "properties": {
    "voiceId": {
      "type": "string",
      "maxLength": 200,
      "description": "An enabled voice id from `GET /testing/voices`."
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000,
      "description": "The words to speak. Every character is billable, markup included. Ultra voices\n(ids starting `Telnyx.Ultra.`) also accept two inline tags: a pause,\n`<break time=\"1s\" />` (0.1 s to 10 s, in `s` or `ms`), and an emotion,\n`<emotion value=\"sad\" />` (neutral, happy, sad, angry, fearful, disgusted, surprised,\nexcited, apologetic). Bracketed cues such as `[laughter]` are passed through.\nAny other markup is rejected.\n"
    },
    "settings": {
      "type": "object",
      "additionalProperties": false,
      "description": "Delivery settings. Ultra voices only.",
      "properties": {
        "speed": {
          "type": "number",
          "minimum": 0.6,
          "maximum": 1.5,
          "description": "Speaking rate; above 1 is faster."
        },
        "volume": {
          "type": "number",
          "minimum": 0.5,
          "maximum": 2
        },
        "emotion": {
          "type": "string",
          "enum": [
            "neutral",
            "happy",
            "sad",
            "angry",
            "fearful",
            "disgusted",
            "surprised"
          ]
        }
      }
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Display name for the clip. Defaults to the start of the text."
    }
  }
}