Cartesia Speech-to-Text API
Batch transcription of an audio file of any length with the ink-whisper model at POST /stt. Accepts flac, m4a, mp3, mp4, and mpeg uploads, 99+ languages, and optional word-level timestamp granularity.
Batch transcription of an audio file of any length with the ink-whisper model at POST /stt. Accepts flac, m4a, mp3, mp4, and mpeg uploads, 99+ languages, and optional word-level timestamp granularity.
openapi: 3.0.3
info:
title: Cartesia API
description: >-
The Cartesia REST API for real-time voice AI - text-to-speech and
voice-changer generation (single-shot bytes or Server-Sent Events),
batch speech-to-text transcription, voice management and cloning,
audio infill, custom datasets, pronunciation dictionaries, API keys
and scoped access tokens, the Voice Agents platform (agents, calls,
call batches, phone numbers, telephony providers, webhooks,
deployments, knowledge base documents/folders, and evaluation
metrics), and usage reporting. All requests require a
`Cartesia-Version` header and an `Authorization: Bearer` API key
(`sk_car_...`) or short-lived access token. The lowest-latency,
streaming surface for TTS and STT is a separate WebSocket protocol
documented in the companion AsyncAPI document at
asyncapi/cartesia-ai-asyncapi.yml.
version: '2026-03-01'
contact:
name: Cartesia
url: https://cartesia.ai
license:
name: API documentation - Cartesia Terms of Service
url: https://cartesia.ai/terms-of-service
servers:
- url: https://api.cartesia.ai
description: Cartesia production API
security:
- bearerAuth: []
tags:
- name: Text-to-Speech
description: Single-shot and streamed speech generation over plain HTTP.
- name: Speech-to-Text
description: Batch transcription of an audio file of any length.
- name: Voices
description: Voice catalog management and voice cloning.
- name: Voice Changer
description: Transform speech into a different target voice.
- name: Infill
description: Generate audio that smoothly connects two existing audio segments.
- name: Datasets
description: Audio/text collections used to build custom fine-tunes and voices.
- name: Pronunciation Dictionaries
description: Custom pronunciation overrides referenced by TTS requests.
- name: API Keys
description: Standard API key metadata.
- name: Auth
description: Short-lived, scoped access token generation.
- name: Agents
description: Voice agent configuration and public templates.
- name: Calls
description: Outbound call placement, batching, and history.
- name: Phone Numbers
description: Telephony number provisioning and import.
- name: Providers
description: Linked telephony provider accounts.
- name: Webhooks
description: Webhook endpoint registration.
- name: Deployments
description: Agent deployment inspection.
- name: Knowledge Base
description: Documents and folders used by agents.
- name: Metrics
description: LLM-as-a-judge quality metrics for agents.
- name: Usage
description: Credit and agent usage reporting.
- name: Status
description: API health and version.
paths:
/tts/bytes:
post:
operationId: ttsBytes
tags:
- Text-to-Speech
summary: Text-to-Speech (Bytes)
description: Synthesizes a complete transcript and returns raw audio bytes in a single response.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TtsRequest'
responses:
'200':
description: Synthesized audio.
content:
audio/*:
schema:
type: string
format: binary
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/tts/sse:
post:
operationId: ttsSse
tags:
- Text-to-Speech
summary: Text-to-Speech (SSE)
description: Streams audio chunks with extra metadata (timestamps) from a complete transcript as Server-Sent Events.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TtsRequest'
responses:
'200':
description: Server-Sent Events stream of audio chunks and metadata.
content:
text/event-stream:
schema:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/stt:
post:
operationId: transcribe
tags:
- Speech-to-Text
summary: Batch Speech-to-Text
description: Transcribes an audio file of any length using the ink-whisper model.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
- name: encoding
in: query
required: false
description: PCM encoding, required only when uploading raw headerless PCM.
schema:
type: string
enum: [pcm_s16le, pcm_s32le, pcm_f16le, pcm_f32le, pcm_mulaw, pcm_alaw]
- name: sample_rate
in: query
required: false
description: Sample rate in Hz, required only when uploading raw headerless PCM.
schema:
type: integer
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
- model
properties:
file:
type: string
format: binary
description: 'Audio file. Supported formats: flac, m4a, mp3, mp4, mpeg.'
model:
type: string
enum: [ink-whisper]
language:
type: string
description: ISO-639-1 code. Defaults to en. Supports 99+ languages.
default: en
timestamp_granularities[]:
type: array
items:
type: string
enum: [word]
responses:
'200':
description: The transcript.
content:
application/json:
schema:
$ref: '#/components/schemas/TranscriptResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/voices:
get:
operationId: listVoices
tags:
- Voices
summary: List Voices
description: Returns a paginated list of voices, with search and filtering.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
- name: starting_after
in: query
schema:
type: string
- name: ending_before
in: query
schema:
type: string
- name: q
in: query
description: Search voices by name, description, or ID.
schema:
type: string
- name: is_owner
in: query
schema:
type: boolean
- name: gender
in: query
schema:
type: string
enum: [masculine, feminine, gender_neutral]
- name: language
in: query
schema:
type: string
- name: expand[]
in: query
schema:
type: array
items:
type: string
enum: [preview_file_url]
responses:
'200':
description: A page of voices.
content:
application/json:
schema:
$ref: '#/components/schemas/GetVoicesResponse'
'401':
$ref: '#/components/responses/Unauthorized'
/voices/clone:
post:
operationId: cloneVoice
tags:
- Voices
summary: Clone Voice
description: Clones a new voice from an uploaded audio clip.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- clip
- name
- language
properties:
clip:
type: string
format: binary
description: 'Supported audio formats: flac, mp3, mpeg, mpga, oga, ogg, wav, webm.'
name:
type: string
description:
type: string
language:
type: string
description: ISO 639-1 code (en, fr, de, es, ...).
base_voice_id:
type: string
description: Derive the cloned voice from an existing voice ID.
responses:
'200':
description: The cloned voice.
content:
application/json:
schema:
$ref: '#/components/schemas/VoiceMetadata'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/voices/{id}:
parameters:
- $ref: '#/components/parameters/VoiceId'
get:
operationId: getVoice
tags:
- Voices
summary: Get Voice
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: The requested voice.
content:
application/json:
schema:
$ref: '#/components/schemas/VoiceMetadata'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
operationId: updateVoice
tags:
- Voices
summary: Update Voice
description: Updates voice metadata (name, description).
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description:
type: string
responses:
'200':
description: The updated voice.
content:
application/json:
schema:
$ref: '#/components/schemas/VoiceMetadata'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: deleteVoice
tags:
- Voices
summary: Delete Voice
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: Deletion confirmation.
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/voices/localize:
post:
operationId: localizeVoice
tags:
- Voices
summary: Localize Voice
description: Creates a new voice from an existing voice localized to a new language and dialect.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- voice_id
- name
- language
properties:
voice_id:
type: string
name:
type: string
description:
type: string
language:
type: string
original_speaker_gender:
type: string
enum: [masculine, feminine]
responses:
'200':
description: The localized voice.
content:
application/json:
schema:
$ref: '#/components/schemas/VoiceMetadata'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/voice-changer/bytes:
post:
operationId: voiceChangerBytes
tags:
- Voice Changer
summary: Voice Changer (Bytes)
description: Transforms an uploaded speech recording into a different target voice, returning raw audio bytes.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/VoiceChangerRequest'
responses:
'200':
description: Transformed audio.
content:
audio/*:
schema:
type: string
format: binary
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/voice-changer/sse:
post:
operationId: voiceChangerSse
tags:
- Voice Changer
summary: Voice Changer (SSE)
description: Transforms an uploaded speech recording into a different target voice, streamed as Server-Sent Events.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/VoiceChangerRequest'
responses:
'200':
description: Server-Sent Events stream of transformed audio chunks.
content:
text/event-stream:
schema:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/infill/bytes:
post:
operationId: infillBytes
tags:
- Infill
summary: Infill (Bytes)
description: >-
Generates audio that smoothly connects two existing audio segments.
At least one of left_audio or right_audio must be provided.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- transcript
properties:
left_audio:
type: string
format: binary
description: Audio preceding the infill text.
right_audio:
type: string
format: binary
description: Audio following the infill text.
transcript:
type: string
description: Text to generate between the two audio segments.
model_id:
type: string
enum: [sonic-3, sonic-3-2026-01-12, sonic-3-2025-10-27]
voice_id:
type: string
language:
type: string
output_format[container]:
type: string
enum: [raw, wav, mp3]
output_format[sample_rate]:
type: integer
enum: [8000, 16000, 22050, 24000, 44100, 48000]
output_format[encoding]:
type: string
enum: [pcm_f32le, pcm_s16le, pcm_mulaw, pcm_alaw]
output_format[bit_rate]:
type: integer
enum: [32000, 64000, 96000, 128000, 192000]
responses:
'200':
description: Infilled audio.
content:
audio/*:
schema:
type: string
format: binary
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/datasets:
get:
operationId: listDatasets
tags:
- Datasets
summary: List Datasets
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: A page of datasets.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Dataset'
has_more:
type: boolean
'401':
$ref: '#/components/responses/Unauthorized'
/datasets/:
post:
operationId: createDataset
tags:
- Datasets
summary: Create Dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
description:
type: string
responses:
'200':
description: The created dataset.
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/datasets/{id}:
parameters:
- $ref: '#/components/parameters/DatasetId'
get:
operationId: getDataset
tags:
- Datasets
summary: Get Dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: The requested dataset.
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
operationId: updateDataset
tags:
- Datasets
summary: Update Dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description:
type: string
responses:
'200':
description: The updated dataset.
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: deleteDataset
tags:
- Datasets
summary: Delete Dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: Deletion confirmation.
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/datasets/{id}/files:
parameters:
- $ref: '#/components/parameters/DatasetId'
get:
operationId: listDatasetFiles
tags:
- Datasets
summary: List files in a dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: A page of dataset files.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/DatasetFile'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
post:
operationId: uploadDatasetFile
tags:
- Datasets
summary: Upload a file to a dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
responses:
'200':
description: The uploaded file.
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetFile'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
/datasets/{id}/files/{file_id}:
parameters:
- $ref: '#/components/parameters/DatasetId'
- name: file_id
in: path
required: true
description: The ID of the dataset file.
schema:
type: string
delete:
operationId: deleteDatasetFile
tags:
- Datasets
summary: Remove a file from a dataset
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: Deletion confirmation.
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/pronunciation-dictionaries:
get:
operationId: listPronunciationDictionaries
tags:
- Pronunciation Dictionaries
summary: List pronunciation dictionaries
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: A page of pronunciation dictionaries.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PronunciationDictionary'
'401':
$ref: '#/components/responses/Unauthorized'
post:
operationId: createPronunciationDictionary
tags:
- Pronunciation Dictionaries
summary: Create a pronunciation dictionary
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
- rules
properties:
name:
type: string
rules:
type: array
items:
type: object
additionalProperties: true
responses:
'200':
description: The created pronunciation dictionary.
content:
application/json:
schema:
$ref: '#/components/schemas/PronunciationDictionary'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationError'
/pronunciation-dictionaries/{id}:
parameters:
- name: id
in: path
required: true
description: The ID of the pronunciation dictionary.
schema:
type: string
get:
operationId: getPronunciationDictionary
tags:
- Pronunciation Dictionaries
summary: Get a pronunciation dictionary
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: The requested pronunciation dictionary.
content:
application/json:
schema:
$ref: '#/components/schemas/PronunciationDictionary'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
operationId: updatePronunciationDictionary
tags:
- Pronunciation Dictionaries
summary: Update a pronunciation dictionary
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
rules:
type: array
items:
type: object
additionalProperties: true
responses:
'200':
description: The updated pronunciation dictionary.
content:
application/json:
schema:
$ref: '#/components/schemas/PronunciationDictionary'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: deletePronunciationDictionary
tags:
- Pronunciation Dictionaries
summary: Delete a pronunciation dictionary
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: Deletion confirmation.
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/api-keys:
get:
operationId: listApiKeys
tags:
- API Keys
summary: List API Keys
description: Returns a paginated list of standard API keys.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: A page of API keys.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ApiKey'
'401':
$ref: '#/components/responses/Unauthorized'
/api-keys/{id}:
get:
operationId: getApiKey
tags:
- API Keys
summary: Get API Key
description: Returns metadata for a single API key.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: The requested API key.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKey'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/access-token:
post:
operationId: generateAccessToken
tags:
- Auth
summary: Generate a New Access Token
description: Generates a short-lived (max 3600s) access token scoped by grants for making API requests, suitable for use in browser clients.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
content:
application/json:
schema:
type: object
properties:
grants:
type: object
properties:
tts:
type: boolean
stt:
type: boolean
agent:
type: boolean
expires_in:
type: integer
maximum: 3600
description: Token validity in seconds.
responses:
'200':
description: The generated access token.
content:
application/json:
schema:
type: object
required:
- token
properties:
token:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
/agents:
get:
operationId: listAgents
tags:
- Agents
summary: List Agents
description: Lists all agents associated with your account.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: A page of agents.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Agent'
'401':
$ref: '#/components/responses/Unauthorized'
/agents/templates:
get:
operationId: listAgentTemplates
tags:
- Agents
summary: List Templates
description: List of public, Cartesia-provided agent templates.
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: A page of agent templates.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
additionalProperties: true
'401':
$ref: '#/components/responses/Unauthorized'
/agents/{id}:
parameters:
- $ref: '#/components/parameters/AgentId'
get:
operationId: getAgent
tags:
- Agents
summary: Get Agent
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: The requested agent.
content:
application/json:
schema:
$ref: '#/components/schemas/Agent'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
patch:
operationId: updateAgent
tags:
- Agents
summary: Update Agent
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
requestBody:
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: The updated agent.
content:
application/json:
schema:
$ref: '#/components/schemas/Agent'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: deleteAgent
tags:
- Agents
summary: Delete Agent
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: Deletion confirmation.
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
/agents/{id}/phone-numbers:
parameters:
- $ref: '#/components/parameters/AgentId'
get:
operationId: listAgentPhoneNumbers
tags:
- Agents
summary: Agent Phone Numbers
parameters:
- $ref: '#/components/parameters/CartesiaVersion'
responses:
'200':
description: Phone numbers assigned to this agent.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
# --- truncated at 32 KB (81 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cartesia-ai/refs/heads/main/openapi/cartesia-ai-openapi.yml