Skip to main content
Public client configuration and connection ownership.

Tazo

Synchronous client for the four public Tazo operations.
  • Parameters:
    • api_key (str *|*None) – Bearer credential, or read TAZO_API_KEY. May be omitted for health.
    • base_url (str) – API origin, optionally with a proxy path prefix; no /v1 suffix.
    • timeout (float *|*httpx.Timeout) – Per-network-phase timeout in seconds, or an httpx.Timeout.
    • max_retries (int) – Additional HTTP attempts after the first (default two).
    • operation_timeout (float) – HTTP retry budget in seconds (default 180). Each network phase is capped by the remaining budget. A synchronous in-flight request can outlast this budget across multiple network phases/body chunks.
    • http_client (httpx.Client *|*None) – Optional caller-owned HTTPX client; the SDK will not close it.
Use as a context manager, or call close. Streaming sockets have their own context managers and must be closed before closing this client.

close()

Release the SDK-owned HTTP pool. Safe to call more than once.
  • Return type: None

AsyncTazo

Native async client with the same configuration as Tazo. Await create, list, and check. Use async with for streaming sessions. operation_timeout also enforces an async deadline during each HTTP attempt. Supplied HTTPX clients remain caller-owned.
  • Parameters:
    • api_key (str *|*None)
    • base_url (str)
    • timeout (float *|*httpx.Timeout)
    • max_retries (int)
    • operation_timeout (float)
    • http_client (httpx.AsyncClient *|*None)

close()

Release the SDK-owned HTTP pool.
  • Return type: None

WAV helper

wav_chunks()

Yield raw mono 16 kHz PCM16 from a WAV, without headers or real-time pacing.
  • Parameters:
    • path (str |PathLike[str]) – PCM16 WAV recording. Compressed WAV and other formats are rejected.
    • chunk_ms (int) – Chunk size from 1 to 200 milliseconds.
  • Yields: Binary audio frames suitable for session.send_audio.
  • Return type: Iterator[bytes]