{
  "openapi": "3.1.0",
  "info": {
    "title": "Gladia Enterprise API",
    "version": "2",
    "description": "Real-time speech-to-text: open a session, stream audio over a WebSocket, receive transcripts as they are spoken."
  },
  "servers": [
    {
      "url": "https://{cluster}.api.gladia.io",
      "variables": {
        "cluster": {
          "default": "eu1",
          "description": "Your region's endpoint, as shown in Gladia Workspace."
        }
      }
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Live",
      "description": "Real-time transcription sessions."
    }
  ],
  "paths": {
    "/v2/live": {
      "post": {
        "operationId": "initLiveSession",
        "summary": "Initiate a session",
        "description": "Creates a live session with its options and returns the WebSocket URL to stream its audio to.",
        "tags": [
          "Live"
        ],
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Where the audio is processed. Every endpoint processes it in its own region (eu1: Europe, us1: United States); a region the endpoint does not serve finds no model and the session is refused.",
            "schema": {
              "type": "string",
              "enum": [
                "eu",
                "us",
                "eu-west",
                "us-west"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiveInitRequest"
              },
              "example": {
                "encoding": "wav/pcm",
                "sample_rate": 16000,
                "bit_depth": 16,
                "channels": 1,
                "model": "solaria-3",
                "language_config": {
                  "languages": [
                    "en"
                  ]
                },
                "messages_config": {
                  "receive_partial_transcripts": true
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The session is created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid: `validation_errors` lists why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Your workspace has no credits left (`insufficient_credits`): new sessions are refused until credits are added; sessions already running are not stopped.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this (its scopes, or the addresses it may be used from).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Your account already has its maximum number of open sessions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "No model in this region runs the session as asked (its model, languages and features together), or none has room right now: `no inference endpoint available`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The service cannot answer right now: try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl -X POST https://eu1.api.gladia.io/v2/live \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\" \\\n  -H \"content-type: application/json\" \\\n  -d '{\n    \"encoding\": \"wav/pcm\",\n    \"sample_rate\": 16000,\n    \"bit_depth\": 16,\n    \"channels\": 1,\n    \"model\": \"solaria-3\",\n    \"language_config\": {\n      \"languages\": [\n        \"en\"\n      ]\n    },\n    \"messages_config\": {\n      \"receive_partial_transcripts\": true\n    }\n  }'"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\n\nimport requests\n\nAPI_URL = os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\")\nresponse = requests.post(\n    f\"{API_URL}/v2/live\",\n    headers={\"x-gladia-key\": os.environ[\"GLADIA_API_KEY\"]},\n    json={\n        \"encoding\": \"wav/pcm\",\n        \"sample_rate\": 16000,\n        \"bit_depth\": 16,\n        \"channels\": 1,\n        \"model\": \"solaria-3\",\n        \"language_config\": {\n            \"languages\": [\n                \"en\"\n            ]\n        },\n        \"messages_config\": {\n            \"receive_partial_transcripts\": True\n        }\n    },\n    timeout=10,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "js",
            "label": "JavaScript",
            "source": "const API_URL = process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\";\nconst response = await fetch(`${API_URL}/v2/live`, {\n  method: \"POST\",\n  headers: {\n    \"x-gladia-key\": process.env.GLADIA_API_KEY,\n    \"content-type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"encoding\": \"wav/pcm\",\n    \"sample_rate\": 16000,\n    \"bit_depth\": 16,\n    \"channels\": 1,\n    \"model\": \"solaria-3\",\n    \"language_config\": {\n      \"languages\": [\n        \"en\"\n      ]\n    },\n    \"messages_config\": {\n      \"receive_partial_transcripts\": true\n    }\n  }),\n});\nif (!response.ok) {\n  throw new Error(`${response.status} ${await response.text()}`);\n}\nconsole.log(await response.json());"
          }
        ]
      },
      "get": {
        "operationId": "listLiveSessions",
        "summary": "List sessions",
        "description": "Your account's sessions, newest first, one page at a time.",
        "tags": [
          "Live"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Sessions per page, at most 100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Sessions to skip, at most 1000; past that, follow `next`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000,
              "default": 0
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Where the next page starts: set in `next`, never by hand.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Only the sessions created that day (`2026-10-12`).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "after_date",
            "in": "query",
            "description": "Only the sessions created after that date (ISO 8601).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "before_date",
            "in": "query",
            "description": "Only the sessions created before that date (ISO 8601).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only the sessions with these statuses (repeat it for several).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "queued",
                  "processing",
                  "done",
                  "error"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "custom_metadata",
            "in": "query",
            "description": "Only the sessions whose `custom_metadata` has these values: a JSON object (`{\"user\": \"john\"}`), or `custom_metadata[user]=john`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of sessions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveSessionList"
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid: `validation_errors` lists why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this (its scopes, or the addresses it may be used from).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The service cannot answer right now: try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl https://eu1.api.gladia.io/v2/live \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\""
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\n\nfrom gladiaio_sdk import GladiaClient\n\nclient = GladiaClient(\n    api_key=os.environ[\"GLADIA_API_KEY\"],\n    api_url=os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\"),\n)\n\npage = client.live_v2().list({\"limit\": 20, \"status\": [\"done\"]})\nfor session in page.items:\n    print(session.id, session.created_at)"
          },
          {
            "lang": "js",
            "label": "JavaScript SDK",
            "source": "import { GladiaClient } from \"@gladiaio/sdk\";\n\nconst client = new GladiaClient({\n  apiKey: process.env.GLADIA_API_KEY,\n  apiUrl: process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\",\n});\n\nconst page = await client.liveV2().list({ limit: 20, status: [\"done\"] });\nfor (const session of page.items) console.log(session.id, session.created_at);"
          }
        ]
      }
    },
    "/v2/live/defaults": {
      "get": {
        "operationId": "getLiveDefaults",
        "summary": "Get the defaults",
        "description": "The value each option gets when the init body omits it.",
        "tags": [
          "Live"
        ],
        "responses": {
          "200": {
            "description": "The defaults in force.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDefaults"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this (its scopes, or the addresses it may be used from).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl https://eu1.api.gladia.io/v2/live/defaults \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\n\nimport requests\n\nAPI_URL = os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\")\nresponse = requests.get(\n    f\"{API_URL}/v2/live/defaults\",\n    headers={\"x-gladia-key\": os.environ[\"GLADIA_API_KEY\"]},\n    timeout=10,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "js",
            "label": "JavaScript",
            "source": "const API_URL = process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\";\nconst response = await fetch(`${API_URL}/v2/live/defaults`, {\n  headers: {\n    \"x-gladia-key\": process.env.GLADIA_API_KEY,\n    \"content-type\": \"application/json\",\n  },\n});\nif (!response.ok) {\n  throw new Error(`${response.status} ${await response.text()}`);\n}\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v2/live/capabilities": {
      "get": {
        "operationId": "getLiveCapabilities",
        "summary": "Get the capabilities",
        "description": "The models, and per model the add-ons, that `POST /v2/live` accepts for your key right now. Nothing is created. A model or add-on that no inference endpoint open to you can take at the moment (busy, down, not enabled) is left out.",
        "tags": [
          "Live"
        ],
        "responses": {
          "200": {
            "description": "The models and add-ons you can ask for.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveCapabilities"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this (its scopes, or the addresses it may be used from).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl https://eu1.api.gladia.io/v2/live/capabilities \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\n\nimport requests\n\nAPI_URL = os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\")\nresponse = requests.get(\n    f\"{API_URL}/v2/live/capabilities\",\n    headers={\"x-gladia-key\": os.environ[\"GLADIA_API_KEY\"]},\n    timeout=10,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "js",
            "label": "JavaScript",
            "source": "const API_URL = process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\";\nconst response = await fetch(`${API_URL}/v2/live/capabilities`, {\n  headers: {\n    \"x-gladia-key\": process.env.GLADIA_API_KEY,\n    \"content-type\": \"application/json\",\n  },\n});\nif (!response.ok) {\n  throw new Error(`${response.status} ${await response.text()}`);\n}\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v2/live/{id}": {
      "get": {
        "operationId": "getLiveSession",
        "summary": "Get a session",
        "description": "A session's status and options and, once it ended, its transcript.",
        "tags": [
          "Live"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identifier of the session (`id` of `POST /v2/live`).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveSession"
                }
              }
            }
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this (its scopes, or the addresses it may be used from).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such session for your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The service cannot answer right now: try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl https://eu1.api.gladia.io/v2/live/0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\""
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\n\nfrom gladiaio_sdk import GladiaClient\n\nclient = GladiaClient(\n    api_key=os.environ[\"GLADIA_API_KEY\"],\n    api_url=os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\"),\n)\n\nsession = client.live_v2().get(\"0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b\")\nprint(session.status, session.result)"
          },
          {
            "lang": "js",
            "label": "JavaScript SDK",
            "source": "import { GladiaClient } from \"@gladiaio/sdk\";\n\nconst client = new GladiaClient({\n  apiKey: process.env.GLADIA_API_KEY,\n  apiUrl: process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\",\n});\n\nconst session = await client.liveV2().get(\"0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b\");\nconsole.log(session.status, session.result);"
          }
        ]
      },
      "delete": {
        "operationId": "deleteLiveSession",
        "summary": "Delete a session",
        "description": "Deletes a session that has ended, its transcript and its recording.",
        "tags": [
          "Live"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identifier of the session (`id` of `POST /v2/live`).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Deleted."
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The session is still running.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such session for your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The service cannot answer right now: try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl -X DELETE https://eu1.api.gladia.io/v2/live/0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\""
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\n\nfrom gladiaio_sdk import GladiaClient\n\nclient = GladiaClient(\n    api_key=os.environ[\"GLADIA_API_KEY\"],\n    api_url=os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\"),\n)\n\nclient.live_v2().delete(\"0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b\")\nprint(\"deleted\")"
          },
          {
            "lang": "js",
            "label": "JavaScript SDK",
            "source": "import { GladiaClient } from \"@gladiaio/sdk\";\n\nconst client = new GladiaClient({\n  apiKey: process.env.GLADIA_API_KEY,\n  apiUrl: process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\",\n});\n\nawait client.liveV2().delete(\"0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b\");\nconsole.log(\"deleted\");"
          }
        ]
      }
    },
    "/v2/live/{id}/file": {
      "get": {
        "operationId": "getLiveSessionAudio",
        "summary": "Download the audio",
        "description": "The session's recording, in FLAC, for accounts that record their audio. Available about 40 seconds after the session ends. A `Range` header returns part of it.",
        "tags": [
          "Live"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identifier of the session (`id` of `POST /v2/live`).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The recording.",
            "content": {
              "audio/flac": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "206": {
            "description": "The requested range of the recording."
          },
          "302": {
            "description": "A redirect to a signed download URL."
          },
          "401": {
            "description": "No API key, or an unknown one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The key may not do this (its scopes, or the addresses it may be used from).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No such session for your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The service cannot answer right now: try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "curl",
            "source": "curl -L https://eu1.api.gladia.io/v2/live/0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b/file \\\n  -H \"x-gladia-key: $GLADIA_API_KEY\" \\\n  -o session.flac"
          },
          {
            "lang": "python",
            "label": "Python SDK",
            "source": "import os\n\nfrom gladiaio_sdk import GladiaClient\n\nclient = GladiaClient(\n    api_key=os.environ[\"GLADIA_API_KEY\"],\n    api_url=os.environ.get(\"GLADIA_API_URL\", \"https://eu1.api.gladia.io\"),\n)\n\naudio = client.live_v2().get_file(\"0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b\")\nwith open(\"session.flac\", \"wb\") as file:\n    file.write(audio)"
          },
          {
            "lang": "js",
            "label": "JavaScript SDK",
            "source": "import { writeFileSync } from \"node:fs\";\nimport { GladiaClient } from \"@gladiaio/sdk\";\n\nconst client = new GladiaClient({\n  apiKey: process.env.GLADIA_API_KEY,\n  apiUrl: process.env.GLADIA_API_URL ?? \"https://eu1.api.gladia.io\",\n});\n\nconst audio = await client.liveV2().getFile(\"0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b\");\nwriteFileSync(\"session.flac\", Buffer.from(audio));"
          }
        ]
      }
    }
  },
  "x-websocket": {
    "url": "wss://{cluster}.api.gladia.io/v2/live?token={token}",
    "description": "The `url` of `POST /v2/live`. Send the audio as binary frames, or as `audio_chunk` messages; send `stop_recording` when done. The server sends the messages below, then closes the connection.",
    "client_messages": [
      {
        "$ref": "#/components/schemas/AudioChunkAction"
      },
      {
        "$ref": "#/components/schemas/StopRecordingAction"
      }
    ],
    "server_messages": [
      {
        "$ref": "#/components/schemas/StartRecordingMessage"
      },
      {
        "$ref": "#/components/schemas/TranscriptMessage"
      },
      {
        "$ref": "#/components/schemas/SpeechStartMessage"
      },
      {
        "$ref": "#/components/schemas/SpeechEndMessage"
      },
      {
        "$ref": "#/components/schemas/NamedEntityRecognitionMessage"
      },
      {
        "$ref": "#/components/schemas/PiiMessage"
      },
      {
        "$ref": "#/components/schemas/SentimentAnalysisMessage"
      },
      {
        "$ref": "#/components/schemas/TranslationMessage"
      },
      {
        "$ref": "#/components/schemas/EndOfTurnMessage"
      },
      {
        "$ref": "#/components/schemas/AudioChunkAckMessage"
      },
      {
        "$ref": "#/components/schemas/StopRecordingAckMessage"
      },
      {
        "$ref": "#/components/schemas/EndRecordingMessage"
      },
      {
        "$ref": "#/components/schemas/PostTranscriptMessage"
      },
      {
        "$ref": "#/components/schemas/PostFinalTranscriptMessage"
      },
      {
        "$ref": "#/components/schemas/EndSessionMessage"
      },
      {
        "$ref": "#/components/schemas/ErrorMessage"
      }
    ],
    "delivery": {
      "start_recording": {
        "flags": [
          "receive_lifecycle_events"
        ],
        "callback": true
      },
      "transcript": {
        "flags": [
          "receive_partial_transcripts",
          "receive_final_transcripts"
        ],
        "callback": true
      },
      "speech_start": {
        "flags": [
          "receive_speech_events"
        ],
        "callback": true
      },
      "speech_end": {
        "flags": [
          "receive_speech_events"
        ],
        "callback": true
      },
      "named_entity_recognition": {
        "flags": [
          "receive_realtime_processing_events"
        ],
        "callback": true
      },
      "pii": {
        "flags": [],
        "callback": false
      },
      "sentiment_analysis": {
        "flags": [
          "receive_realtime_processing_events"
        ],
        "callback": true
      },
      "translation": {
        "flags": [
          "receive_realtime_processing_events"
        ],
        "callback": true
      },
      "end_of_turn": {
        "flags": [],
        "callback": false
      },
      "audio_chunk": {
        "flags": [
          "receive_acknowledgments"
        ],
        "callback": true
      },
      "stop_recording": {
        "flags": [
          "receive_acknowledgments"
        ],
        "callback": true
      },
      "end_recording": {
        "flags": [
          "receive_lifecycle_events"
        ],
        "callback": true
      },
      "post_transcript": {
        "flags": [
          "receive_post_processing_events"
        ],
        "callback": true
      },
      "post_final_transcript": {
        "flags": [
          "receive_post_processing_events"
        ],
        "callback": true
      },
      "end_session": {
        "flags": [
          "receive_lifecycle_events"
        ],
        "callback": true
      },
      "error": {
        "flags": [
          "receive_errors"
        ],
        "callback": true
      },
      "start_session": {
        "flags": [
          "receive_lifecycle_events"
        ],
        "callback": true,
        "callback_only": true
      }
    },
    "close_codes": {
      "1000": "The session ended normally.",
      "1011": "The session failed; its reason says why. `rejected: …`: an option the model refused (a translation target it does not serve, translation with PII redaction…): fix the init body and create a new session.",
      "1012": "The service is restarting: reconnect to the same URL to resume.",
      "4401": "Invalid or expired token."
    }
  },
  "x-models": [
    {
      "name": "solaria-3",
      "description": "Multilingual, with automatic language detection; the only model that translates.",
      "languages": [
        "ar",
        "cs",
        "da",
        "de",
        "el",
        "en",
        "es",
        "fa",
        "fi",
        "fr",
        "hi",
        "hu",
        "id",
        "it",
        "ja",
        "ko",
        "mk",
        "ms",
        "nl",
        "pl",
        "pt",
        "ro",
        "ru",
        "sv",
        "th",
        "tl",
        "tr",
        "vi",
        "zh"
      ],
      "features": {
        "custom_vocabulary": true,
        "punctuation": true,
        "numerals": true,
        "named_entity_recognition": true,
        "pii": true,
        "end_of_turn": true,
        "number_hold": true,
        "sentiment_analysis": true,
        "diarization": true,
        "translation": true
      }
    },
    {
      "name": "solaria-1",
      "description": "Gladia's multilingual model: 99 languages and Cantonese, detected or set.",
      "languages": [
        "af",
        "am",
        "ar",
        "as",
        "az",
        "ba",
        "be",
        "bg",
        "bn",
        "bo",
        "br",
        "bs",
        "ca",
        "cs",
        "cy",
        "da",
        "de",
        "el",
        "en",
        "es",
        "et",
        "eu",
        "fa",
        "fi",
        "fo",
        "fr",
        "gl",
        "gu",
        "ha",
        "haw",
        "he",
        "hi",
        "hr",
        "ht",
        "hu",
        "hy",
        "id",
        "is",
        "it",
        "ja",
        "jw",
        "ka",
        "kk",
        "km",
        "kn",
        "ko",
        "la",
        "lb",
        "ln",
        "lo",
        "lt",
        "lv",
        "mg",
        "mi",
        "mk",
        "ml",
        "mn",
        "mr",
        "ms",
        "mt",
        "my",
        "ne",
        "nl",
        "nn",
        "no",
        "oc",
        "pa",
        "pl",
        "ps",
        "pt",
        "ro",
        "ru",
        "sa",
        "sd",
        "si",
        "sk",
        "sl",
        "sn",
        "so",
        "sq",
        "sr",
        "su",
        "sv",
        "sw",
        "ta",
        "te",
        "tg",
        "th",
        "tk",
        "tl",
        "tr",
        "tt",
        "uk",
        "ur",
        "uz",
        "vi",
        "yi",
        "yo",
        "zh"
      ],
      "features": {
        "custom_vocabulary": true,
        "punctuation": true,
        "numerals": true,
        "named_entity_recognition": true,
        "pii": true,
        "end_of_turn": true,
        "number_hold": true,
        "sentiment_analysis": true,
        "diarization": true,
        "translation": false
      }
    },
    {
      "name": "trantoria-1",
      "description": "The lowest latency: transcripts within a fraction of a second. About 40 languages, English and Spanish included: set the language spoken.",
      "languages": null,
      "features": {
        "custom_vocabulary": true,
        "punctuation": true,
        "numerals": true,
        "named_entity_recognition": true,
        "pii": true,
        "end_of_turn": true,
        "number_hold": true,
        "sentiment_analysis": true,
        "diarization": true,
        "translation": false
      }
    }
  ],
  "x-translation-targets": [
    "af",
    "am",
    "ar",
    "as",
    "be",
    "bg",
    "bn",
    "ca",
    "da",
    "de",
    "en",
    "es",
    "fa",
    "fr",
    "gl",
    "id",
    "it",
    "ja",
    "km",
    "ko",
    "ln",
    "lo",
    "ms",
    "my",
    "ne",
    "nl",
    "no",
    "ps",
    "pt",
    "ro",
    "ru",
    "so",
    "sv",
    "th",
    "vi",
    "wo",
    "yo",
    "zh"
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-gladia-key",
        "description": "Your API key, from Gladia Workspace."
      }
    },
    "schemas": {
      "AddonError": {
        "additionalProperties": false,
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "AddonError",
        "type": "object"
      },
      "AudioChunkAckData": {
        "additionalProperties": false,
        "properties": {
          "byte_range": {
            "description": "First and last byte (excluded) of the acknowledged audio, from the start of the session.",
            "items": {
              "type": "integer"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          },
          "time_range": {
            "description": "The same range in milliseconds.",
            "items": {
              "type": "integer"
            },
            "maxItems": 2,
            "minItems": 2,
            "type": "array"
          }
        },
        "required": [
          "byte_range",
          "time_range"
        ],
        "title": "AudioChunkAckData",
        "type": "object"
      },
      "AudioChunkAckMessage": {
        "additionalProperties": false,
        "description": "Audio transcribed: a client may drop it from its resend buffer\n(`receive_acknowledgments`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "audio_chunk",
            "type": "string"
          },
          "acknowledged": {
            "type": "boolean"
          },
          "error": {
            "$ref": "#/components/schemas/JsonValue",
            "default": null
          },
          "data": {
            "$ref": "#/components/schemas/AudioChunkAckData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "acknowledged",
          "data"
        ],
        "title": "AudioChunkAckMessage",
        "type": "object"
      },
      "AudioChunkAction": {
        "additionalProperties": false,
        "description": "Audio, as JSON. Binary frames of raw audio are accepted too, and cost a third less.",
        "properties": {
          "type": {
            "const": "audio_chunk",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/AudioChunkPayload"
          }
        },
        "required": [
          "type",
          "data"
        ],
        "title": "AudioChunkAction",
        "type": "object"
      },
      "AudioChunkPayload": {
        "additionalProperties": false,
        "properties": {
          "chunk": {
            "description": "Audio, base64-encoded, in the session's encoding.",
            "type": "string"
          }
        },
        "required": [
          "chunk"
        ],
        "title": "AudioChunkPayload",
        "type": "object"
      },
      "CallbackConfig": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "format": "uri",
            "minLength": 1,
            "type": "string",
            "description": "The HTTPS URL that receives the messages, one POST each."
          },
          "receive_partial_transcripts": {
            "default": false,
            "type": "boolean",
            "description": "Partial transcripts."
          },
          "receive_final_transcripts": {
            "default": true,
            "type": "boolean",
            "description": "Final transcripts."
          },
          "receive_speech_events": {
            "default": false,
            "type": "boolean",
            "description": "`speech_start` and `speech_end`."
          },
          "receive_pre_processing_events": {
            "default": true,
            "type": "boolean",
            "description": "Pre-processing messages."
          },
          "receive_realtime_processing_events": {
            "default": true,
            "type": "boolean",
            "description": "Messages of the realtime processing."
          },
          "receive_post_processing_events": {
            "default": true,
            "type": "boolean",
            "description": "`post_transcript` and `post_final_transcript`."
          },
          "receive_acknowledgments": {
            "default": false,
            "type": "boolean",
            "description": "Acknowledgments."
          },
          "receive_errors": {
            "default": false,
            "type": "boolean",
            "description": "`error` messages."
          },
          "receive_lifecycle_events": {
            "default": true,
            "type": "boolean",
            "description": "`start_session`, `start_recording`, `end_recording` and `end_session`."
          }
        },
        "required": [
          "url"
        ],
        "title": "CallbackConfig",
        "type": "object"
      },
      "CustomSpellingConfig": {
        "additionalProperties": false,
        "properties": {
          "spelling_dictionary": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "object",
            "description": "The spelling to write (key) for each variant heard (values): `{\"Gladia\": [\"gladya\", \"glad ia\"]}`. Whole words, case-insensitive."
          }
        },
        "required": [
          "spelling_dictionary"
        ],
        "title": "CustomSpellingConfig",
        "type": "object"
      },
      "CustomVocabularyConfig": {
        "additionalProperties": false,
        "properties": {
          "vocabulary": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/components/schemas/VocabularyItem"
                }
              ]
            },
            "type": "array",
            "description": "Words or phrases, as strings or as objects with their own options."
          },
          "default_intensity": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "How strongly the words are favoured, from 0 to 1, when an entry sets none."
          }
        },
        "required": [
          "vocabulary"
        ],
        "title": "CustomVocabularyConfig",
        "type": "object"
      },
      "DiarizationConfig": {
        "title": "DiarizationConfig",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "number_of_speakers": {
            "type": "integer",
            "minimum": 1,
            "description": "Expected number of speakers, when you know it."
          },
          "max_speakers": {
            "type": "integer",
            "minimum": 1,
            "description": "Highest number of speakers to tell apart."
          }
        }
      },
      "EndOfTurnConfig": {
        "additionalProperties": false,
        "description": "`end_of_turn` options (extension): each key overrides the gateway's live default\n(`END_OF_TURN_DEFAULTS`), then the engine's (RTASR_EOT_*). The engine's own bounds\n(inference/rtasr/core/endpointing/eot.py), checked here so a bad value is a 400 on the init\ninstead of a refused WebSocket.",
        "properties": {
          "threshold": {
            "anyOf": [
              {
                "exclusiveMaximum": 1,
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "End-of-turn probability, between 0 and 1 (excluded), above which the turn ends."
          },
          "silence_ms": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 10000,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Silence, in milliseconds, before a turn is evaluated."
          },
          "stop_s": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 60,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Silence, in seconds, that ends the turn whatever the probability."
          },
          "emit_scores": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Also send an `end_of_turn_score` message for each evaluation, to calibrate `threshold`."
          },
          "window_s": {
            "anyOf": [
              {
                "exclusiveMinimum": 0,
                "maximum": 8,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Audio, in seconds, an evaluation reads before the silence (at most 8)."
          },
          "speech_dbfs": {
            "anyOf": [
              {
                "maximum": 0,
                "minimum": -100,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Level, in dBFS, under which audio counts as silence."
          },
          "reeval_ms": {
            "anyOf": [
              {
                "maximum": 10000,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Interval, in milliseconds, between two evaluations of the same silence."
          }
        },
        "title": "EndOfTurnConfig",
        "type": "object"
      },
      "EndOfTurnData": {
        "additionalProperties": false,
        "properties": {
          "channel": {
            "type": "integer"
          },
          "probability": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Probability that the speaker finished."
          },
          "reason": {
            "anyOf": [
              {
                "enum": [
                  "model",
                  "timeout"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`model`: the end-of-turn probability crossed `threshold`; `timeout`: the silence reached `stop_s`."
          },
          "end": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the turn ended, in seconds."
          },
          "speech_duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Speech in the turn, in seconds."
          }
        },
        "required": [
          "channel",
          "probability",
          "reason",
          "end",
          "speech_duration"
        ],
        "title": "EndOfTurnData",
        "type": "object"
      },
      "EndOfTurnDefaults": {
        "additionalProperties": false,
        "properties": {
          "threshold": {
            "description": "End-of-turn probability above which the turn ends.",
            "type": "number"
          },
          "silence_ms": {
            "description": "Silence, in milliseconds, before a turn is evaluated.",
            "type": "integer"
          },
          "stop_s": {
            "description": "Silence, in seconds, that ends the turn whatever the probability.",
            "type": "number"
          },
          "reeval_ms": {
            "description": "Interval, in milliseconds, between two evaluations of the same silence.",
            "type": "integer"
          },
          "window_s": {
            "description": "Audio, in seconds, the evaluation reads before the silence.",
            "type": "number"
          },
          "speech_dbfs": {
            "description": "Level, in dBFS, under which audio counts as silence.",
            "type": "number"
          }
        },
        "required": [
          "threshold",
          "silence_ms",
          "stop_s",
          "reeval_ms",
          "window_s",
          "speech_dbfs"
        ],
        "title": "EndOfTurnDefaults",
        "type": "object"
      },
      "EndOfTurnMessage": {
        "additionalProperties": false,
        "description": "The speaker finished their turn (`end_of_turn`): a voice agent may answer.",
        "properties": {
          "type": {
            "const": "end_of_turn",
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/EndOfTurnData"
          }
        },
        "required": [
          "type",
          "session_id",
          "data"
        ],
        "title": "EndOfTurnMessage",
        "type": "object"
      },
      "EndRecordingData": {
        "additionalProperties": false,
        "properties": {
          "recording_duration": {
            "description": "Audio received, in seconds.",
            "type": "number"
          }
        },
        "required": [
          "recording_duration"
        ],
        "title": "EndRecordingData",
        "type": "object"
      },
      "EndRecordingMessage": {
        "additionalProperties": false,
        "description": "No more audio is accepted (`receive_lifecycle_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "end_recording",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/EndRecordingData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "EndRecordingMessage",
        "type": "object"
      },
      "EndSessionMessage": {
        "additionalProperties": false,
        "description": "The last message: the server closes the WebSocket after it (`receive_lifecycle_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "end_session",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type"
        ],
        "title": "EndSessionMessage",
        "type": "object"
      },
      "Entity": {
        "additionalProperties": true,
        "description": "A named entity or a piece of personal data found in an utterance.",
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Entity type, for example `name`, `phone_number`, `location_city`."
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The entity's number in the session, per type: the same person is always the same number."
          },
          "action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "`ner`: tagged; otherwise how the personal data was redacted."
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Confidence, from 0 to 1."
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The entity as heard (never sent for masked personal data unless `pii.return_entities`)."
          },
          "start": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Offset of the entity's element in `text`, in characters."
          },
          "end": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "End offset of the entity's element in `text`, in characters."
          }
        },
        "title": "Entity",
        "type": "object"
      },
      "EntitySelection": {
        "title": "EntitySelection",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "entities": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "enable": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "disable": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ],
            "description": "Which types: a preset (`pii`, `pci`, `phi`, `contact`, `financial`, `name`, `location`, `date`…), a list of types and presets, or `{\"enable\": [...], \"disable\": [...]}`."
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "default": 0.5,
            "description": "Confidence, from 0 to 1, under which an entity is ignored."
          }
        }
      },
      "ErrorMessage": {
        "additionalProperties": true,
        "description": "Something failed during the session (`receive_errors`).",
        "properties": {
          "type": {
            "const": "error",
            "type": "string"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "error": {
            "$ref": "#/components/schemas/JsonValue",
            "default": null,
            "description": "What failed."
          }
        },
        "required": [
          "type"
        ],
        "title": "ErrorMessage",
        "type": "object"
      },
      "ErrorResponse": {
        "additionalProperties": false,
        "description": "Every error of the HTTP API.",
        "properties": {
          "statusCode": {
            "description": "HTTP status code of the error.",
            "examples": [
              400
            ],
            "type": "integer"
          },
          "timestamp": {
            "description": "When the error occurred (ISO 8601, UTC).",
            "examples": [
              "2026-10-12T09:04:17.210Z"
            ],
            "type": "string"
          },
          "path": {
            "description": "Path of the endpoint that answered.",
            "examples": [
              "/v2/live"
            ],
            "type": "string"
          },
          "message": {
            "description": "What went wrong.",
            "examples": [
              "Invalid parameter(s). See validation_errors for more details."
            ],
            "type": "string"
          },
          "request_id": {
            "description": "Identifier to quote to support.",
            "examples": [
              "G-1a2b3c4d"
            ],
            "type": "string"
          },
          "validation_errors": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "One message per invalid field (`400` only): the field's path, then the rule it breaks.",
            "examples": [
              [
                "sample_rate Input should be 8000, 16000, 32000, 44100 or 48000"
              ]
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "A machine-readable reason, on some refusals (for example `ip_not_allowed`, `api_key_scope_denied`)."
          }
        },
        "required": [
          "statusCode",
          "timestamp",
          "path",
          "message",
          "request_id"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "LiveInitRequest": {
        "additionalProperties": false,
        "properties": {
          "encoding": {
            "default": "wav/pcm",
            "enum": [
              "wav/pcm",
              "wav/alaw",
              "wav/ulaw"
            ],
            "type": "string",
            "description": "Encoding of the audio you send."
          },
          "bit_depth": {
            "default": 16,
            "enum": [
              8,
              16,
              24,
              32
            ],
            "type": "integer",
            "description": "Bit depth of the audio. `wav/alaw` and `wav/ulaw` are 8-bit."
          },
          "sample_rate": {
            "default": 16000,
            "enum": [
              8000,
              16000,
              32000,
              44100,
              48000
            ],
            "type": "integer",
            "description": "Sample rate of the audio, in Hz."
          },
          "channels": {
            "default": 1,
            "maximum": 8,
            "minimum": 1,
            "type": "integer",
            "description": "Number of interleaved audio channels. Each channel is transcribed on its own: put each speaker of a call on their own channel to know who said what without diarization."
          },
          "custom_metadata": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "object",
            "description": "Any JSON object, kept with the session: returned by `GET /v2/live/{id}`, sent to your callback, and a filter of `GET /v2/live`."
          },
          "model": {
            "type": "string",
            "enum": [
              "solaria-3",
              "solaria-1",
              "trantoria-1",
              "solaria-3-fast",
              "solaria-3-medium",
              "solaria-3-balanced",
              "solaria-3-precise",
              "solaria-1-fast",
              "solaria-1-medium",
              "solaria-1-balanced",
              "solaria-1-precise",
              "trantoria-1-fast",
              "trantoria-1-medium",
              "trantoria-1-balanced",
              "trantoria-1-precise",
              "fast",
              "medium",
              "balanced",
              "precise"
            ],
            "examples": [
              "solaria-3"
            ],
            "description": "The model, by name, optionally with a latency profile (`solaria-3-fast`), or a latency profile alone (`fast`). Omitted: the default model of your account."
          },
          "endpointing": {
            "default": 0.64,
            "maximum": 10,
            "minimum": 0.01,
            "type": "number",
            "description": "Silence, in seconds, that ends an utterance and produces its final transcript. Short values give faster finals and may cut sentences at hesitations."
          },
          "maximum_duration_without_endpointing": {
            "maximum": 60,
            "minimum": 5,
            "type": "number",
            "description": "Longest utterance, in seconds: a final is forced after this much speech without a pause. Omitted: no limit."
          },
          "language_config": {
            "$ref": "#/components/schemas/LanguageConfig",
            "description": "The languages to expect."
          },
          "realtime_processing": {
            "$ref": "#/components/schemas/RealtimeProcessing",
            "description": "Processing applied to each final transcript, during the session."
          },
          "messages_config": {
            "$ref": "#/components/schemas/MessagesConfig",
            "description": "The messages sent on the WebSocket."
          },
          "callback": {
            "default": false,
            "type": "boolean",
            "description": "Also send the session's messages to `callback_config.url`, by HTTP POST."
          },
          "callback_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CallbackConfig"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Where and which messages the callback receives. Required with `callback`."
          },
          "profile": {
            "anyOf": [
              {
                "enum": [
                  "fast",
                  "medium",
                  "balanced",
                  "precise"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Latency profile: `fast` gives the earliest transcripts, `precise` the most accurate ones. The same as a profile in `model`."
          },
          "diarization": {
            "default": false,
            "type": "boolean",
            "description": "Speaker labels on single-channel audio: each utterance and word gets a `speaker` number."
          },
          "diarization_config": {
            "$ref": "#/components/schemas/DiarizationConfig",
            "description": "Diarization options."
          },
          "punctuation": {
            "default": true,
            "type": "boolean",
            "description": "Punctuation and casing of the transcripts. On unless `false`."
          },
          "end_of_turn": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/EndOfTurnConfig"
              }
            ],
            "default": false,
            "description": "End-of-turn detection for voice agents: an `end_of_turn` message when the speaker has finished their turn, judged from how they speak and not from silence alone. `true` uses the defaults (`GET /v2/live/defaults`), an object overrides some of them. Off when omitted."
          },
          "numerals": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/NumeralsConfig"
              }
            ],
            "default": false,
            "description": "Spoken numbers, amounts and clock times written with digits in the final transcripts (\"one thousand three hundred fifty five dollars\" becomes \"$1,355\", \"at nine fifteen\" \"at 9:15\"); `text_raw` keeps the words. Where the turn router runs (the default; not with `turn_router: false`), it guides them: phone numbers are also written in their country's format (\"06 12 34 56 78\") and dates the language's way (\"March 12, 2026\"). `true` uses the countries of the language spoken, an object sets the country."
          },
          "named_entity_recognition": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/EntitySelection"
              }
            ],
            "default": false,
            "description": "Named entities (people, places, organizations, dates, amounts…) tagged in the final transcripts, and a `named_entity_recognition` message after each final. `true` tags every type."
          },
          "pii": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/PiiConfig"
              }
            ],
            "default": false,
            "description": "Personal data (names, phone numbers, emails, card numbers…) redacted in the final transcripts, and a `pii` message after each final. With redaction on, no partial transcript is sent."
          },
          "turn_router": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/TurnRouterConfig"
              }
            ],
            "description": "The number hold: an utterance stays open while a number, an amount or an address is still being dictated, so it is not cut at each pause. On by default where the model supports it; `false` turns it off."
          }
        },
        "title": "InitBody",
        "type": "object"
      },
      "InitResponse": {
        "additionalProperties": false,
        "description": "A live session, created: connect to `url` to stream its audio.",
        "properties": {
          "id": {
            "description": "Identifier of the session (a time-ordered UUID).",
            "examples": [
              "0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b"
            ],
            "type": "string"
          },
          "created_at": {
            "description": "Creation date (ISO 8601, UTC).",
            "examples": [
              "2026-10-12T09:04:17.210Z"
            ],
            "type": "string"
          },
          "url": {
            "description": "WebSocket URL to stream the audio to. It carries a single-use token: connect within 60 seconds. Reconnecting to the same URL after a dropped connection resumes the session.",
            "examples": [
              "wss://eu1.api.gladia.io/v2/live?token=eyJhbGciOi..."
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "url"
        ],
        "title": "InitResponse",
        "type": "object"
      },
      "JsonValue": {},
      "LanguageConfig": {
        "additionalProperties": false,
        "properties": {
          "languages": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "description": "The languages that may be spoken (ISO 639-1 codes). Empty: the language is detected. One or more codes: the session is transcribed in the first one, unless `code_switching`."
          },
          "code_switching": {
            "default": false,
            "type": "boolean",
            "description": "Detect the language as the conversation goes, among `languages` when given: for speakers who switch languages."
          }
        },
        "title": "LanguageConfig",
        "type": "object"
      },
      "LiveCapabilities": {
        "additionalProperties": false,
        "description": "What `POST /v2/live` accepts for the calling key right now.",
        "properties": {
          "models": {
            "description": "The models with an inference endpoint open to this key; empty when none is.",
            "items": {
              "$ref": "#/components/schemas/ModelCapabilities"
            },
            "type": "array"
          }
        },
        "required": [
          "models"
        ],
        "title": "LiveCapabilities",
        "type": "object"
      },
      "LiveFile": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the recording, `null` when the audio was not recorded."
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Download URL of the recording (`GET /v2/live/{id}/file`), `null` when not recorded."
          },
          "audio_duration": {
            "description": "Audio received, in seconds.",
            "type": "number"
          },
          "number_of_channels": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "filename",
          "source",
          "audio_duration",
          "number_of_channels"
        ],
        "title": "LiveFile",
        "type": "object"
      },
      "LiveResult": {
        "additionalProperties": false,
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/TranscriptionMetadata"
          },
          "transcription": {
            "$ref": "#/components/schemas/Transcription"
          },
          "translation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslationResult"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "With `realtime_processing.translation`."
          },
          "messages": {
            "description": "The final transcript messages, as sent on the WebSocket.",
            "items": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "array"
          }
        },
        "required": [
          "metadata",
          "transcription",
          "messages"
        ],
        "title": "LiveResult",
        "type": "object"
      },
      "LiveSession": {
        "additionalProperties": false,
        "description": "A live session: its status, its options and, once done, its result.",
        "properties": {
          "id": {
            "description": "Identifier of the session.",
            "examples": [
              "0199d7a2-5c3e-7b41-9f0a-3c2d1e4f5a6b"
            ],
            "type": "string"
          },
          "request_id": {
            "description": "Identifier to quote to support.",
            "examples": [
              "G-0199d7a2"
            ],
            "type": "string"
          },
          "version": {
            "const": 2,
            "default": 2,
            "type": "integer"
          },
          "status": {
            "description": "`queued`: created, no WebSocket yet; `processing`: streaming (or dropped and still resumable); `done`: ended, the result is there; `error`: the session failed.",
            "enum": [
              "queued",
              "processing",
              "done",
              "error"
            ],
            "type": "string"
          },
          "created_at": {
            "description": "Creation date (ISO 8601, UTC).",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "End date, once `done` or `error`."
          },
          "custom_metadata": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "description": "The init body's `custom_metadata`.",
            "type": "object"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "`500` when the session failed, else `null`."
          },
          "kind": {
            "const": "live",
            "default": "live",
            "type": "string"
          },
          "file": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LiveFile"
              },
              {
                "type": "null"
              }
            ],
            "description": "The session's audio, once it ended."
          },
          "request_params": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The session's options, as validated."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LiveResult"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transcript, once `done`."
          }
        },
        "required": [
          "id",
          "request_id",
          "status",
          "created_at",
          "completed_at",
          "custom_metadata",
          "error_code",
          "file",
          "request_params",
          "result"
        ],
        "title": "LiveSession",
        "type": "object"
      },
      "LiveSessionList": {
        "additionalProperties": false,
        "properties": {
          "first": {
            "description": "URL of the first page.",
            "type": "string"
          },
          "current": {
            "description": "URL of this page.",
            "type": "string"
          },
          "next": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "URL of the next page (it carries a `cursor`), `null` on the last page."
          },
          "items": {
            "description": "The sessions, newest first.",
            "items": {
              "$ref": "#/components/schemas/LiveSession"
            },
            "type": "array"
          }
        },
        "required": [
          "first",
          "current",
          "next",
          "items"
        ],
        "title": "LiveSessionList",
        "type": "object"
      },
      "MessagesConfig": {
        "additionalProperties": false,
        "properties": {
          "receive_partial_transcripts": {
            "default": false,
            "type": "boolean",
            "description": "Partial transcripts, updated while the utterance is spoken."
          },
          "receive_final_transcripts": {
            "default": true,
            "type": "boolean",
            "description": "The final transcript of each utterance."
          },
          "receive_speech_events": {
            "default": true,
            "type": "boolean",
            "description": "`speech_start` and `speech_end`."
          },
          "receive_pre_processing_events": {
            "default": true,
            "type": "boolean",
            "description": "Pre-processing messages."
          },
          "receive_realtime_processing_events": {
            "default": true,
            "type": "boolean",
            "description": "Messages of the realtime processing: `translation`, `named_entity_recognition`, `sentiment_analysis`."
          },
          "receive_post_processing_events": {
            "default": true,
            "type": "boolean",
            "description": "`post_transcript` and `post_final_transcript`, at the end."
          },
          "receive_acknowledgments": {
            "default": true,
            "type": "boolean",
            "description": "`audio_chunk` and `stop_recording` acknowledgments."
          },
          "receive_errors": {
            "default": true,
            "type": "boolean",
            "description": "`error` messages."
          },
          "receive_lifecycle_events": {
            "default": false,
            "type": "boolean",
            "description": "`start_recording`, `end_recording` and `end_session`."
          }
        },
        "title": "MessagesConfig",
        "type": "object"
      },
      "ModelCapabilities": {
        "additionalProperties": false,
        "description": "A model an inference endpoint takes for the calling key, and its add-ons.",
        "properties": {
          "model": {
            "description": "The model's code name, as the init body's `model` takes it.",
            "examples": [
              "solaria-3"
            ],
            "type": "string"
          },
          "addons": {
            "description": "The add-ons a session on this model may ask for, by the init body's option name.",
            "examples": [
              [
                "named_entity_recognition",
                "pii",
                "translation"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "model",
          "addons"
        ],
        "title": "ModelCapabilities",
        "type": "object"
      },
      "NamedEntity": {
        "additionalProperties": false,
        "properties": {
          "entity_type": {
            "description": "The entity's type, for example `name`.",
            "type": "string"
          },
          "text": {
            "description": "The entity as heard.",
            "type": "string"
          },
          "start": {
            "description": "Start, in seconds.",
            "type": "number"
          },
          "end": {
            "description": "End, in seconds.",
            "type": "number"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The entity's number in the session: the same person is always the same number."
          },
          "score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Confidence, from 0 to 1."
          },
          "char_start": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Offset of the entity's element in the final's `text`."
          },
          "char_end": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "End offset of the entity's element in the final's `text`."
          }
        },
        "required": [
          "entity_type",
          "text",
          "start",
          "end"
        ],
        "title": "NamedEntity",
        "type": "object"
      },
      "NamedEntityData": {
        "additionalProperties": false,
        "properties": {
          "utterance_id": {
            "type": "string"
          },
          "utterance": {
            "$ref": "#/components/schemas/Utterance"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/NamedEntity"
            },
            "type": "array"
          }
        },
        "required": [
          "utterance_id",
          "utterance",
          "results"
        ],
        "title": "NamedEntityData",
        "type": "object"
      },
      "NamedEntityRecognitionMessage": {
        "additionalProperties": false,
        "description": "The entities of a final, right after it (`receive_realtime_processing_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "named_entity_recognition",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddonError"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "data": {
            "$ref": "#/components/schemas/NamedEntityData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "NamedEntityRecognitionMessage",
        "type": "object"
      },
      "NumeralsConfig": {
        "additionalProperties": false,
        "description": "`numerals` options: the country whose format the phone numbers and dates of the final\ntranscripts are written in.",
        "properties": {
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The country whose phone numbers and dates the transcripts are written in: an ISO 3166-1 alpha-2 code in capitals (`CH`, `CA`). Omitted: the countries where the language is spoken."
          }
        },
        "title": "NumeralsConfig",
        "type": "object"
      },
      "PiiConfig": {
        "title": "PiiConfig",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "entities": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "enable": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "disable": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ],
            "default": "pii",
            "description": "Which types to redact: a preset (`pii`, the default; `pci`, `phi`, `contact`, `financial`…), a list of types and presets, or `{\"enable\": [...], \"disable\": [...]}`."
          },
          "mode": {
            "type": "string",
            "enum": [
              "marker",
              "mask",
              "tag"
            ],
            "default": "marker",
            "description": "`marker` replaces the data with an element (`<pii:phone_number id=\"1\"/>`), `mask` with mask characters inside the element, `tag` keeps the text inside the element."
          },
          "threshold": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "default": 0.5,
            "description": "Confidence, from 0 to 1, under which a span is not redacted."
          },
          "mask_character": {
            "type": "string",
            "default": "*",
            "minLength": 1,
            "maxLength": 1,
            "description": "The character of `mask` mode."
          },
          "coreference": {
            "type": "string",
            "enum": [
              "heuristics",
              "exact",
              "off"
            ],
            "default": "heuristics",
            "description": "How mentions of the same entity get the same `id`: `heuristics` (the default), `exact` (same text only) or `off`."
          },
          "return_entities": {
            "type": "boolean",
            "default": false,
            "description": "Also return the redacted text in the `pii` message (`text`)."
          }
        }
      },
      "PiiData": {
        "additionalProperties": false,
        "properties": {
          "utterance_id": {
            "type": "string"
          },
          "utterance": {
            "$ref": "#/components/schemas/Utterance"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PiiEntity"
            },
            "type": "array"
          }
        },
        "required": [
          "utterance_id",
          "utterance",
          "results"
        ],
        "title": "PiiData",
        "type": "object"
      },
      "PiiEntity": {
        "additionalProperties": false,
        "properties": {
          "entity_type": {
            "description": "The kind of personal data, for example `phone_number`.",
            "type": "string"
          },
          "id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Its number in the session."
          },
          "action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What was done: masked or tagged."
          },
          "char_start": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "char_end": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The data as heard, only with `pii.return_entities`."
          }
        },
        "required": [
          "entity_type"
        ],
        "title": "PiiEntity",
        "type": "object"
      },
      "PiiMessage": {
        "additionalProperties": false,
        "description": "The personal data redacted in a final, right after it (with `pii`; on the WebSocket\nonly).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "pii",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddonError"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "data": {
            "$ref": "#/components/schemas/PiiData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "PiiMessage",
        "type": "object"
      },
      "PostFinalData": {
        "additionalProperties": false,
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/TranscriptionMetadata"
          },
          "transcription": {
            "$ref": "#/components/schemas/Transcription"
          },
          "translation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslationResult"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          }
        },
        "required": [
          "metadata",
          "transcription"
        ],
        "title": "PostFinalData",
        "type": "object"
      },
      "PostFinalTranscriptMessage": {
        "additionalProperties": false,
        "description": "The session's result, the same as `GET /v2/live/{id}`'s\n(`receive_post_processing_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "post_final_transcript",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/PostFinalData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "PostFinalTranscriptMessage",
        "type": "object"
      },
      "PostTranscriptMessage": {
        "additionalProperties": false,
        "description": "The whole session's transcript, after `end_recording`\n(`receive_post_processing_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "post_transcript",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/Transcription"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "PostTranscriptMessage",
        "type": "object"
      },
      "RealtimeProcessing": {
        "additionalProperties": false,
        "properties": {
          "custom_vocabulary": {
            "default": false,
            "type": "boolean",
            "description": "Bias the transcription toward the words of `custom_vocabulary_config`."
          },
          "custom_vocabulary_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomVocabularyConfig"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The words to favour. Required with `custom_vocabulary`."
          },
          "custom_spelling": {
            "default": false,
            "type": "boolean",
            "description": "Rewrite words as `custom_spelling_config` says."
          },
          "custom_spelling_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CustomSpellingConfig"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The spellings to apply. Required with `custom_spelling`."
          },
          "translation": {
            "default": false,
            "type": "boolean",
            "description": "Translate each final transcript into the target languages."
          },
          "translation_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslationConfig"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The target languages. Required with `translation`."
          },
          "named_entity_recognition": {
            "default": false,
            "type": "boolean",
            "description": "The same as the top-level `named_entity_recognition: true`."
          },
          "sentiment_analysis": {
            "default": false,
            "type": "boolean",
            "description": "The sentiment (positive, neutral, negative) and emotion of each final, in a `sentiment_analysis` message after it."
          }
        },
        "title": "RealtimeProcessing",
        "type": "object"
      },
      "Sentiment": {
        "additionalProperties": false,
        "properties": {
          "sentiment": {
            "enum": [
              "positive",
              "neutral",
              "negative"
            ],
            "type": "string"
          },
          "emotion": {
            "description": "The dominant emotion, for example `joy`; empty when none.",
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "start": {
            "type": "number"
          },
          "end": {
            "type": "number"
          },
          "channel": {
            "type": "integer"
          }
        },
        "required": [
          "sentiment",
          "emotion",
          "text",
          "start",
          "end",
          "channel"
        ],
        "title": "Sentiment",
        "type": "object"
      },
      "SentimentAnalysisMessage": {
        "additionalProperties": false,
        "description": "The sentiment of a final, right after it (`receive_realtime_processing_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "sentiment_analysis",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddonError"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "data": {
            "$ref": "#/components/schemas/SentimentData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "SentimentAnalysisMessage",
        "type": "object"
      },
      "SentimentData": {
        "additionalProperties": false,
        "properties": {
          "utterance_id": {
            "type": "string"
          },
          "utterance": {
            "$ref": "#/components/schemas/Utterance"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/Sentiment"
            },
            "type": "array"
          }
        },
        "required": [
          "utterance_id",
          "utterance",
          "results"
        ],
        "title": "SentimentData",
        "type": "object"
      },
      "SessionDefaults": {
        "additionalProperties": false,
        "description": "What a session gets for each option its init body omits.",
        "properties": {
          "endpointing": {
            "description": "Silence, in seconds, that ends an utterance.",
            "examples": [
              0.64
            ],
            "type": "number"
          },
          "maximum_duration_without_endpointing": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Longest utterance, in seconds, before a final is forced; `null`: no limit."
          },
          "end_of_turn": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EndOfTurnDefaults"
              },
              {
                "type": "null"
              }
            ],
            "description": "The end-of-turn options a session starts from."
          },
          "turn_router": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TurnHoldDefaults"
              },
              {
                "type": "null"
              }
            ],
            "description": "The number hold a session gets when the model serving it supports it."
          }
        },
        "required": [
          "endpointing",
          "maximum_duration_without_endpointing",
          "end_of_turn",
          "turn_router"
        ],
        "title": "SessionDefaults",
        "type": "object"
      },
      "SpeechEndMessage": {
        "additionalProperties": false,
        "description": "Speech ended on a channel (`receive_speech_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "speech_end",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/SpeechEventData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "SpeechEndMessage",
        "type": "object"
      },
      "SpeechEventData": {
        "additionalProperties": false,
        "properties": {
          "time": {
            "description": "When speech started or ended, in seconds.",
            "type": "number"
          },
          "channel": {
            "type": "integer"
          }
        },
        "required": [
          "time",
          "channel"
        ],
        "title": "SpeechEventData",
        "type": "object"
      },
      "SpeechStartMessage": {
        "additionalProperties": false,
        "description": "Speech started on a channel (`receive_speech_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "speech_start",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/SpeechEventData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "SpeechStartMessage",
        "type": "object"
      },
      "StartRecordingMessage": {
        "additionalProperties": false,
        "description": "The session is ready: audio may be sent (`messages_config.receive_lifecycle_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "start_recording",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type"
        ],
        "title": "StartRecordingMessage",
        "type": "object"
      },
      "StopRecordingAckData": {
        "additionalProperties": false,
        "properties": {
          "recording_duration": {
            "description": "Audio received, in seconds.",
            "type": "number"
          },
          "recording_left_to_process": {
            "description": "Audio, in seconds, still being transcribed.",
            "type": "number"
          }
        },
        "required": [
          "recording_duration",
          "recording_left_to_process"
        ],
        "title": "StopRecordingAckData",
        "type": "object"
      },
      "StopRecordingAckMessage": {
        "additionalProperties": false,
        "description": "The answer to `stop_recording` (`receive_acknowledgments`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "stop_recording",
            "type": "string"
          },
          "acknowledged": {
            "type": "boolean"
          },
          "error": {
            "$ref": "#/components/schemas/JsonValue",
            "default": null
          },
          "data": {
            "$ref": "#/components/schemas/StopRecordingAckData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "acknowledged",
          "data"
        ],
        "title": "StopRecordingAckMessage",
        "type": "object"
      },
      "StopRecordingAction": {
        "additionalProperties": false,
        "description": "No more audio: the server sends the last finals, the post-processing results, then ends\nthe session.",
        "properties": {
          "type": {
            "const": "stop_recording",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "title": "StopRecordingAction",
        "type": "object"
      },
      "TranscriptData": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "Identifier of the utterance: `<channel>_<index>`, stable for the whole session.",
            "examples": [
              "00_00000003"
            ],
            "type": "string"
          },
          "is_final": {
            "description": "`false`: a partial transcript, replaced by the next one; `true`: the final transcript of the utterance.",
            "type": "boolean"
          },
          "utterance": {
            "$ref": "#/components/schemas/Utterance"
          }
        },
        "required": [
          "id",
          "is_final",
          "utterance"
        ],
        "title": "TranscriptData",
        "type": "object"
      },
      "TranscriptMessage": {
        "additionalProperties": false,
        "description": "A partial (`receive_partial_transcripts`) or final (`receive_final_transcripts`)\ntranscript.",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "transcript",
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/TranscriptData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "TranscriptMessage",
        "type": "object"
      },
      "Transcription": {
        "additionalProperties": false,
        "properties": {
          "languages": {
            "description": "Languages heard, in order of appearance.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "utterances": {
            "description": "Every final utterance, by start time.",
            "items": {
              "$ref": "#/components/schemas/Utterance"
            },
            "type": "array"
          },
          "full_transcript": {
            "description": "The final utterances' text, joined.",
            "type": "string"
          }
        },
        "required": [
          "languages",
          "utterances",
          "full_transcript"
        ],
        "title": "Transcription",
        "type": "object"
      },
      "TranscriptionMetadata": {
        "additionalProperties": false,
        "properties": {
          "audio_duration": {
            "description": "Audio received, in seconds.",
            "type": "number"
          },
          "billing_time": {
            "description": "Billed duration, in seconds.",
            "type": "number"
          },
          "number_of_distinct_channels": {
            "description": "Number of audio channels.",
            "type": "integer"
          },
          "transcription_time": {
            "description": "How long the session ran, in seconds.",
            "type": "number"
          }
        },
        "required": [
          "audio_duration",
          "billing_time",
          "number_of_distinct_channels",
          "transcription_time"
        ],
        "title": "TranscriptionMetadata",
        "type": "object"
      },
      "TranslationConfig": {
        "additionalProperties": false,
        "properties": {
          "target_languages": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array",
            "description": "The languages to translate into (ISO 639-1 codes)."
          }
        },
        "required": [
          "target_languages"
        ],
        "title": "TranslationConfig",
        "type": "object"
      },
      "TranslationData": {
        "additionalProperties": false,
        "properties": {
          "utterance_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "utterance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Utterance"
              },
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/JsonValue"
                },
                "type": "object"
              }
            ]
          },
          "original_language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "translated_utterance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Utterance"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` when the translation failed (see `error`)."
          }
        },
        "required": [
          "utterance_id",
          "utterance",
          "original_language",
          "target_language",
          "translated_utterance"
        ],
        "title": "TranslationData",
        "type": "object"
      },
      "TranslationMessage": {
        "additionalProperties": false,
        "description": "One final translated into one target language (`receive_realtime_processing_events`).",
        "properties": {
          "session_id": {
            "description": "Identifier of the session.",
            "type": "string"
          },
          "created_at": {
            "description": "When the message was sent (ISO 8601, UTC).",
            "type": "string"
          },
          "type": {
            "const": "translation",
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/JsonValue",
            "default": null
          },
          "data": {
            "$ref": "#/components/schemas/TranslationData"
          }
        },
        "required": [
          "session_id",
          "created_at",
          "type",
          "data"
        ],
        "title": "TranslationMessage",
        "type": "object"
      },
      "TranslationResult": {
        "additionalProperties": false,
        "properties": {
          "success": {
            "type": "boolean"
          },
          "is_empty": {
            "description": "`true` when nothing was translated.",
            "type": "boolean"
          },
          "exec_time": {
            "type": "number"
          },
          "error": {
            "$ref": "#/components/schemas/JsonValue",
            "default": null
          },
          "results": {
            "description": "One result per target language.",
            "items": {
              "$ref": "#/components/schemas/TranslationResultItem"
            },
            "type": "array"
          }
        },
        "required": [
          "success",
          "is_empty",
          "exec_time",
          "results"
        ],
        "title": "TranslationResult",
        "type": "object"
      },
      "TranslationResultItem": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/JsonValue",
            "default": null,
            "description": "Always `null`."
          },
          "languages": {
            "description": "The target language of this result.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "full_transcript": {
            "description": "The translated text, joined.",
            "type": "string"
          },
          "utterances": {
            "description": "The translated utterances, one per final.",
            "items": {
              "$ref": "#/components/schemas/Utterance"
            },
            "type": "array"
          },
          "sentences": {
            "description": "Always empty.",
            "items": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "array"
          },
          "subtitles": {
            "description": "Always empty.",
            "items": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "array"
          }
        },
        "required": [
          "languages",
          "full_transcript",
          "utterances",
          "sentences",
          "subtitles"
        ],
        "title": "TranslationResultItem",
        "type": "object"
      },
      "TurnHoldDefaults": {
        "additionalProperties": false,
        "properties": {
          "hold": {
            "description": "An utterance stays open while a number, an amount or an address is still being dictated.",
            "type": "boolean"
          },
          "emit": {
            "description": "Turn verdicts sent as messages.",
            "type": "boolean"
          },
          "route_numerals": {
            "description": "Number words routed through the hold.",
            "type": "boolean"
          }
        },
        "required": [
          "hold",
          "emit",
          "route_numerals"
        ],
        "title": "TurnHoldDefaults",
        "type": "object"
      },
      "TurnRouterConfig": {
        "title": "TurnRouterConfig",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "hold": {
            "type": "boolean",
            "description": "The number hold."
          }
        }
      },
      "Utterance": {
        "additionalProperties": true,
        "description": "A piece of speech between two pauses, on one channel.",
        "properties": {
          "text": {
            "description": "The transcript. With named entity recognition or PII redaction on, it carries their inline elements (`<ner:name id=\"1\">…</ner:name>`, `<pii:email id=\"1\"/>`).",
            "examples": [
              "Hello, how can I help you?"
            ],
            "type": "string"
          },
          "start": {
            "description": "Start, in seconds from the start of the audio.",
            "type": "number"
          },
          "end": {
            "description": "End, in seconds from the start of the audio.",
            "type": "number"
          },
          "language": {
            "description": "Language spoken (ISO 639-1).",
            "examples": [
              "en"
            ],
            "type": "string"
          },
          "confidence": {
            "description": "Confidence, from 0 to 1.",
            "type": "number"
          },
          "channel": {
            "description": "Audio channel the utterance was heard on, from 0.",
            "type": "integer"
          },
          "speaker": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Speaker number, with `diarization`."
          },
          "words": {
            "description": "The words with their timestamps.",
            "items": {
              "$ref": "#/components/schemas/Word"
            },
            "type": "array"
          },
          "text_raw": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The transcript without inline elements (with named entity recognition; never with PII redaction)."
          },
          "entities": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Entity"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The entities of the utterance, with named entity recognition or PII redaction."
          },
          "forced": {
            "anyOf": [
              {
                "const": "max_duration",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Set when the utterance was closed by `maximum_duration_without_endpointing` rather than by a pause."
          }
        },
        "required": [
          "text",
          "start",
          "end",
          "language",
          "confidence",
          "channel",
          "words"
        ],
        "title": "Utterance",
        "type": "object"
      },
      "VocabularyItem": {
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "description": "The word or phrase."
          },
          "intensity": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "How strongly it is favoured, from 0 to 1."
          },
          "pronunciations": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Other ways it may be pronounced, written as they sound."
          }
        },
        "required": [
          "value"
        ],
        "title": "VocabularyItem",
        "type": "object"
      },
      "Word": {
        "additionalProperties": false,
        "properties": {
          "word": {
            "description": "The word, with its leading space when it follows another.",
            "examples": [
              " hello"
            ],
            "type": "string"
          },
          "start": {
            "description": "Start of the word, in seconds from the start of the audio.",
            "type": "number"
          },
          "end": {
            "description": "End of the word, in seconds from the start of the audio.",
            "type": "number"
          },
          "confidence": {
            "description": "Confidence, from 0 to 1.",
            "type": "number"
          },
          "speaker": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Speaker of the word, with `diarization`."
          }
        },
        "required": [
          "word",
          "start",
          "end",
          "confidence"
        ],
        "title": "Word",
        "type": "object"
      }
    }
  }
}