Skip to main content
The four customer-facing resources, shared by Tazo and AsyncTazo.

Decisions

Uploaded and streaming audio decisions.
  • Parameters: http (HTTPClient)

create()

Upload audio and wait for a typed decision.
  • Parameters:
    • audio (str |PathLike[str] | bytes *|*BinaryIO) – Path, bytes, or a binary stream. Streams are read from their current position; seekable streams are restored and never closed.
    • state (str |dict[str, Any*]* | list*[str]*) – Shared context as a string, object, or list of strings.
    • questions (Mapping*[str,* ChoiceQuestion |NoulQuestion |ChoiceQuestionParam |NoulQuestionParam]) – Question-ID map of choice/noul dictionaries or typed models.
    • model (str) – Public model ID. Defaults to tazo-large.
    • idempotency_key (str *|*None) – Retained operation key, or None to generate a new one. Every automatic retry reuses the same key and upload snapshot.
    • filename (str *|*None) – Optional name for bytes or file objects.
    • content_type (str *|*None) – Optional MIME type; otherwise inferred from filename.
  • Returns: Typed result, including request_id and idempotency_key SDK metadata.
  • Raises:
    • DecisionPendingError – Work continues after the retry budget is exhausted.
    • TazoError – Authentication, validation, transport, or service failure.
  • Return type: DecisionResponse

stream()

Create a context-managed session for one question and multiple turns.
  • Parameters:
    • state (str |dict[str, Any*]* | list*[str]*) – Context for the decision.
    • questions (Mapping*[str,* ChoiceQuestion |NoulQuestion |ChoiceQuestionParam |NoulQuestionParam]) – Exactly one choice or noul question.
    • model (str) – Public model ID; the model’s advertised capabilities apply.
    • audio_scope (Literal*[‘turn’,* ‘chunk’**]) – chunk (default) evaluates new audio; turn evaluates cumulative audio.
    • evaluation_interval_ms (int *|*None) – Integer from 250 to 30000, or server default.
    • event_timeout (float) – Maximum seconds waiting for each server event.
  • Returns: A StreamingSession; entering it authenticates and waits for readiness.
  • Return type: StreamingSession

AsyncDecisions

Native asynchronous upload and WebSocket decisions.
  • Parameters: http (AsyncHTTPClient)

create()

Async counterpart of Decisions.create, with identical input and retry policy. File reads run in a worker thread; HTTP uses native asynchronous I/O. Cancellation does not imply cancellation of accepted server-side work. Retain a caller-supplied key when cancellation recovery is required.

stream()

Create an async context manager; use async for to receive typed events. Parameters match Decisions.stream. This method isn’t awaited; use async with client.decisions.stream(...) as session.

Models

Discover public models and their capabilities.
  • Parameters: http (HTTPClient)

list()

Return current models, capabilities, and readiness.

AsyncModels

Asynchronous model discovery.
  • Parameters: http (AsyncHTTPClient)

list()

Return current models, capabilities, and readiness.

Health

Public, unauthenticated model readiness.
  • Parameters: http (HTTPClient)

check()

Return ok or unavailable; the documented HTTP 503 is a health result.

AsyncHealth

Asynchronous, unauthenticated readiness.
  • Parameters: http (AsyncHTTPClient)

check()

Return ok or unavailable, without sending a bearer credential.