Cartesia SDK review
Cartesia SDK is the official Python client for the Cartesia REST API, with sync, async and websocket clients for text-to-speech.
TL;DR
Cartesia SDK is the official Python library for calling the Cartesia API from Python 3.9+ applications. It is for developers adding Cartesia text-to-speech to their apps, including voice agents. It offers typed requests and responses, sync and async clients, and websocket streaming of transcript parts.
- 137GitHub stars
- +2new stars, week of Oct 25
- ~351.2kdownloads a week, +10% vs 4-week avg
- #16in Voice and realtime this week
Cartesia SDK at a glance
- Category
- Voice and realtime
- Maintained by
- Cartesia (organization, @cartesia-ai on GitHub)
- License
- Apache 2.0
- Language
- Python, Shell, Dockerfile
- Repository
- github.com/cartesia-ai/cartesia-python
- npm package
- @cartesia/cartesia-js 4.2.0
- PyPI package
- cartesia 4.2.0
- Latest release
- v4.2.0 on GitHub, Sep 2, 2026
- First published
- Oct 4, 2024
What Cartesia SDK does
- Cartesia SDK generates text-to-speech audio with Cartesia's Sonic models and writes it to a file.
- Cartesia SDK streams transcript parts over websockets, useful for LLM-generated text in latency-sensitive apps such as voice agents.
- Cartesia SDK provides synchronous and asynchronous clients built on httpx, with an optional aiohttp backend.
- Cartesia SDK includes type definitions: TypedDict request params and Pydantic response models.
- Cartesia SDK auto-paginates list methods such as voices.list().
- Cartesia SDK retries certain errors twice by default with exponential backoff and times out requests after one minute.
- Cartesia SDK supports file uploads to datasets as bytes, PathLike objects, or tuples.
How it works
You install the cartesia package and create a Cartesia or AsyncCartesia client with your API key. The client calls the Cartesia REST API over HTTP, or opens a websocket for streaming TTS. It sends a cartesia-version header set to 2026-08-14 by default. Responses are Pydantic models; audio arrives as files or streamed chunks.
How to install and start using Cartesia SDK
With pip
pip install cartesiaWith websocket support
pip install 'cartesia[websockets]'With aiohttp backend
pip install 'cartesia[aiohttp]'Requirements
- Python 3.9 or later.
- A Cartesia API key, passed via api_key, for example from CARTESIA_API_KEY.
First steps
- Install the package with pip, adding the websockets extra if you need streaming.
- Set the CARTESIA_API_KEY environment variable and create a Cartesia client with it.
- Call client.tts.generate with a model_id, voice, output_format and transcript, then write the response to a file.
- Set CARTESIA_LOG to info or debug to enable logging.
Who Cartesia SDK is for
- Python developers adding Cartesia text-to-speech to applications.
- Voice agent builders streaming LLM output into speech over websockets.
- Async Python services generating many concurrent audio streams over a single websocket.
Limitations to know
- Cartesia SDK is a client for the Cartesia API; it needs an API key and network access.
- Cartesia SDK websocket support needs the websockets extra installed separately.
- Cartesia SDK is Python only; TypeScript users need the separate @cartesia/cartesia-js package.
Is Cartesia SDK growing? Usage data
In the week of Oct 25–31, 2026, Cartesia SDK ranked #305 on the Devtoolwatch Board and #16 in Voice and realtime, with a momentum score of 31 out of 100. Its main package had about 351.2k downloads that week, +10% against its own 4-week average.
Show the weekly numbers
| Week of | New stars |
|---|---|
| Aug 9, 2026 | 0 |
| Aug 16, 2026 | 0 |
| Aug 23, 2026 | 5 |
| Aug 30, 2026 | 1 |
| Sep 6, 2026 | 0 |
| Sep 13, 2026 | 0 |
| Sep 20, 2026 | 0 |
| Sep 27, 2026 | 0 |
| Oct 4, 2026 | 1 |
| Oct 11, 2026 | 0 |
| Oct 18, 2026 | 1 |
| Oct 25, 2026 | 2 |
The Board ranks tools by four signals each week: new stars, new stars for the repo's size, added downloads and download growth beyond the market. How the ranking works.
Cartesia SDK alternatives
Other voice and realtime AI tools on the Board in the week of Oct 25–31, 2026, by momentum:
| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | faster-whisperfaster-whisper is a Python reimplementation of OpenAI's Whisper speech-to-text model built on the CTranslate2 inference engine for… | 26.4k | 4.4M |
| #2 | KokoroKokoro is a Python inference library for Kokoro-82M, an open-weight text-to-speech model with 82 million parameters. | 9.8k | 150.7k |
| #3 | ChatterboxChatterbox is a family of open-source text-to-speech and voice cloning models by Resemble AI, with English and multilingual variants. | 27.5k | 73.2k |
| #4 | VoiceMemInfrastructure for the next generation of voice agents, designed to provide universal memory. It is divided into a left brain and a… | 2.8k | – |
| #5 | PipecatPipecat is an open-source Python framework for building real-time voice and multimodal conversational agents, maintained by Daily and… | 17k | 348.5k |
| #6 | WhisperXWhisperX is a Python speech recognition tool built on Whisper that adds word-level timestamps and speaker diarization. | 25k | 158.6k |
Recent Cartesia SDK releases
Cartesia SDK FAQ
Is Cartesia SDK free and open source?
Yes. Cartesia SDK's source code is on GitHub (cartesia-ai/cartesia-python) under the Apache 2.0 license, so you can use it for free.
How do I install Cartesia SDK?
Run pip install cartesia. The install section above has the other options from the project's README.
Is Cartesia SDK still maintained?
Yes. The cartesia-ai/cartesia-python repository was last updated on Oct 16, 2026, and the latest release, v4.2.0 on GitHub, came out on Sep 2, 2026.
How popular is Cartesia SDK?
Cartesia SDK has 137 GitHub stars as of Nov 1, 2026. It gained 2 new stars in the week of Oct 25–31, 2026, against a 12-week average of 1 a week. Its main package had about 351.2k downloads that week, +10% against its own 4-week average. That made it #16 among voice and realtime AI tools on the Devtoolwatch Board.
What are the best alternatives to Cartesia SDK?
Other voice and realtime AI tools on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: faster-whisper (#1), Kokoro (#2), Chatterbox (#3), VoiceMem (#4), Pipecat (#5). The alternatives table above has their numbers.
Does Cartesia SDK support async Python?
Yes. Cartesia SDK provides AsyncCartesia; import it instead of Cartesia and await each call. Functionality is otherwise identical to the sync client. You can also use aiohttp as the HTTP backend for improved concurrency.
How do I stream text into Cartesia SDK for a voice agent?
Cartesia SDK uses client.tts.websocket_connect() to open a context, push transcript parts with ctx.push, call ctx.no_more_inputs(), and read audio chunks from ctx.receive() as they arrive.
How does Cartesia SDK handle errors and retries?
Cartesia SDK raises APIConnectionError for connection problems and APIStatusError subclasses for 4xx and 5xx responses. Connection errors, 408, 409, 429 and 5xx are retried twice by default, configurable with max_retries.
Which API version does Cartesia SDK use?
Cartesia SDK sends the cartesia-version header set to 2026-08-14 by default. Version 4.0.0 generated the SDK for that API version. You can override the header via default_headers.
Sources
Cartesia SDK README badge
Maintainers can show the tool's weekly Board rank in their README:
[](https://index.devtoolwatch.com/tools/cartesia-sdk/)How this page is made: Devtoolwatch writes each review from the project's README, releases, package metadata and website, with an AI model, then checks every claim against the source it cites and drops what the sources don't support. The numbers come from Devtoolwatch's daily GitHub snapshots, GitHub's stargazer history, and the npm and PyPI download APIs. Spotted an error? Email [email protected].