From a key to working audio
PyAI Hear transcribes audio, Speak synthesizes speech, and Omni runs a complete voice-agent conversation. Start with your existing language or framework.Get a key
Create a key in PyAI Console. For a bounded test, you can also request a sandbox key:api_key private. Sandbox keys expire and have usage and
concurrency limits. Store your key as PYAI_API_KEY in a local .env file
excluded from Git, or in your deployment’s secret store. Never put a live key
in client-side JavaScript or paste it into a coding-agent prompt.
Make a first call
WithPYAI_API_KEY exported in your shell, save a speech file:
Download a complete starter
Every starter includes the entry point, dependencies,.env.example, and run
instructions. These download URLs do not require access to an internal repo.
Python and TypeScript exercise Speak and optionally Hear. The LiveKit starter
tests its TTS adapter without a room; the Pipecat starter runs a text-to-audio
pipeline. Their detailed guides cover conversational agents. Twilio requires
your phone number, auth token, and a public HTTPS server or tunnel.
Connect a coding agent
Install Node.js 22+ and your chosen coding agent first. These commands register PyAI’s local stdio MCP server; they do not create a production key. Claude Code:.cursor/mcp.json, preserving existing servers:
get_started. For a sandbox test, ask it to call create_sandbox_key once
and then list_voices. Tool execution follows your coding agent’s permissions.
Paste this task into your agent: