PyAI Voice AI
v0.5.30Speech, transcription, voice agents, Trace, Recap, dubbing and narration with browser OAuth.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
openapi_get Openapi Get
Fetch live API operation discovery with a SHA-256 digest. Supply path and method for one operation and its referenced schemas, or include_document=true for the entire contract. Pin sha256 to detect contract drift. No API key required.
| Parameter | Type | Description |
|---|---|---|
include_document | boolean | |
method | string | |
path | string | |
sha256 | string |
create_sandbox_key Create Sandbox Key
Create a NEW isolated sandbox only when the user asks to try PyAI without an account. Local stdio only. Adopts the key privately for this session; never returns the secret. Prefer pyai login to use an existing workspace.
| Parameter | Type | Description |
|---|---|---|
label | string | Optional label (e.g. your app name) shown in the PyAI console. |
get_started Get Started
Return a concise, correct quickstart for building with PyAI (auth, SDK install, TTS/STT/realtime snippets, error handling). No key or network needed, read this before writing PyAI code so you use the right endpoints and the official SDK.
whoami Who Am I
Introspect the active key (GET /v1/me): org, environment (test/live), granted scopes, and rate-limit/credit posture. Organization and project names and IDs, billing guidance, and any managed payer/budget appear in text and structuredContent. Names are display labels; verify IDs and environment too. Use verbose=true for key identity details. Use it before usage and to diagnose a 401/403/402.
| Parameter | Type | Description |
|---|---|---|
verbose | boolean | Include authorized identity details in text. Credentials are always omitted. |
list_models List Models
List the available PyAI models (catalog). No arguments.
list_voices List Voices
Browse stock and saved designed voices. Filter stock voices by spoken language, accent/locale, gender or product. Prefer a locale for a regional accent. If no matching voice is listed, explain the gap before offering alternatives.
| Parameter | Type | Description |
|---|---|---|
gender | string | Filter by voice gender (e.g. female, male). |
language | string | Spoken language code, e.g. en, es or fr. Combine with region for an accent. |
product | string | Use speak for prerecorded speech and omni for a live voice agent. |
region | string | Requested accent or locale, e.g. en-US, en-GB, en-AU, es-MX or fr-CA. Use the requested locale even if availability is unknown. |
synthesize_speech Synthesize Speech
Generate speech from input. Consumes usage in the connected project; live usage can be billed. Before generation, use whoami to verify project, environment, scopes, credit and limits. Local stdio returns inline audio, or output_path and bytes when a path is supplied. For integration code only, use get_started without generating audio.
| Parameter | Type | Description |
|---|---|---|
input * | string | Text to synthesize. Maximum 2000 characters; longer text answers `400 input_too_long` naming the limit and the length you sent. Split longer scripts into several requests. |
model | string | Defaults to pyai-speak. |
output_path | string | Absolute file path to write the audio to. |
response_format | string | Defaults to mp3. |
voice | string | Voice id from list_voices. Omit for the account default. |
create_transcription_job Create Transcription Job
Submit an async speech-to-text job for an audio URL (https). Returns a job_id; poll with get_transcription_job. Supports diarization.
| Parameter | Type | Description |
|---|---|---|
audio_url * | string | https URL of the audio to transcribe. |
call_direction | string | |
call_id | string | Stable id for the post-call Recap. Defaults to the job id. |
channel | boolean | Dual-channel (stereo) per-channel speakers. |
customer_name | string | |
diarize | boolean | Single-track speaker diarization. |
model | string | |
output_formats | array | Defaults to [json]. |
pack_id | string | Optional Recap pack (default sales_outbound). |
transcription_language | string | Spoken-language hint applied to every channel, chunk and speech span. Omit for automatic detection. Independent of the Recap summary language. |
get_transcription_job Get Transcription Job
Get the status + result of a transcription job by id.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The job_id from create_transcription_job. |
configure_amd Configure AMD
Set the PyAI AMD (answering-machine detection) operating point + webhook (POST /v1/amd/config). `aggressiveness` is one dial 0-1: near 0 is human-safe (never hang up on a person), near 1 fires 'machine' fast. The realtime detection itself is a Twilio Media Streams WebSocket (wss /v1/amd/stream), a one-line-TwiML drop-in, not an MCP tool.
| Parameter | Type | Description |
|---|---|---|
aggressiveness | number | Operating point 0-1 (default 0.25). |
webhook_url | string | https URL to POST amd.call.completed events to. |
list_amd_calls List AMD Calls
List recent PyAI AMD decisions (GET /v1/amd/calls). Each carries answered_by (human/voicemail/ivr/screening/sit_invalid/…), answered_by_twilio (Twilio's enum, for routing parity), confidence, decision_ms, and the word-level reason.
| Parameter | Type | Description |
|---|---|---|
limit | number | Max results (1-100, default 20). |
session_label | string | Filter by the opaque connect-URL/TwiML tag. |
get_amd_call Get AMD Call
Get one PyAI AMD decision by call id (GET /v1/amd/calls/{id}): who/what answered, with the reason.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | The call id the decision was recorded under. |
enable_recap Enable Recap
Enable Recap for the key's org (PUT /v1/recap/config). Sandbox keys already mint with Recap on; call this to set a webhook or pack, or to enable Recap on a signup/live key. Requires recap:configure.
| Parameter | Type | Description |
|---|---|---|
default_pack_id | string | Defaults to sales_outbound. |
enabled | boolean | Defaults to true. |
webhook_url | string | https URL for recap.complete events. |
create_recap Create Recap
Submit speaker-labelled utterances and get a recap.call (POST /v1/recap/calls/{call_id}). Requires recap:create and Recap enabled. To poll with get_recap, also request recap:lookup.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | Stable id you will read back. |
utterances * | array | |
call_direction | string | |
customer_name | string | |
pack_id | string |
get_recap Get Recap
Read one Recap by call id (GET /v1/recap/calls/{call_id}). When complete, `record` is recap.record.v1 (tldr, summary, action_items, disposition, next_steps, talk_ratio, signals, fields). Requires recap:lookup and Recap enabled.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | The call_id passed to create_recap or the Hear job. |
list_recap_calls List Recap Calls
List existing Recap records for the organization (GET /v1/recap/calls). Requires recap:lookup and Recap enabled.
| Parameter | Type | Description |
|---|---|---|
limit | number | Max results (1-100, default 20). |
status | string |
omni_list_calls Omni List Calls
List Omni sessions, including inbound calls. Filter by session_label and preserve each returned call_id.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pass the previous page's `next_cursor`. |
limit | integer | |
session_label | string | Only calls connected with this opaque session tag. |
omni_get_call Omni Get Call
Read an Omni session's transcript, recording availability and summary. For outbound calls use artifacts.omni_call_id from calls_get.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | Stable opaque PyAI-owned call identifier. Use it unchanged across every Omni call sub-resource. |
omni_get_summary Omni Get Summary
Read the structured summary for an Omni call when generated; a missing summary is not an empty result.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | Stable opaque PyAI-owned call identifier. Use it unchanged across every Omni call sub-resource. |
omni_get_transcript Omni Get Transcript
Read the complete Omni call transcript through the authenticated API.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | Stable opaque PyAI-owned call identifier. Use it unchanged across every Omni call sub-resource. |
omni_get_recording Omni Get Recording
Get the canonical authenticated recording resource URL. Requires response=url. This URL is not public playable audio; recording must have been enabled.
| Parameter | Type | Description |
|---|---|---|
call_id * | string | Stable opaque PyAI-owned call identifier. Use it unchanged across every Omni call sub-resource. |
response * | string | Set to `url` to return the canonical authenticated PyAI recording resource as JSON. |
telephony_search_numbers Telephony Search Numbers
Search available managed numbers and inspect provisioning requirements before purchase.
| Parameter | Type | Description |
|---|---|---|
area_code | string | 3-digit US or Canada area code (NPA). |
contains | string | Digit pattern the number should contain. |
country | string | ISO-2 country to search in. |
limit | integer |
telephony_list_numbers Telephony List Numbers
List owned numbers and current Agent bindings before changing inbound routing.
| Parameter | Type | Description |
|---|---|---|
include_released | boolean |
telephony_buy_number Telephony Buy Number
Purchase a managed number. Requires explicit user approval (confirm=true) and a stable idempotency_key. May incur recurring charges; regulatory or billing setup may require Console.
| Parameter | Type | Description |
|---|---|---|
body * | object | |
idempotency_key * | string | Required safe retry key. Reusing the key with an identical body preserves the saved order outcome (201 confirmed number, 202 pending/unknown US, Canadian or Australian order, or 200 definitively faile… |
confirm | boolean | Set true only after the user authorizes this exact purchase or destination. |
telephony_bind_number Telephony Bind Number
Bind an owned number to an Agent using body.agent_id; null unassigns. Read existing bindings first. Changes inbound routing.
| Parameter | Type | Description |
|---|---|---|
body * | object | |
id * | string |
telephony_create_call Telephony Create Call
Place a real outbound call only to a user-authorized destination. Requires confirm=true and a stable idempotency_key. This is not a sandbox simulation. Preserve the returned ID; never redial after an uncertain timeout.
| Parameter | Type | Description |
|---|---|---|
body * | object | |
idempotency_key * | string | Required safe-retry key. Identical retries return the original call; a different body returns 409. |
confirm | boolean | Set true only after the user authorizes this exact purchase or destination. |
calls_list Calls List
List outbound calls and normalized network outcomes before retrying a dispatch.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Last call id from the previous page. Tenant and project scoped. |
direction | string | |
limit | integer | |
status | string |
calls_get Calls Get
Read the current state of an outbound call by returned ID. dispatch_unknown needs inspection, not another call. Recap and Omni recordings are separate resources.
| Parameter | Type | Description |
|---|---|---|
id * | string |
list_agents List Agents
List saved voice Agent profiles before creating or changing one.
create_agent Create Agent
Create a reusable voice Agent profile: persona, greeting, voice, language, tools and knowledge. Does not place a call.
get_agent Get Agent
Read a saved voice Agent profile and its current configuration.
| Parameter | Type | Description |
|---|---|---|
id * | string | Agent id, e.g. `agent_7f3a…`. |
update_agent Update Agent
Update a voice Agent profile. Read it first and change only user-requested fields.
set_agent_tools Set Agent Tools
Replace the tools bound to an Agent. Read the current Agent first; this replaces its bindings.
| Parameter | Type | Description |
|---|---|---|
body * | array | |
id * | string |
set_agent_knowledge Set Agent Knowledge
Replace the knowledge bases bound to an Agent. Read its existing bindings first.
| Parameter | Type | Description |
|---|---|---|
body * | array | |
id * | string |
list_published_website_widgets List Published Website Widgets
Look up published managed website voice widgets in the connected project without an agent ID. Read their public embed snippets, exact origins and effective daily session limits. Follow next_cursor while has_more before concluding no match. Ask which widget if multiple match. This read does not create a widget or start a session.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pass next_cursor from the previous page. |
limit | integer |
draft_website_widget Draft Website Widget
Save an unpublished website voice widget for a saved agent in the connected project. Specify the exact HTTPS origin and both daily session limits. The hosted widget sends visitor microphone audio to PyAI. Its session quotas cannot enforce a hard total spending cap. To replace a draft, first preview it and pass its expected_revision. A published widget cannot be edited here.
| Parameter | Type | Description |
|---|---|---|
body * | object | |
id * | string | Saved agent ID in the authenticated project. |
preview_website_widget Preview Website Widget
Read the saved managed website voice widget for this agent. Show its project, exact origins, session limits, status, embed snippet, readiness and revision before asking to publish. Does not publish or start a session.
| Parameter | Type | Description |
|---|---|---|
id * | string | Saved agent ID in the authenticated project. |
publish_website_widget Publish Website Widget
Publish the managed website voice widget only after the user explicitly approves the displayed project, origins, limits and embed for that exact preview revision. Set body.approved=true and pass body.revision. Return the snippet verbatim. The hosted widget sends visitor microphone audio to PyAI. Sessions may consume project credit and session quotas cannot enforce a hard total spending cap. After an uncertain result, preview the widget before any further action.
| Parameter | Type | Description |
|---|---|---|
body * | object | |
id * | string | Saved agent ID in the authenticated project. |
get_trace_config Get Trace Config
Inspect Trace call-compliance configuration.
| Parameter | Type | Description |
|---|---|---|
agent_id | string | Agent to read config for; omit for the org default. |
configure_trace Configure Trace
Configure Trace compliance monitoring for the selected workspace.
| Parameter | Type | Description |
|---|---|---|
body * | object | Per-agent Trace config (spec §5.1). May be wrapped as { agent_id, config } or sent raw. |
list_trace_rule_packs List Trace Rule Packs
Discover available Trace compliance rule packs before enabling monitoring.
create_trace_rule_pack Create Trace Rule Pack
Create a workspace Trace compliance rule pack. This creates persistent configuration.
| Parameter | Type | Description |
|---|---|---|
body * | object | An authored rule pack in the Trace DSL (rule_pack_schema.json). |
list_trace_interactions List Trace Interactions
Find monitored calls and interactions for compliance review.
| Parameter | Type | Description |
|---|---|---|
agent_id | string | |
cursor | string | |
limit | integer | |
verdict | string |
get_trace_interaction Get Trace Interaction
Read one monitored interaction and its compliance evidence.
| Parameter | Type | Description |
|---|---|---|
id * | string | The call_id. |
list_trace_findings List Trace Findings
Find compliance findings with source evidence. Findings are signals for review, not legal conclusions.
| Parameter | Type | Description |
|---|---|---|
action | string | |
check_id | string | |
cursor | string | |
interaction_id | string | |
limit | integer | |
severity | string |
list_trace_violations List Trace Violations
List Trace rule violations for compliance review.
| Parameter | Type | Description |
|---|---|---|
cursor | string | |
interaction_id | string | |
limit | integer | |
rule_id | string | |
severity | string |
get_trace_exposure Get Trace Exposure
Read aggregate compliance exposure for the workspace.
| Parameter | Type | Description |
|---|---|---|
window_days | integer | Trailing window in days. |
get_recap_config Get Recap Config
Read Recap summarization configuration before changing it.
get_cast_capabilities Get Cast Capabilities
Discover Cast voices, emotions, formats and supported rendering capabilities.
direct_cast_script Direct Cast Script
Turn a narration script into directed Cast lines before rendering. Consumes usage.
| Parameter | Type | Description |
|---|---|---|
body * | object |
render_cast Render Cast
Submit script text or directed lines using one top-level voice from get_cast_capabilities for the entire render. Per-line voices and a console project are not required or supported inputs. Returns a job; preserve its ID, poll get_cast_render and retrieve get_cast_audio when done. Consumes usage; do not resubmit on timeout.
| Parameter | Type | Description |
|---|---|---|
body * | object |
list_transcription_jobs List Transcription Jobs
Find existing audio processing and transcription jobs before submitting duplicates.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Opaque token from a previous page's `next_cursor`. Omit for the first page. |
limit | integer | Max items to return (1-100). |
discover_tools Discover Tools
Find the right PyAI tools and a short recipe for speech, STT, LiveKit or Pipecat integration, voice agents, compliance, summaries, dubbing or narration. No credentials or usage.
| Parameter | Type | Description |
|---|---|---|
query | string | Product, framework or task, e.g. “LiveKit”, “Pipecat integration”, “translate audio”, “voice agent”, “TTS”. |
task | string | Alias for query. If both are supplied, they must match after trimming. |
get_dub_capabilities Get Dub Capabilities
Read currently supported Dub input and output languages before submitting a translation.
create_dub Create Dub
Fetch audio from the user-authorized HTTPS source URL and start a translation and dubbing job. Accesses an external source and consumes usage. Keep job_id and poll get_dub_job; do not submit again after a timeout.
| Parameter | Type | Description |
|---|---|---|
source_lang * | string | Source language from get_dub_capabilities. |
source_url * | string | |
target_lang * | string | Target language from get_dub_capabilities. |
get_dub_job Get dubbing job status
Retrieve the status and available results of an existing dubbing job by job_id. This read does not start or repeat a job. Poll pending/processing states without resubmitting.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The ID returned by the original submission; do not invent one. |
get_dub_audio Get Dub Audio
Retrieve completed dubbed audio as a playable result or download. Call only when get_dub_job reports done.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The ID returned by the original submission; do not invent one. |
get_cast_render Get Cast Render
Check a durable Cast render job. Preserve the original job ID.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The ID returned by the original submission; do not invent one. |
get_cast_audio Get Cast Audio
Retrieve completed Cast narration as playable audio or a download.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The ID returned by the original submission; do not invent one. |
preview_cast_line Preview Cast Line
Generate one directed Cast line. Consumes usage. Check get_cast_capabilities for supported voice, emotion and intensity.
| Parameter | Type | Description |
|---|---|---|
emotion * | string | Supported emotion. |
intensity * | Use a tier from Cast capabilities: subtle, balanced or bold; or a number from 0 to 1. Legacy low/med/high aliases are normalized by MCP. | |
text * | string | Narration text. |
voice * | string | A supported Cast voice. |
transcribe_audio Transcribe Audio
Transcribe a small audio attachment supplied as base64 (up to 8 MiB decoded). Returns the synchronous transcript without diarization controls. For word timestamps and speaker labels, use create_transcription_job with diarize=true for mono or channel=true for stereo, then get_transcription_job. Consumes usage.
| Parameter | Type | Description |
|---|---|---|
audio_base64 * | string | Base64-encoded audio bytes, without a data: prefix. |
filename * | string | |
language | string |