Skip to main content
Official SDKs wrap the same public contract as https://api.pyai.com/openapi.json. They handle bearer auth, multipart uploads, and idempotency helpers. Safe reads can retry transient failures; speech writes are not automatically retried. Raw curl and WebSocket examples in these docs stay valid; use the SDK when you want that plumbing done for you.
Set PYAI_API_KEY from the quickstart. Treat the key as an opaque string. Do not parse or decode it.

What each client covers

clones.get filters GET /v1/voice/clones. The API has no GET-by-id for clones.

When to stay on curl or a raw socket

  • You are proving a key in 30 seconds: POST /v1/sandbox/keys then GET /v1/me.
  • You are integrating a language the official SDKs do not cover.
  • You need the exact Omni binary frames (0x01 audio, 0x02 transcript, 0x03 control). The Omni protocol is the contract.

Framework adapters

Keep LiveKit or Pipecat if those products already own the loop. PyAI is the speech layer only. Those packages do not create or select an Omni agent.

AI coding agents

The PyAI MCP server exposes Hear, Speak, and the voice catalog as tools. Sandbox-key creation is local-only (stdio), requires an explicit request, and is unavailable on hosted HTTP. Reuse the confirmed project when one exists. See Use PyAI in Cursor.

Quickstart

Mint a key and copy a first call in curl, Python, or Node.

Errors and limits

Stable codes, first-call failures, and when not to retry.

Complete runnable starters

Download source, dependencies and environment templates from the SDK hub. Choose Python, TypeScript, Twilio, LiveKit, or Pipecat. Getting started includes copyable Cursor, Codex and Claude Code setup. Webhooks includes a complete receiver. For coding agents, fetch skill.md, getting-started.md, and webhooks.md.