> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tazolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream decisions

> Send audio over a WebSocket connection and receive typed decisions.

Connect to `wss://api.tazolabs.com/v1/decisions/stream` and send `session.start`
within five seconds. Include your API key or access token in its `authorization`
field, then wait for `session.ready` before sending audio.

Send control messages as JSON and audio as binary PCM16 frames: little-endian,
16 kHz, mono. Audio must be sent as raw bytes, without JSON or base64 encoding.

For a walkthrough with request and response examples, see
[Streaming decisions](https://docs.tazolabs.com/guides/streaming.md). Try streaming audio in the
[Tazo playground](https://app.tazolabs.com).


## AsyncAPI

````yaml api-reference/asyncapi.yaml decisions
id: decisions
title: Stream decisions
description: >-
  Send audio and receive typed decisions over one WebSocket connection. Chunk
  mode has no cumulative audio-duration cap and reports max_turn_audio_ms as
  null. Turn mode reports a numeric model/server limit; commit before exceeding
  it and wait for decision.finalized before the next turn.
servers:
  - id: production
    protocol: wss
    host: api.tazolabs.com
    bindings: []
    variables: []
address: /v1/decisions/stream
parameters: []
bindings: []
operations:
  - &ref_8
    id: sendToTazo
    title: Send to Tazo
    type: send
    messages:
      - &ref_15
        id: sessionStart
        contentType: application/json
        payload:
          - name: session.start
            description: >-
              Authenticate and configure the session. Wait for session.ready
              before sending audio.
            type: object
            properties:
              - name: model
                type: string
                title: Model
                required: false
              - name: state
                type: anyOf
                title: State
                required: true
              - name: questions
                type: object
                title: Questions
                description: >-
                  Exactly one question. Use Tazo Large. Tazo Small is
                  unavailable through the API; requests receive a fatal
                  model_unavailable error and close code 1008. Contact
                  support@tazolabs.com for assistance.
                required: true
              - name: type
                type: string
                title: Type
                description: session.start
                required: true
              - name: authorization
                type: string
                title: Authorization
                description: >-
                  Bearer API key or access token. Send in session.start within
                  five seconds of connecting; authentication is checked again
                  when a new turn starts.
                required: true
              - name: input_audio
                type: object
                title: StreamAudioFormat
                description: >-
                  Source audio declaration, fixed for the connection. PCM16
                  supports integer rates from 8000 to 48000 Hz. G.711 mulaw and
                  alaw require an explicit 8000 Hz rate. The server decodes and
                  resamples to mono 16 kHz internally; raw input cannot be
                  autodetected.
                required: false
                properties:
                  - name: encoding
                    type: string
                    title: Encoding
                    enumValues:
                      - pcm_s16le
                      - mulaw
                      - alaw
                    required: false
                  - name: sample_rate_hz
                    type: integer
                    title: Sample Rate Hz
                    required: false
                  - name: channels
                    type: integer
                    title: Channels
                    description: 1
                    required: false
              - name: evaluation_interval_ms
                type: integer
                title: Evaluation Interval Ms
                description: >-
                  Evaluation interval in milliseconds. The server default is
                  1000; inference speed also affects response timing.
                required: false
              - name: audio_scope
                type: string
                title: Audio Scope
                description: >-
                  chunk evaluates new audio only; turn evaluates all audio in
                  the current turn.
                enumValues:
                  - turn
                  - chunk
                required: false
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          description: >-
            Request text uses the account's character limit (1,000 by default);
            see the Limits guide. Exceeding it returns fatal
            request_text_too_long and closes with code 1008.
          properties:
            model:
              default: tazo-large
              minLength: 1
              title: Model
              type: string
              x-parser-schema-id: <anonymous-schema-1>
            state:
              anyOf:
                - type: string
                  x-parser-schema-id: <anonymous-schema-3>
                - additionalProperties: true
                  type: object
                  x-parser-schema-id: <anonymous-schema-4>
                - items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-6>
                  type: array
                  x-parser-schema-id: <anonymous-schema-5>
              title: State
              x-parser-schema-id: <anonymous-schema-2>
            questions:
              additionalProperties:
                oneOf:
                  - &ref_0
                    additionalProperties: false
                    properties:
                      type:
                        const: choice
                        title: Type
                        type: string
                        x-parser-schema-id: <anonymous-schema-9>
                      instructions:
                        anyOf:
                          - type: string
                            x-parser-schema-id: <anonymous-schema-11>
                          - additionalProperties: true
                            type: object
                            x-parser-schema-id: <anonymous-schema-12>
                          - items:
                              type: string
                              x-parser-schema-id: <anonymous-schema-14>
                            type: array
                            x-parser-schema-id: <anonymous-schema-13>
                        title: Instructions
                        x-parser-schema-id: <anonymous-schema-10>
                      criteria:
                        additionalProperties:
                          anyOf:
                            - type: string
                              x-parser-schema-id: <anonymous-schema-17>
                            - additionalProperties: true
                              type: object
                              x-parser-schema-id: <anonymous-schema-18>
                            - items:
                                type: string
                                x-parser-schema-id: <anonymous-schema-20>
                              type: array
                              x-parser-schema-id: <anonymous-schema-19>
                            - type: 'null'
                              x-parser-schema-id: <anonymous-schema-21>
                          x-parser-schema-id: <anonymous-schema-16>
                        maxProperties: 255
                        minProperties: 2
                        title: Criteria
                        type: object
                        x-parser-schema-id: <anonymous-schema-15>
                    required:
                      - type
                      - instructions
                      - criteria
                    title: ChoiceQuestion
                    type: object
                    x-parser-schema-id: ChoiceQuestion
                  - &ref_1
                    additionalProperties: false
                    properties:
                      type:
                        const: noul
                        title: Type
                        type: string
                        x-parser-schema-id: <anonymous-schema-22>
                      instructions:
                        anyOf:
                          - type: string
                            x-parser-schema-id: <anonymous-schema-24>
                          - additionalProperties: true
                            type: object
                            x-parser-schema-id: <anonymous-schema-25>
                          - items:
                              type: string
                              x-parser-schema-id: <anonymous-schema-27>
                            type: array
                            x-parser-schema-id: <anonymous-schema-26>
                        title: Instructions
                        x-parser-schema-id: <anonymous-schema-23>
                      criteria:
                        anyOf:
                          - additionalProperties:
                              anyOf:
                                - type: string
                                  x-parser-schema-id: <anonymous-schema-31>
                                - additionalProperties: true
                                  type: object
                                  x-parser-schema-id: <anonymous-schema-32>
                                - items:
                                    type: string
                                    x-parser-schema-id: <anonymous-schema-34>
                                  type: array
                                  x-parser-schema-id: <anonymous-schema-33>
                                - type: 'null'
                                  x-parser-schema-id: <anonymous-schema-35>
                              x-parser-schema-id: <anonymous-schema-30>
                            type: object
                            x-parser-schema-id: <anonymous-schema-29>
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-36>
                        default: null
                        title: Criteria
                        x-parser-schema-id: <anonymous-schema-28>
                    required:
                      - type
                      - instructions
                    title: NoulQuestion
                    type: object
                    x-parser-schema-id: NoulQuestion
                x-parser-schema-id: <anonymous-schema-8>
              maxProperties: 1
              minProperties: 1
              title: Questions
              type: object
              description: >-
                Exactly one question. Use Tazo Large. Tazo Small is unavailable
                through the API; requests receive a fatal model_unavailable
                error and close code 1008. Contact support@tazolabs.com for
                assistance.
              x-parser-schema-id: <anonymous-schema-7>
            type:
              const: session.start
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-37>
            authorization:
              format: password
              title: Authorization
              type: string
              writeOnly: true
              description: >-
                Bearer API key or access token. Send in session.start within
                five seconds of connecting; authentication is checked again when
                a new turn starts.
              x-parser-schema-id: <anonymous-schema-38>
            input_audio: &ref_2
              additionalProperties: false
              description: >-
                Source audio declaration, fixed for the connection. PCM16
                supports integer rates from 8000 to 48000 Hz. G.711 mulaw and
                alaw require an explicit 8000 Hz rate. The server decodes and
                resamples to mono 16 kHz internally; raw input cannot be
                autodetected.
              properties:
                encoding:
                  enum:
                    - pcm_s16le
                    - mulaw
                    - alaw
                  default: pcm_s16le
                  title: Encoding
                  type: string
                  x-parser-schema-id: <anonymous-schema-39>
                sample_rate_hz:
                  minimum: 8000
                  maximum: 48000
                  default: 16000
                  title: Sample Rate Hz
                  type: integer
                  x-parser-schema-id: <anonymous-schema-40>
                channels:
                  const: 1
                  default: 1
                  title: Channels
                  type: integer
                  x-parser-schema-id: <anonymous-schema-41>
              title: StreamAudioFormat
              type: object
              oneOf:
                - properties:
                    encoding:
                      const: pcm_s16le
                  x-parser-schema-id: <anonymous-schema-42>
                - required:
                    - encoding
                    - sample_rate_hz
                  properties:
                    encoding:
                      enum:
                        - mulaw
                        - alaw
                    sample_rate_hz:
                      const: 8000
                  x-parser-schema-id: <anonymous-schema-43>
              x-parser-schema-id: StreamAudioFormat
            evaluation_interval_ms:
              anyOf:
                - maximum: 30000
                  minimum: 250
                  type: integer
                  x-parser-schema-id: <anonymous-schema-45>
                - type: 'null'
                  x-parser-schema-id: <anonymous-schema-46>
              default: null
              title: Evaluation Interval Ms
              description: >-
                Evaluation interval in milliseconds. The server default is 1000;
                inference speed also affects response timing.
              x-parser-schema-id: <anonymous-schema-44>
            audio_scope:
              default: chunk
              enum:
                - turn
                - chunk
              title: Audio Scope
              type: string
              description: >-
                chunk evaluates new audio only; turn evaluates all audio in the
                current turn.
              x-parser-schema-id: <anonymous-schema-47>
          required:
            - state
            - questions
            - type
            - authorization
          title: SessionStart
          type: object
          x-parser-schema-id: SessionStart
        title: session.start
        description: >-
          Authenticate and configure the session. Wait for session.ready before
          sending audio.
        example: |-
          {
            "type": "session.start",
            "authorization": "Bearer YOUR_API_KEY",
            "model": "tazo-large",
            "audio_scope": "chunk",
            "evaluation_interval_ms": 1000,
            "state": {
              "context": "Choose the tool matching the spoken request."
            },
            "questions": {
              "action": {
                "type": "choice",
                "instructions": "Which action should be taken?",
                "criteria": {
                  "NO_TOOL": "Respond directly without calling a tool.",
                  "get_weather": "Get weather for a city."
                }
              }
            },
            "input_audio": {
              "encoding": "pcm_s16le",
              "sample_rate_hz": 16000,
              "channels": 1
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sessionStart
      - &ref_16
        id: audio
        contentType: application/octet-stream
        payload:
          - type: string
            format: binary
            minLength: 1
            maxLength: 19200
            x-parser-schema-id: <anonymous-schema-48>
            name: Binary audio
            description: >-
              Send raw mono audio matching session.start.input_audio after
              session.ready.
        headers: []
        jsonPayloadSchema:
          type: string
          format: binary
          minLength: 1
          maxLength: 19200
          x-parser-schema-id: <anonymous-schema-48>
        title: Binary audio
        description: >-
          Send raw mono audio matching session.start.input_audio after
          session.ready.
        example: '{}'
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: audio
      - &ref_17
        id: sessionUpdate
        contentType: application/json
        payload:
          - name: session.update
            description: >-
              Between turns, replace both state and questions. Wait for
              session.updated before sending audio.
            type: object
            properties:
              - name: type
                type: string
                title: Type
                description: session.update
                required: true
              - name: state
                type: anyOf
                title: State
                required: true
              - name: questions
                type: object
                title: Questions
                required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          description: >-
            The session.start text limit applies. Exceeding it returns nonfatal
            request_text_too_long and preserves the previous configuration and
            revision.
          properties:
            type:
              const: session.update
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-49>
            state:
              anyOf:
                - type: string
                  x-parser-schema-id: <anonymous-schema-51>
                - additionalProperties: true
                  type: object
                  x-parser-schema-id: <anonymous-schema-52>
                - items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-54>
                  type: array
                  x-parser-schema-id: <anonymous-schema-53>
              title: State
              x-parser-schema-id: <anonymous-schema-50>
            questions:
              additionalProperties:
                oneOf:
                  - *ref_0
                  - *ref_1
                x-parser-schema-id: <anonymous-schema-56>
              maxProperties: 1
              minProperties: 1
              title: Questions
              type: object
              x-parser-schema-id: <anonymous-schema-55>
          required:
            - type
            - state
            - questions
          title: SessionUpdate
          type: object
          x-parser-schema-id: SessionUpdate
        title: session.update
        description: >-
          Between turns, replace both state and questions. Wait for
          session.updated before sending audio.
        example: |-
          {
            "type": "session.update",
            "state": {
              "context": "Choose the tool matching the spoken request."
            },
            "questions": {
              "action": {
                "type": "choice",
                "instructions": "Which action should be taken?",
                "criteria": {
                  "NO_TOOL": "Respond directly without calling a tool.",
                  "get_weather": "Get weather for a city."
                }
              }
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sessionUpdate
      - &ref_18
        id: inputCommit
        contentType: application/json
        payload:
          - name: input.commit
            description: >-
              Complete the current turn. Wait for decision.finalized before
              sending more audio.
            type: object
            properties:
              - name: type
                type: string
                title: Type
                description: input.commit
                required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            type:
              const: input.commit
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-57>
          required:
            - type
          title: InputCommit
          type: object
          x-parser-schema-id: InputCommit
        title: input.commit
        description: >-
          Complete the current turn. Wait for decision.finalized before sending
          more audio.
        example: |-
          {
            "type": "input.commit"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: inputCommit
      - &ref_19
        id: inputFinish
        contentType: application/json
        payload:
          - name: input.finish
            description: Complete pending audio and close the session.
            type: object
            properties:
              - name: type
                type: string
                title: Type
                description: input.finish
                required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            type:
              const: input.finish
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-58>
          required:
            - type
          title: InputFinish
          type: object
          x-parser-schema-id: InputFinish
        title: input.finish
        description: Complete pending audio and close the session.
        example: |-
          {
            "type": "input.finish"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: inputFinish
    bindings: []
    extensions: &ref_6
      - id: x-parser-unique-object-id
        value: decisions
  - &ref_7
    id: receiveFromTazo
    title: Receive from Tazo
    type: receive
    messages:
      - &ref_9
        id: sessionReady
        contentType: application/json
        payload:
          - name: session.ready
            description: >-
              The session is ready. Read the effective audio format, interval,
              scope, and limits.
            type: object
            properties:
              - name: session_id
                type: string
                title: Session Id
                required: true
              - name: sequence
                type: integer
                title: Sequence
                required: true
              - name: type
                type: string
                title: Type
                description: session.ready
                required: true
              - name: model
                type: string
                title: Model
                required: true
              - name: config_revision
                type: integer
                title: Config Revision
                required: true
              - name: input_audio
                type: object
                title: StreamAudioFormat
                description: >-
                  Source audio declaration, fixed for the connection. PCM16
                  supports integer rates from 8000 to 48000 Hz. G.711 mulaw and
                  alaw require an explicit 8000 Hz rate. The server decodes and
                  resamples to mono 16 kHz internally; raw input cannot be
                  autodetected.
                required: true
                properties:
                  - name: encoding
                    type: string
                    title: Encoding
                    enumValues:
                      - pcm_s16le
                      - mulaw
                      - alaw
                    required: false
                  - name: sample_rate_hz
                    type: integer
                    title: Sample Rate Hz
                    required: false
                  - name: channels
                    type: integer
                    title: Channels
                    description: 1
                    required: false
              - name: evaluation_interval_ms
                type: integer
                title: Evaluation Interval Ms
                required: true
              - name: max_turn_audio_ms
                type: integer
                title: Max Turn Audio Ms
                description: >-
                  Null for continuous chunk streams; otherwise the maximum audio
                  duration per turn.
                required: true
              - name: max_audio_message_bytes
                type: integer
                title: Max Audio Message Bytes
                required: true
              - name: audio_scope
                type: string
                title: Audio Scope
                enumValues:
                  - turn
                  - chunk
                required: false
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            session_id:
              title: Session Id
              type: string
              x-parser-schema-id: <anonymous-schema-59>
            sequence:
              minimum: 1
              title: Sequence
              type: integer
              x-parser-schema-id: <anonymous-schema-60>
            type:
              const: session.ready
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-61>
            model:
              title: Model
              type: string
              x-parser-schema-id: <anonymous-schema-62>
            config_revision:
              minimum: 1
              title: Config Revision
              type: integer
              x-parser-schema-id: <anonymous-schema-63>
            input_audio: *ref_2
            evaluation_interval_ms:
              exclusiveMinimum: 0
              title: Evaluation Interval Ms
              type: integer
              x-parser-schema-id: <anonymous-schema-64>
            max_turn_audio_ms:
              anyOf:
                - exclusiveMinimum: 0
                  type: integer
                  x-parser-schema-id: <anonymous-schema-66>
                - type: 'null'
                  x-parser-schema-id: <anonymous-schema-67>
              title: Max Turn Audio Ms
              description: >-
                Null for continuous chunk streams; otherwise the maximum audio
                duration per turn.
              x-parser-schema-id: <anonymous-schema-65>
            max_audio_message_bytes:
              exclusiveMinimum: 0
              title: Max Audio Message Bytes
              type: integer
              x-parser-schema-id: <anonymous-schema-68>
            audio_scope:
              default: chunk
              enum:
                - turn
                - chunk
              title: Audio Scope
              type: string
              x-parser-schema-id: <anonymous-schema-69>
          required:
            - session_id
            - sequence
            - type
            - model
            - config_revision
            - input_audio
            - evaluation_interval_ms
            - max_turn_audio_ms
            - max_audio_message_bytes
          title: SessionReady
          type: object
          x-parser-schema-id: SessionReady
        title: session.ready
        description: >-
          The session is ready. Read the effective audio format, interval,
          scope, and limits.
        example: |-
          {
            "type": "session.ready",
            "session_id": "ses_example",
            "sequence": 1,
            "model": "tazo-large",
            "config_revision": 1,
            "input_audio": {
              "encoding": "pcm_s16le",
              "sample_rate_hz": 16000,
              "channels": 1
            },
            "evaluation_interval_ms": 1000,
            "max_turn_audio_ms": null,
            "max_audio_message_bytes": 6400,
            "audio_scope": "chunk"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sessionReady
      - &ref_10
        id: sessionUpdated
        contentType: application/json
        payload:
          - name: session.updated
            description: The replacement context and question were accepted.
            type: object
            properties:
              - name: session_id
                type: string
                title: Session Id
                required: true
              - name: sequence
                type: integer
                title: Sequence
                required: true
              - name: type
                type: string
                title: Type
                description: session.updated
                required: true
              - name: config_revision
                type: integer
                title: Config Revision
                required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            session_id:
              title: Session Id
              type: string
              x-parser-schema-id: <anonymous-schema-70>
            sequence:
              minimum: 1
              title: Sequence
              type: integer
              x-parser-schema-id: <anonymous-schema-71>
            type:
              const: session.updated
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-72>
            config_revision:
              minimum: 1
              title: Config Revision
              type: integer
              x-parser-schema-id: <anonymous-schema-73>
          required:
            - session_id
            - sequence
            - type
            - config_revision
          title: SessionUpdated
          type: object
          x-parser-schema-id: SessionUpdated
        title: session.updated
        description: The replacement context and question were accepted.
        example: |-
          {
            "type": "session.updated",
            "session_id": "ses_example",
            "sequence": 4,
            "config_revision": 2
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sessionUpdated
      - &ref_11
        id: decisionUpdated
        contentType: application/json
        payload:
          - allOf: &ref_3
              - &ref_4
                additionalProperties: false
                properties:
                  session_id:
                    title: Session Id
                    type: string
                    x-parser-schema-id: <anonymous-schema-75>
                  sequence:
                    minimum: 1
                    title: Sequence
                    type: integer
                    x-parser-schema-id: <anonymous-schema-76>
                  id:
                    pattern: ^dec_[A-Za-z0-9_-]+$
                    title: Id
                    type: string
                    x-parser-schema-id: <anonymous-schema-77>
                  model:
                    title: Model
                    type: string
                    x-parser-schema-id: <anonymous-schema-78>
                  answers:
                    additionalProperties:
                      oneOf:
                        - additionalProperties: false
                          properties:
                            type:
                              const: choice
                              title: Type
                              type: string
                              x-parser-schema-id: <anonymous-schema-81>
                            choice:
                              title: Choice
                              type: string
                              x-parser-schema-id: <anonymous-schema-82>
                            probabilities:
                              additionalProperties:
                                type: number
                                x-parser-schema-id: <anonymous-schema-84>
                              title: Probabilities
                              type: object
                              x-parser-schema-id: <anonymous-schema-83>
                            confidence:
                              maximum: 1
                              minimum: 0
                              title: Confidence
                              type: number
                              x-parser-schema-id: <anonymous-schema-85>
                          required:
                            - type
                            - choice
                            - probabilities
                            - confidence
                          title: ChoiceAnswer
                          type: object
                          x-parser-schema-id: ChoiceAnswer
                        - additionalProperties: false
                          properties:
                            type:
                              const: noul
                              title: Type
                              type: string
                              x-parser-schema-id: <anonymous-schema-86>
                            noul:
                              maximum: 1
                              minimum: 0
                              title: Noul
                              type: number
                              x-parser-schema-id: <anonymous-schema-87>
                          required:
                            - type
                            - noul
                          title: NoulAnswer
                          type: object
                          x-parser-schema-id: NoulAnswer
                      x-parser-schema-id: <anonymous-schema-80>
                    minProperties: 1
                    title: Answers
                    type: object
                    x-parser-schema-id: <anonymous-schema-79>
                  usage:
                    additionalProperties: false
                    properties:
                      audio_seconds:
                        minimum: 0
                        title: Audio Seconds
                        type: number
                        x-parser-schema-id: <anonymous-schema-88>
                      input_tokens:
                        anyOf:
                          - minimum: 0
                            type: integer
                            x-parser-schema-id: <anonymous-schema-90>
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-91>
                        default: null
                        title: Input Tokens
                        x-parser-schema-id: <anonymous-schema-89>
                      output_tokens:
                        anyOf:
                          - minimum: 0
                            type: integer
                            x-parser-schema-id: <anonymous-schema-93>
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-94>
                        default: null
                        title: Output Tokens
                        x-parser-schema-id: <anonymous-schema-92>
                    required:
                      - audio_seconds
                    title: Usage
                    type: object
                    x-parser-schema-id: Usage
                  elapsed_ms:
                    minimum: 0
                    title: Elapsed Ms
                    type: number
                    x-parser-schema-id: <anonymous-schema-95>
                  type:
                    enum:
                      - decision.updated
                      - decision.finalized
                    title: Type
                    type: string
                    x-parser-schema-id: <anonymous-schema-96>
                  turn_id:
                    title: Turn Id
                    type: string
                    x-parser-schema-id: <anonymous-schema-97>
                  config_revision:
                    minimum: 1
                    title: Config Revision
                    type: integer
                    x-parser-schema-id: <anonymous-schema-98>
                  audio_start_ms:
                    default: 0
                    minimum: 0
                    title: Audio Start Ms
                    type: number
                    x-parser-schema-id: <anonymous-schema-99>
                  audio_end_ms:
                    minimum: 0
                    title: Audio End Ms
                    type: number
                    x-parser-schema-id: <anonymous-schema-100>
                required:
                  - session_id
                  - sequence
                  - id
                  - model
                  - answers
                  - usage
                  - elapsed_ms
                  - type
                  - turn_id
                  - config_revision
                  - audio_end_ms
                title: StreamDecisionEvent
                type: object
                x-parser-schema-id: StreamDecisionEvent
              - type: object
                properties:
                  type:
                    const: decision.updated
                    x-parser-schema-id: <anonymous-schema-102>
                x-parser-schema-id: <anonymous-schema-101>
            x-parser-schema-id: <anonymous-schema-74>
            name: decision.updated
            description: >-
              A decision for the reported audio range while audio continues
              arriving.
        headers: []
        jsonPayloadSchema:
          allOf: *ref_3
          x-parser-schema-id: <anonymous-schema-74>
        title: decision.updated
        description: >-
          A decision for the reported audio range while audio continues
          arriving.
        example: |-
          {
            "type": "decision.updated",
            "session_id": "ses_example",
            "sequence": 2,
            "turn_id": "turn_1",
            "config_revision": 1,
            "id": "dec_example",
            "model": "tazo-large",
            "audio_start_ms": 0,
            "audio_end_ms": 500,
            "answers": {
              "action": {
                "type": "choice",
                "choice": "get_weather",
                "probabilities": {
                  "NO_TOOL": 0.08,
                  "get_weather": 0.92
                },
                "confidence": 0.92
              }
            },
            "usage": {
              "audio_seconds": 0.5
            },
            "elapsed_ms": 52
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: decisionUpdated
      - &ref_12
        id: decisionFinalized
        contentType: application/json
        payload:
          - allOf: &ref_5
              - *ref_4
              - type: object
                properties:
                  type:
                    const: decision.finalized
                    x-parser-schema-id: <anonymous-schema-105>
                x-parser-schema-id: <anonymous-schema-104>
            x-parser-schema-id: <anonymous-schema-103>
            name: decision.finalized
            description: >-
              The turn is complete. In chunk mode this is the last chunk result,
              not a summary of the turn.
        headers: []
        jsonPayloadSchema:
          allOf: *ref_5
          x-parser-schema-id: <anonymous-schema-103>
        title: decision.finalized
        description: >-
          The turn is complete. In chunk mode this is the last chunk result, not
          a summary of the turn.
        example: |-
          {
            "type": "decision.finalized",
            "session_id": "ses_example",
            "sequence": 3,
            "turn_id": "turn_1",
            "config_revision": 1,
            "id": "dec_example",
            "model": "tazo-large",
            "audio_start_ms": 0,
            "audio_end_ms": 500,
            "answers": {
              "action": {
                "type": "choice",
                "choice": "get_weather",
                "probabilities": {
                  "NO_TOOL": 0.08,
                  "get_weather": 0.92
                },
                "confidence": 0.92
              }
            },
            "usage": {
              "audio_seconds": 0.5
            },
            "elapsed_ms": 52
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: decisionFinalized
      - &ref_13
        id: sessionClosed
        contentType: application/json
        payload:
          - name: session.closed
            description: The server is closing the session after input.finish.
            type: object
            properties:
              - name: session_id
                type: string
                title: Session Id
                required: true
              - name: sequence
                type: integer
                title: Sequence
                required: true
              - name: type
                type: string
                title: Type
                description: session.closed
                required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            session_id:
              title: Session Id
              type: string
              x-parser-schema-id: <anonymous-schema-106>
            sequence:
              minimum: 1
              title: Sequence
              type: integer
              x-parser-schema-id: <anonymous-schema-107>
            type:
              const: session.closed
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-108>
          required:
            - session_id
            - sequence
            - type
          title: SessionClosed
          type: object
          x-parser-schema-id: SessionClosed
        title: session.closed
        description: The server is closing the session after input.finish.
        example: |-
          {
            "type": "session.closed",
            "session_id": "ses_example",
            "sequence": 4
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: sessionClosed
      - &ref_14
        id: error
        contentType: application/json
        payload:
          - name: error
            description: An error occurred. A fatal error closes the connection.
            type: object
            properties:
              - name: type
                type: string
                title: Type
                description: error
                required: true
              - name: session_id
                type: string
                title: Session Id
                required: false
              - name: sequence
                type: integer
                title: Sequence
                required: false
              - name: error
                type: object
                title: StreamErrorDetail
                required: true
                properties:
                  - name: code
                    type: string
                    title: Code
                    required: true
                  - name: message
                    type: string
                    title: Message
                    required: true
              - name: fatal
                type: boolean
                title: Fatal
                required: true
        headers: []
        jsonPayloadSchema:
          additionalProperties: false
          properties:
            type:
              const: error
              title: Type
              type: string
              x-parser-schema-id: <anonymous-schema-109>
            session_id:
              anyOf:
                - type: string
                  x-parser-schema-id: <anonymous-schema-111>
                - type: 'null'
                  x-parser-schema-id: <anonymous-schema-112>
              default: null
              title: Session Id
              x-parser-schema-id: <anonymous-schema-110>
            sequence:
              anyOf:
                - minimum: 1
                  type: integer
                  x-parser-schema-id: <anonymous-schema-114>
                - type: 'null'
                  x-parser-schema-id: <anonymous-schema-115>
              default: null
              title: Sequence
              x-parser-schema-id: <anonymous-schema-113>
            error:
              additionalProperties: false
              properties:
                code:
                  title: Code
                  type: string
                  x-parser-schema-id: <anonymous-schema-116>
                message:
                  title: Message
                  type: string
                  x-parser-schema-id: <anonymous-schema-117>
              required:
                - code
                - message
              title: StreamErrorDetail
              type: object
              x-parser-schema-id: StreamErrorDetail
            fatal:
              title: Fatal
              type: boolean
              x-parser-schema-id: <anonymous-schema-118>
          required:
            - type
            - error
            - fatal
          title: StreamError
          type: object
          x-parser-schema-id: StreamError
        title: Error
        description: An error occurred. A fatal error closes the connection.
        example: |-
          {
            "type": "error",
            "session_id": "ses_example",
            "sequence": 3,
            "fatal": true,
            "error": {
              "code": "turn_too_long",
              "message": "The turn exceeds its audio limit; commit before sending more."
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: error
    bindings: []
    extensions: *ref_6
sendOperations:
  - *ref_7
receiveOperations:
  - *ref_8
sendMessages:
  - *ref_9
  - *ref_10
  - *ref_11
  - *ref_12
  - *ref_13
  - *ref_14
receiveMessages:
  - *ref_15
  - *ref_16
  - *ref_17
  - *ref_18
  - *ref_19
extensions:
  - id: x-parser-unique-object-id
    value: decisions
securitySchemes: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.