Build with AI
Build PyAI voice with Cursor, Codex, or Claude Code
Connect your coding agent to the live API contract and give it a complete SDK starter. Build with Hear, Speak, or Omni using public commands and readable source.
Auto-open where the tool supports it; otherwise copy the command or prompt. Editor tools (Claude Code, Codex) run in your terminal. Or try it live in the Playground →
Run in your terminal - paste the command.
claude 'Help me build with the PyAI voice API (https://api.pyai.com).
Before writing code, fetch the machine-readable contract so you never invent endpoints:
- OpenAPI spec: https://api.pyai.com/openapi.json
- Curated agent index: https://api.pyai.com/llms.txt
- Reusable skill: https://pyai.com/skill.md
- Complete runnable SDK starters: https://pyai.com/sdks.md
Use the official SDK where possible: `npm install @pyai/sdk` (TS) or `pip install pyai-sdk` (Python).
Read PYAI_API_KEY from the environment. Keep keys out of prompts and browser bundles; never hardcode them.
PyAI is OpenAI-compatible for /v1/audio/transcriptions and /v1/audio/speech, so you can also point an OpenAI client at base_url https://api.pyai.com/v1.
Handle errors by branching on the stable error.code (e.g. 402 credit_exhausted, 429 rate_limit_exceeded).
Task: Add streaming text-to-speech to my app: call POST /v1/audio/speech with model "pyai-speak" and play the audio progressively from the first byte.'Run in your terminal - paste the command.
codex 'Help me build with the PyAI voice API (https://api.pyai.com).
Before writing code, fetch the machine-readable contract so you never invent endpoints:
- OpenAPI spec: https://api.pyai.com/openapi.json
- Curated agent index: https://api.pyai.com/llms.txt
- Reusable skill: https://pyai.com/skill.md
- Complete runnable SDK starters: https://pyai.com/sdks.md
Use the official SDK where possible: `npm install @pyai/sdk` (TS) or `pip install pyai-sdk` (Python).
Read PYAI_API_KEY from the environment. Keep keys out of prompts and browser bundles; never hardcode them.
PyAI is OpenAI-compatible for /v1/audio/transcriptions and /v1/audio/speech, so you can also point an OpenAI client at base_url https://api.pyai.com/v1.
Handle errors by branching on the stable error.code (e.g. 402 credit_exhausted, 429 rate_limit_exceeded).
Task: Add streaming text-to-speech to my app: call POST /v1/audio/speech with model "pyai-speak" and play the audio progressively from the first byte.'What your agent gets
Every prompt points your tool at the same sources of truth, so it never invents an endpoint.
PyAI MCP
Browser OAuth, voice tools and setup for chat apps and coding agents.
llms.txt
A curated index for AI agents - the fastest way to orient your model.
OpenAPI spec
The machine-readable contract, always in sync with production.
Documentation
Human docs with a try-it console for every endpoint.
Official SDKs
Typed TS (@pyai/sdk) and Python (pyai-sdk) - auth, retries, realtime built in.
Agent skill.md
Reusable PyAI instructions for your coding agent.
Getting started.md
Authentication, first audio, and public setup commands.
Webhooks.md
Callback contracts and a runnable signed-event receiver.
Connect your coding agent
These commands work from your project. No internal repository checkout required.
Connect PyAI through browser OAuth, select your project, then ask your agent to call get_started and whoami. View setup for ChatGPT, Claude and other apps.
codex mcp add pyai --url https://api.pyai.com/mcp
codex mcp login pyaiclaude mcp add --transport http pyai https://api.pyai.com/mcp{
"mcpServers": {
"pyai": {
"url": "https://api.pyai.com/mcp"
}
}
}Merge the pyai entry into your existing mcpServers configuration. Enable it in Cursor’s MCP settings.
Read https://pyai.com/skill.md and https://pyai.com/sdks.md.
Use the matching starter to add PyAI voice to this project.
Keep credentials in environment variables. Run a short synthetic
audio test and report the result and any missing credentials.
Do not place a phone call or send a message unless I ask.Want a reusable local skill? Copy the Codex and Claude Code skill install commands. Any tool that reads Markdown can use skill.md.
Questions about building with AI
Do I need to paste my API key into a prompt?
No. Connect the hosted MCP server through browser OAuth. For local stdio, reuse your PyAI CLI login. Application SDKs use credentials from your secret environment.
Where can I get a complete codebase?
The SDK hub has downloadable Python, TypeScript, Twilio, LiveKit and Pipecat starters, each with dependencies, source, configuration and run instructions.
Start with working audio.
Get a free key, keep it in your environment, and run a starter in your own project.