Skip to main content
Requests reject unknown fields. Responses retain additional server fields. Model IDs and advertised question-type names are extensible strings. Score questions are not exposed by this SDK release. Public wire types. Responses preserve additive server fields.

ChoiceQuestionParam

Dictionary input with editor completion for a choice question.

NoulQuestionParam

Dictionary input for a yes/no probability question.

ChoiceQuestion

Select an ID from two or more criteria; model-specific limits still apply.
  • Parameters:
    • type (Literal*[‘choice’]*)
    • instructions (str |dict[str, Any*]* | list*[str]*)
    • criteria (dict*[str,* str |dict[str, Any*]* | list*[str]* | None*]*)

NoulQuestion

Ask for the probability that a statement is true, where supported.
  • Parameters:
    • type (Literal*[‘noul’]*)
    • instructions (str |dict[str, Any*]* | list*[str]*)
    • criteria (dict*[str,* str |dict[str, Any*]* | list*[str]* | None*]* | None)

DecisionRequest

The JSON part of an uploaded decision.
  • Parameters:
    • model (str)
    • state (str |dict[str, Any*]* | list*[str]*)
    • questions (dict*[str,* Annotated*[ChoiceQuestion |NoulQuestion,* FieldInfo*(annotation=NoneType,* required=True*,* discriminator=‘type’)]**])

ChoiceAnswer

Selected choice, full probability distribution, and confidence.
  • Parameters:
    • type (Literal*[‘choice’]*)
    • choice (str)
    • probabilities (dict*[str,* float*]*)
    • confidence (float)
    • extra_data (Any)

NoulAnswer

Probability that the requested statement is true.
  • Parameters:
    • type (Literal*[‘noul’]*)
    • noul (float)
    • extra_data (Any)

Usage

Audio evaluated by this result; cumulative streaming windows overlap.
  • Parameters:
    • audio_seconds (float)
    • input_tokens (int *|*None)
    • output_tokens (int *|*None)
    • extra_data (Any)

DecisionResponse

Decision result with SDK metadata from headers and the submitted operation.
  • Parameters:
    • id (str)
    • model (str)
    • answers (dict*[str,* Annotated*[ChoiceAnswer |NoulAnswer,* FieldInfo*(annotation=NoneType,* required=True*,* discriminator=‘type’)]**])
    • usage (Usage)
    • elapsed_ms (float)
    • request_id (str *|*None)
    • idempotency_key (str *|*None)
    • extra_data (Any)

ModelCapabilities

Capabilities advertised by a model, including future question types.
  • Parameters:
    • question_types (list*[str]*)
    • max_questions (int)
    • max_choice_options (int *|*None)
    • requires_no_tool_choice (bool)
    • max_audio_seconds (float *|*None)
    • required_sample_rate_hz (int *|*None)
    • extra_data (Any)

Model

A public model and its current readiness.
  • Parameters:
    • id (str)
    • display_name (str)
    • description (str)
    • contract (str)
    • capabilities (ModelCapabilities)
    • ready (bool)
    • extra_data (Any)

ModelList

Response from model discovery.
  • Parameters:
    • models (list*[Model]*)
    • extra_data (Any)

HealthStatus

Expected health result, including HTTP 503 when unavailable.
  • Parameters:
    • status (Literal*[‘ok’,* ‘unavailable’**])
    • extra_data (Any)

AudioFormat

Streaming audio format negotiated by the server.
  • Parameters:
    • encoding (Literal*[‘pcm_s16le’]*)
    • sample_rate_hz (Literal*[16000]*)
    • channels (Literal*[1]*)
    • extra_data (Any)

SessionReady

Configuration accepted; available as the session’s ready attribute.
  • Parameters:
    • type (Literal*[‘session.ready’]*)
    • session_id (str)
    • sequence (int)
    • model (str)
    • config_revision (int)
    • input_audio (AudioFormat)
    • evaluation_interval_ms (int)
    • max_turn_audio_ms (int *|*None)
    • max_audio_message_bytes (int)
    • audio_scope (Literal*[‘turn’,* ‘chunk’**])
    • extra_data (Any)

SessionUpdated

Replacement context and question accepted between turns.
  • Parameters:
    • type (Literal*[‘session.updated’]*)
    • session_id (str)
    • sequence (int)
    • config_revision (int)
    • extra_data (Any)

DecisionEvent

Provisional or final decision for the reported audio window.
  • Parameters:
    • id (str)
    • model (str)
    • answers (dict*[str,* Annotated*[ChoiceAnswer |NoulAnswer,* FieldInfo*(annotation=NoneType,* required=True*,* discriminator=‘type’)]**])
    • usage (Usage)
    • elapsed_ms (float)
    • request_id (str *|*None)
    • idempotency_key (str *|*None)
    • type (Literal*[‘decision.updated’,* ‘decision.finalized’**])
    • session_id (str)
    • sequence (int)
    • turn_id (str)
    • config_revision (int)
    • audio_start_ms (float)
    • audio_end_ms (float)
    • extra_data (Any)

SessionClosed

The server finished the session normally.
  • Parameters:
    • type (Literal*[‘session.closed’]*)
    • session_id (str)
    • sequence (int)
    • extra_data (Any)

ErrorEvent

A recoverable error event; fatal errors become StreamingError exceptions.
  • Parameters:
    • type (Literal*[‘error’]*)
    • error (StreamErrorDetail)
    • fatal (bool)
    • session_id (str *|*None)
    • sequence (int *|*None)
    • extra_data (Any)

UnknownEvent

A future event type. Its additional fields are preserved.
  • Parameters:
    • type (str)
    • extra_data (Any)