PyAI Recap API
The Recap API from PyAI — 5 operation(s) for recap.
The Recap API from PyAI — 5 operation(s) for recap.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/pyai-com:pyai-com-recap-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PyAI Recap API
version: 2.14.0
description: 'Telephony-native Voice AI behind one bearer key:
- **Hear**, speech-to-text · `POST /v1/audio/transcriptions` (streaming + batch)
- **Speak**, text-to-speech · `POST /v1/audio/speech`, `GET /v1/voices`
- **Clone**, custom voices from a short clip · `/v1/voice/clones`
- **Cast**, auto-directed expressive voiceovers · `/v1/cast`
- **Dub**, asynchronous audio and video dubbing · `POST /v1/dub` (guide)
- **Cue configuration frames (reserved)**; Hear streams skip knowledge-base retrieval by default
- **Omni**, full-duplex agentic voice (speech-to-speech, grounded in your knowledge bases + tools) · `/v1/omni`
- **Knowledge Bases**, hosted grounding for Omni: create bases, add documents (file, URL, or text), crawl a public website, bind to agents or org defaults · `/v1/knowledgebases`
- **AMD API**, answering-machine detection: know *who or what* answered a call (human, voicemail, IVR, iPhone/Google screening, dead number) with the reason it decided · `wss …/v1/amd/stream` (Twilio Media Streams drop-in), `POST /v1/amd/config`, `GET /v1/amd/calls/{id}`
- **Agents Beta**, the live console feature to create, configure, test, and connect Omni voice agents without code. Beta features and limits may change. ## 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. Create a key in the console (it is shown once) and send it as a bearer token:
```
Authorization: Bearer pyai_live_... ```
Keys are environment-scoped: `pyai_live_...` (production) and `pyai_test_...` (sandbox). `POST /v1/sandbox/keys` creates an instant, short-lived test key without login or billing. Account signup also creates a sandbox key. Live keys consume prepaid credit; phone verification may unlock promotional credit under graduated-signup rules, but credit is not guaranteed at signup. Keys are self-validating signed tokens: they work on every PyAI surface the instant they are created, no activation or propagation delay. Treat them as opaque strings (up to 512 chars) and never parse their contents. Keep long-lived keys on trusted servers. For Omni browsers, mint an origin-locked short-lived token on your backend with POST /v1/omni/sessions; never expose a live or test API key in browser code. Offer the protocol marker and session token:
```
Sec-WebSocket-Protocol: pyai.v1, pyai-key. ```
(server-side clients may instead append `?api_key=...` to the URL). Your key is authenticated on the upgrade and never reaches the model. ## Quickstart, Hear (speech-to-text)
```
curl https://api.pyai.com/v1/audio/transcriptions \
-H "Authorization: Bearer $PYAI_API_KEY" \
-F file=@audio.wav -F model=pyai-hear
# -> { "text": "..." }
```
## Quickstart, Speak (text-to-speech)
```
curl https://api.pyai.com/v1/audio/speech \
-H "Authorization: Bearer $PYAI_API_KEY" \
-H "Content-Type: application/json" \
-d ''{"model":"pyai-speak","input":"Hello from PyAI.","voice":"voice_abc"}'' \
--output speech.wav
```
`voice` is a stock voice id from `GET /v1/voices` (the curated prebuilt catalog with personas and avatars) or a cloned voice id from `/v1/voice/clones`. Omit it to use the platform default voice (`stock_dorit_en_us`).'
contact:
name: PyAI
url: https://pyai.com
servers:
- url: https://api.pyai.com
description: Production
security:
- apiKey: []
- xApiKey: []
tags:
- name: Recap
paths:
/v1/recap/config:
get:
tags:
- Recap
summary: Get Recap config
description: Org Recap enablement, customer webhook URL, and default pack. Requires `recap:configure`.
operationId: getRecapConfig
responses:
'200':
description: Recap config
content:
application/json:
schema:
$ref: '#/components/schemas/RecapConfig'
'401':
$ref: '#/components/responses/Unauthorized'
put:
tags:
- Recap
summary: Update Recap config
description: Enable Recap and set the customer webhook + default pack. Requires `recap:configure`.
operationId: putRecapConfig
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RecapConfigInput'
responses:
'200':
description: Updated config
content:
application/json:
schema:
$ref: '#/components/schemas/RecapConfig'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/recap/crm-config:
get:
tags:
- Recap
summary: Get Recap CRM config
description: Salesforce field mapping and credentials (secrets redacted on GET). Requires `recap:configure`.
operationId: getRecapCrmConfig
responses:
'200':
description: CRM config
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCrmConfig'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
put:
tags:
- Recap
summary: Update Recap CRM config
description: Hand-configured Salesforce mapping for design partners. Omit secret fields on update to preserve existing values.
operationId: putRecapCrmConfig
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCrmConfigInput'
responses:
'200':
description: Updated CRM config
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCrmConfig'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
/v1/recap/calls:
get:
tags:
- Recap
summary: List recap records
description: List existing post-call summaries for the organization. Requires `recap:lookup` and Recap enabled. Existing `recap:read` keys retain access.
operationId: listRecapCalls
parameters:
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: cursor
in: query
schema:
type: string
- name: status
in: query
schema:
type: string
enum:
- pending
- processing
- complete
- failed
responses:
'200':
description: Paginated recap list
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCallList'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
/v1/recap/calls/{call_id}:
get:
tags:
- Recap
summary: Get a recap record
description: Read an existing summary in the organization with `recap:lookup` and Recap enabled. Existing `recap:read` keys retain access.
operationId: getRecapCall
parameters:
- name: call_id
in: path
required: true
schema:
type: string
responses:
'200':
description: Recap detail
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCall'
'402':
$ref: '#/components/responses/PaymentRequired'
'404':
$ref: '#/components/responses/NotFound'
post:
tags:
- Recap
summary: Manually trigger recap for a call
description: Submit a transcript with `recap:create` and Recap enabled. Polling requires `recap:lookup`. Existing `recap:read` keys retain access to both operations.
operationId: triggerRecapCall
parameters:
- name: call_id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- utterances
properties:
pack_id:
type: string
call_duration_s:
type: number
call_direction:
type: string
enum:
- inbound
- outbound
customer_name:
type: string
language:
type: string
enum:
- en
- fr
- es
- de
- hi
description: Language for the Recap output; this does not transcribe audio.
crm_fields:
type: object
additionalProperties: true
utterances:
type: array
minItems: 1
items:
$ref: '#/components/schemas/RecapUtterance'
responses:
'202':
description: Recap job accepted
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCallSummary'
'402':
$ref: '#/components/responses/PaymentRequired'
/v1/recap/calls/{call_id}/transcript/roles:
post:
tags:
- Recap
summary: Correct transcript speaker roles
description: Tenant-scoped correction of Recap speaker roles. Requires `recap:read` and the Recap add-on. Marks each edited utterance as a customer correction; does not rename upstream carriers.
operationId: correctRecapSpeakerRoles
parameters:
- name: call_id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RecapSpeakerRoleCorrection'
responses:
'200':
description: Updated recap detail
content:
application/json:
schema:
$ref: '#/components/schemas/RecapCall'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
RecapProcessing:
type: object
properties:
stage:
type: string
elapsed_s:
type: number
minimum: 0
utterance_count:
type: integer
minimum: 0
coverage_gaps:
type: integer
minimum: 0
polish_available:
type: boolean
ErrorCode:
type: string
description: Stable, machine-readable error code. Branch on this rather than the human `message`.
enum:
- invalid_request_error
- invalid_session_label
- unauthorized
- forbidden
- origin_not_allowed
- credit_exhausted
- key_budget_exceeded
- child_budget_exceeded
- insufficient_quota
- rate_limit_exceeded
- concurrency_limit_exceeded
- daily_cap_exceeded
RecapCallSummary:
type: object
properties:
object:
type: string
example: recap.call
call_id:
type: string
pack_id:
type: string
status:
type: string
enum:
- pending
- processing
- complete
- failed
call_duration_s:
type: number
nullable: true
created_at:
type: integer
completed_at:
type: integer
nullable: true
source:
type: string
nullable: true
description: Call origin, for example external.
headline:
type: string
nullable: true
description: Best available summary headline for list and tracking views.
customer_name:
type: string
nullable: true
call_direction:
type: string
enum:
- inbound
- outbound
nullable: true
Error:
type: object
description: OpenAI-compatible error envelope returned by the gateway data plane (401/402/403/429). Control-plane request/resource errors use Problem (application/problem+json) instead.
required:
- error
properties:
error:
type: object
required:
- message
properties:
message:
type: string
description: Human-readable explanation.
type:
type: string
description: Error category, e.g. rate_limit_error.
code:
$ref: '#/components/schemas/ErrorCode'
param:
type: string
nullable: true
description: Offending parameter when applicable, else null.
RecapConfigInput:
type: object
properties:
enabled:
type: boolean
webhook_url:
type: string
nullable: true
format: uri
default_pack_id:
type: string
RecapConfig:
type: object
properties:
object:
type: string
example: recap.config
enabled:
type: boolean
webhook_url:
type: string
nullable: true
format: uri
default_pack_id:
type: string
example: sales_outbound
updated_at:
type: integer
description: Unix ms.
RecapCall:
allOf:
- $ref: '#/components/schemas/RecapCallSummary'
- type: object
properties:
record:
allOf:
- $ref: '#/components/schemas/RecapRecord'
description: Typed Recap intelligence when status is complete (`recap.record.v1`).
transcript:
allOf:
- $ref: '#/components/schemas/RecapTranscript'
description: Full speaker-labelled transcript retained from the Recap trigger.
processing:
allOf:
- $ref: '#/components/schemas/RecapProcessing'
description: Customer-safe processing diagnostics for this Recap.
error:
type: string
nullable: true
crm_write_status:
type: string
nullable: true
RecapSalesforceConfig:
type: object
properties:
enabled:
type: boolean
instance_url:
type: string
format: uri
client_id:
type: string
description: Masked on GET.
client_secret:
type: string
description: Redacted on GET.
refresh_token:
type: string
description: Redacted on GET.
object:
type: string
example: Opportunity
record_id_field:
type: string
example: salesforce_id
field_map:
type: object
additionalProperties:
type: string
description: Recap logical field → Salesforce API field name.
create_activity:
type: boolean
description: Create a Task with TL;DR + summary after PATCH.
RecapCallList:
type: object
properties:
object:
type: string
example: list
data:
type: array
items:
$ref: '#/components/schemas/RecapCallSummary'
has_more:
type: boolean
next_cursor:
type: string
nullable: true
RecapCrmConfig:
type: object
properties:
object:
type: string
example: recap.crm_config
salesforce:
$ref: '#/components/schemas/RecapSalesforceConfig'
nullable: true
updated_at:
type: integer
description: Unix ms.
Problem:
type: object
description: RFC 7807 problem+json returned by the control plane (request-validation and resource errors such as 400/404/409). The stable code is the last path segment of `type`.
required:
- title
- status
properties:
type:
type: string
description: Problem type URI; ends with the stable code.
title:
type: string
status:
type: integer
detail:
type: string
request_id:
type: string
RecapRecord:
type: object
required:
- format
- tldr
- summary
- action_items
- disposition
- next_steps
- talk_ratio
- signals
- fields
properties:
format:
type: string
enum:
- recap.record.v1
tldr:
type: string
nullable: true
description: One-line headline. Intentionally short.
summary:
type: string
nullable: true
description: Detailed notes for the call.
action_items:
type: array
items:
$ref: '#/components/schemas/RecapActionItem'
decision_evidence:
type: array
items:
type: object
additionalProperties: true
description: Decisions with verbatim supporting evidence.
topics:
type: array
items:
type: object
additionalProperties: true
description: Extracted topics with source evidence when available.
key_decisions:
type: array
items:
oneOf:
- type: string
- type: object
additionalProperties: true
moments:
type: array
items:
type: object
additionalProperties: true
description: Notable call moments. A timestamp alone is not verified source evidence.
disposition:
type: string
nullable: true
next_steps:
type: string
nullable: true
talk_ratio:
allOf:
- $ref: '#/components/schemas/RecapTalkRatio'
nullable: true
signals:
type: array
items:
$ref: '#/components/schemas/RecapSignal'
fields:
type: object
additionalProperties: true
description: Pack-specific extracted fields. Stable v1 keys live at the root, not here.
rep:
type: object
additionalProperties: true
description: Processor nested surface, passed through for older clients.
manager:
type: object
additionalProperties: true
description: Processor nested surface, passed through for older clients.
ops:
type: object
additionalProperties: true
description: Processor nested surface, passed through for older clients.
RecapTranscript:
type: object
required:
- format
- utterances
properties:
format:
type: string
enum:
- utterances.v1
utterances:
type: array
items:
$ref: '#/components/schemas/RecapUtterance'
RecapCrmConfigInput:
type: object
properties:
salesforce:
$ref: '#/components/schemas/RecapSalesforceConfigInput'
nullable: true
RecapSignal:
type: object
required:
- kind
- text
properties:
kind:
type: string
description: signal, risk, buying, objection, or competitor.
text:
type: string
at_s:
type: number
nullable: true
minimum: 0
RecapSpeakerRoleCorrection:
type: object
required:
- corrections
properties:
corrections:
type: array
minItems: 1
items:
type: object
required:
- index
- speaker_role
properties:
index:
type: integer
minimum: 0
description: Zero-based index into transcript.utterances.
speaker_role:
type: string
enum:
- agent
- customer
RecapSalesforceConfigInput:
type: object
properties:
enabled:
type: boolean
instance_url:
type: string
format: uri
client_id:
type: string
client_secret:
type: string
refresh_token:
type: string
object:
type: string
record_id_field:
type: string
field_map:
type: object
additionalProperties:
type: string
create_activity:
type: boolean
RecapActionItem:
type: object
required:
- task
properties:
owner:
type: string
nullable: true
task:
type: string
due:
type: string
nullable: true
evidence:
type: string
nullable: true
description: Verbatim transcript evidence when retained.
utterance_index:
type: integer
minimum: 0
description: Zero-based retained transcript turn supporting the action.
RecapUtterance:
type: object
required:
- speaker_role
- text
- offset_s
- duration_s
properties:
speaker_role:
type: string
enum:
- agent
- customer
text:
type: string
offset_s:
type: number
minimum: 0
duration_s:
type: number
minimum: 0
role_source:
type: string
enum:
- keyword
- participant_name
- diarization
- channel
- inferred
- corrected
description: 'How Recap decided this speaker role: a role keyword, a participant name, Hear diarization (speaker 1 = agent, speaker 2 = customer), audio channel, conversation-role inference, or a customer correction.'
role_confidence:
type: number
minimum: 0
maximum: 1
description: Confidence in the speaker role, from 0 to 1.
RecapTalkRatio:
type: object
required:
- agent
- customer
properties:
agent:
type: number
minimum: 0
maximum: 1
customer:
type: number
minimum: 0
maximum: 1
responses:
BadRequest:
description: Invalid request (bad field, unsupported value)
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
NotFound:
description: 'Resource not found (`code: not_found`)'
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
PaymentRequired:
description: 'Billing gate: org out of prepaid credit, per-key budget hit, or plan quota exhausted (`code: credit_exhausted | key_budget_exceeded | insufficient_quota`). Do not retry; add credit or raise the limit. A brand-new key may see this on its first call until the account is funded.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: 'Missing or invalid API key (`code: unauthorized`)'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
interpretationUpload:
type: http
scheme: bearer
description: Short-lived write-only upload_capability returned by POST /v1/audio/interpretations/recordings. Never use it for reads.
sessionCookie:
type: apiKey
in: cookie
name: pyai_session
description: Console session cookie. PyAI-admin routes also require the configured platform-admin email allowlist.
apiKey:
type: http
scheme: bearer
description: 'Use `Authorization: Bearer pyai_live_...` (or `pyai_test_...`).'
xApiKey:
type: apiKey
in: header
name: x-api-key
description: Header alias for bearer auth on HTTP endpoints. WebSocket auth uses the subprotocol pair `pyai.v1, pyai-key.<API_KEY>`.
x-pyai-agent-notes:
guide: https://pyai.com/agents/speech-calling.md
omni_frames: https://api.pyai.com/omni-frames.json
discovery: Inspect live operation schemas; preserve IDs and required Idempotency-Key headers. SDK-first for realtime. Never infer a simulated PSTN call endpoint.