llms.txt
+63 −79
− # PyAI - telephony-native voice AI− Speech and calling decision tree: https://pyai.com/agents/speech-calling.md− Omni frame contract: https://api.pyai.com/omni-frames.json− Use https://api.pyai.com/mcp with browser OAuth. Setup: https://pyai.com/mcp. Agent handbook: https://pyai.com/mcp-agent-guide.md. Tool schemas: https://pyai.com/mcp-tools.json. Start with `get_started`, `whoami`, and `discover_tools`. Local stdio reuses `pyai login`.− > PyAI is a developer platform for telephony-grade voice AI. Core models behind− > one OpenAI-compatible API: Hear (speech-to-text), Speak (text-to-speech + voice− > cloning), and Omni, the all-in-one voice agent model: a hybrid speech-to-speech− > engine with a fused LLM brain, tool calling, knowledge-base grounding, and− > emotion-aware voices, all over one WebSocket. ~390 ms median voice-to-voice− > in-region (human conversational pace, early measurement, not an SLA).− > Omni is $0.05/min*. Managed telephony is $0.01/min separately. Do not quote− > a combined $0.06/min. $50 in free credits, no card required. All-in lower− > than packaged platforms whose advertised 5-9¢ platform fee lands at 10-31¢− > once you add the LLM and telephony. Not cheapest versus raw models.− - [Dub](https://pyai.com/dub): Asynchronous English-to-Hindi audio dubbing. `POST /v1/dub`, poll `GET /v1/dub/jobs/{job_id}`, then download `/audio` when status is `done`; requires `dub:render`. Hindi is the only enabled target. [Guide](https://docs.pyai.com/guides/dub-overview).− - Get a free key: https://console.pyai.com− - Docs (quickstart, guides, API reference): https://docs.pyai.com− - OpenAPI spec (source of truth): https://api.pyai.com/openapi.json− - Agent index (curated, kept in sync with production): https://api.pyai.com/llms.txt− - SDKs: `npm install @pyai/sdk` (TypeScript) - `pip install pyai-sdk` (Python)− - [CLI overview](https://pyai.com/cli): terminal workflows for speech, transcripts, Dub jobs, and API resources.− - [CLI documentation](https://docs.pyai.com/guides/cli): installation, authentication, shortcuts, JSON output, and project starters.− - [Full CLI handbook (Markdown)](https://pyai.com/cli.md): detailed command reference, cookbook, and troubleshooting.− - [CLI agent guide (Markdown)](https://pyai.com/cli-agent-guide.md): discovery, input/output contracts, bounded waits, and integration handoff.− - [CLI schema snapshot](https://pyai.com/cli-schema.json): machine-readable syntax for this source build; the installed CLI schema is authoritative for the executable in use.− - CLI release: install `npm install -g @pyai/sdk@0.5.0`; use `pyai login` for browser sign-in. CI and unattended agents use an authorized `PYAI_API_KEY`. Discover installed commands with `pyai schema --json`.− - Offline discovery: `pyai schema agents create --json`, `pyai recipes`, and `pyai init voice-project --template agent`. Live API discovery: `pyai schema --openapi --json`.− ## Models− - [Hear](https://pyai.com/hear): Speech-to-text, telephony-native (8 kHz), Whisper-compatible, streaming partials + async batch. `POST /v1/audio/transcriptions`. $0.001/min ($0.0005/min batch). ~200 ms first partial, in-region, revisable.− - [Speak](https://pyai.com/speak): Text-to-speech, streaming first-byte ~53 ms warm / ~98 ms cold in-region, 200 stock voices, free voice cloning + design. `POST /v1/audio/speech`. $0.04/min.− - [Omni](https://pyai.com/omni): The all-in-one voice agent model, hybrid speech-to-speech with a fused LLM brain. One socket does it all: hearing, reasoning, tool/function calling, knowledge-base grounding, emotion-aware voices, built-in call control (transfer, DTMF, hold, end-call), ~390 ms turn-taking in-region, barge-in. `wss://api.pyai.com/v1/omni?format=pcm16&rate=24000`. $0.05/min*. Managed telephony is $0.01/min separately.− - [Agents](https://pyai.com/agents): **Live Beta.** No-code voice agents, tools, transfers, campaigns, and analytics. $0.08/min plus managed telephony. Beta features and limits may change.− - Cue is **unavailable**. Reserved fields are not active on the serving Hear stream and carry no launch promise.− - [AMD](https://pyai.com/amd): Answering-machine detection that tells a dialer who answered (human, voicemail, IVR, iPhone/Google screening, dead number, fax). One-line TwiML Twilio Media Streams drop-in. `wss://api.pyai.com/v1/amd/stream`. First 5,000 answered calls/month free, then $0.004/call.− ## Compare− - [Compare hub](https://pyai.com/compare): PyAI Omni is $0.05/min*. Managed telephony is $0.01/min separately. Packaged platforms land at 10-31¢.− - [PyAI vs Vapi](https://pyai.com/compare/vapi): advertised ~5¢ platform fee lands at 10-31¢ all-in. Alias: /vapi-alternative− - [PyAI vs Retell](https://pyai.com/compare/retell-ai): advertised ~7¢ platform fee lands at 13-31¢ all-in. Alias: /retell-alternative− - [PyAI vs Bland](https://pyai.com/compare/bland-ai): advertised ~9¢ typically lands at 11-14¢ all-in. Alias: /bland-alternative− - [PyAI vs Deepgram](https://pyai.com/compare/deepgram): eight-language OpenAI-compatible STT. Deepgram publishes faster interim latency. Alias: /deepgram-alternative+ # PyAI API+ > Telephony-native Voice AI behind one bearer key. Products: Hear+ > (speech-to-text), Speak (text-to-speech), Clone (custom voices), Omni (agentic+ > full-duplex voice grounded in your knowledge bases and tools), and the AMD API+ > (answering-machine detection: human vs voicemail/IVR/screening/dead-number, in+ > a fraction of the dead-air dwell, with the reason); Agents Beta is the live+ > no-code console path for managed Omni agents. OpenAI-compatible REST at https://api.pyai.com/v1. Keys+ > are self-validating signed tokens that work on every surface the instant they+ > are created, treat them as opaque strings and never parse them.+ Use https://api.pyai.com/mcp with browser OAuth. Setup: https://pyai.com/mcp. Agent guide: https://pyai.com/mcp-agent-guide.md. Call get_started, whoami and discover_tools.+ - Speech and calling decision tree: https://pyai.com/agents/speech-calling.md+ - Omni frame contract: https://api.pyai.com/omni-frames.json (AsyncAPI JSON with SDK notes).+ - Machine status: https://status.pyai.com/status.json+ - OpenAPI spec: https://api.pyai.com/openapi.json (machine-readable contract, source of truth).+ - Docs: https://docs.pyai.com (quickstart, guides, and the generated API reference).+ ## Choose the job+ - Telephony transcription: Hear, not Recap. Recorded audio: https://docs.pyai.com/guides/hear-overview and https://docs.pyai.com/guides/async-transcription-jobs. Live phone audio: https://docs.pyai.com/guides/streaming-stt. Decode G.711 to PCM16 at 8 kHz before streaming; streaming partials are revisable. Check the guide before requesting word timestamps or speaker labels.+ - Streaming TTS for a phone application: Speak POST /v1/audio/speech with stream:true and response_format:g711_ulaw (8 kHz mono), or PCM at a supported sample rate. Consume chunks with backpressure; do not wait for arrayBuffer(). MP3/Opus are buffered. No Calling tool or carrier account is needed to generate audio bytes. Guide: https://docs.pyai.com/guides/speak-overview. Runnable one-request example: https://github.com/atomsai/pyai-examples/tree/main/speak-telephony-formats.+ - LiveKit / Pipecat: keep your existing transport, LLM, tools and turn policy; add Hear and Speak. Follow the framework guides below. Downloadable starters exercise speech adapters, not complete room or microphone agents.+ - Voice agents: Omni runs the conversation over one WebSocket; saved Agents profiles are optional. Guide: https://docs.pyai.com/guides/omni-overview. Browser token broker example: https://github.com/atomsai/pyai-examples/tree/main/omni-browser-widget. Provision telephony only when the user actually requests a carrier call or number.+ - Dubbing: Dub translates an existing recording asynchronously. Read https://api.pyai.com/healthz/dub for independent source_langs and target_langs before choosing languages. Submit once, retain the job ID, poll until done or error, then download. Runnable API workflow: https://docs.pyai.com/guides/dub-overview. Do not infer language support from Speak voices or assume English-to-Hindi only.+ - Examples index: https://github.com/atomsai/pyai-examples. SDK downloads: https://pyai.com/sdks.md.+ - CLI setup and authentication: https://docs.pyai.com/guides/cli. Handbook: https://pyai.com/cli.md. Agent guide: https://pyai.com/cli-agent-guide.md.+ - Use pyai login for browser sign-in; unattended clients use an authorized server-side PYAI_API_KEY. Inspect the saved project before running usage commands.+ - Offline discovery: pyai schema --json, pyai recipes, pyai init voice-project --template agent. Live API discovery: pyai schema --openapi --json. The installed CLI schema is authoritative for that executable; https://pyai.com/cli-schema.json describes the published source snapshot.+ ## Agent frameworks+ - LiveKit Agents (Python): https://docs.pyai.com/guides/livekit-agents. Pinned install, compatibility and downloadable TTS adapter starter: https://pyai.com/sdks/livekit.md.+ - Pipecat (Python): https://docs.pyai.com/guides/pipecat. Pinned install, compatibility and downloadable text-to-WAV pipeline: https://pyai.com/sdks/pipecat.md.+ - Both packages are available on public PyPI and use the normal `PYAI_API_KEY` plus Hear and Speak scopes.+ ## Identity, billing and authentication+ - Before any generation or transcription, call GET /v1/me (MCP: whoami). Verify org_id, project_id, environment, scopes, limits and billing/credit context against the intended project. Do not infer identity or free usage from a key prefix or tool name. Stop on a mismatch or unknown budget; never switch to a live project automatically.+ - Test usage has enforced limits; live usage is billed. Current meters and rates: https://pyai.com/pricing. Agree a bounded input/request count before generating, and do not retry uncertain billable submissions blindly.+ - Header: `Authorization: Bearer pyai_live_...` (alias `x-api-key`).+ - Environments: `pyai_live_...` (production), `pyai_test_...` (sandbox).+ - WebSocket: use the official SDK for subprotocol auth. Omni browsers use short-lived origin-locked session tokens minted with POST /v1/omni/sessions by an authenticated backend; pass the pyai.v1 and pyai-key.<token> subprotocol pair. Never expose long-lived keys or query-string credentials. Hear browser clients require a backend proxy; Omni tokens do not authorize Hear.+ - Keys are opaque (<=512 chars). Do not parse or decode. No activation/propagation delay.+ ## Endpoints+ - POST /v1/audio/transcriptions, speech-to-text, Hear (scope hear:transcribe).+ - GET /v1/audio/transcriptions/stream?protocol=pyai-hear-v1, streaming speech-to-text over WebSocket with eager partials (scope hear:stream). pyai-hear-v1 is the only protocol. Force a final with the JSON frame {"type":"commit"}. Cue grounding fields are reserved but not active on the serving route.+ - GET/PUT /v1/hear/vocabulary, organization-owned custom vocabulary with separate batch and hear_stream activation (scope hear:configure).
Showing the first 40 of each.