# 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.

Devtoolwatch Board, the week of Oct 25–31, 2026. Canonical page: https://index.devtoolwatch.com/tools/cartesia-sdk/

## 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.

## Cartesia SDK at a glance

- **Category:** [Voice and realtime](https://index.devtoolwatch.com/categories/voice-and-realtime/)
- **Maintained by:** Cartesia (organization, [@cartesia-ai](https://github.com/cartesia-ai) on GitHub)
- **License:** Apache 2.0
- **Language:** Python, Shell, Dockerfile
- **Repository:** [github.com/cartesia-ai/cartesia-python](https://github.com/cartesia-ai/cartesia-python)
- **npm package:** [@cartesia/cartesia-js](https://www.npmjs.com/package/@cartesia/cartesia-js) 4.2.0
- **PyPI package:** [cartesia](https://pypi.org/project/cartesia/) 4.2.0
- **Latest release:** [v4.2.0](https://github.com/cartesia-ai/cartesia-python/releases/tag/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 Cartesia SDK

**With pip**

```
pip install cartesia
```

**With 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

1. Install the package with pip, adding the websockets extra if you need streaming.
2. Set the CARTESIA_API_KEY environment variable and create a Cartesia client with it.
3. Call client.tts.generate with a model_id, voice, output_format and transcript, then write the response to a file.
4. 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

- 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.

## Usage data (the week of Oct 25–31, 2026)

- Board rank: #305 overall, #16 in Voice and realtime, momentum score 31
- Downloads that week: 351.2k (+10% vs 4-week average)
- New GitHub stars per week (last 12 weeks): Aug 9: 0; Aug 16: 0; Aug 23: 5; Aug 30: 1; Sep 6: 0; Sep 13: 0; Sep 20: 0; Sep 27: 0; Oct 4: 1; Oct 11: 0; Oct 18: 1; Oct 25: 2

## Cartesia SDK alternatives

| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | [faster-whisper](https://index.devtoolwatch.com/tools/faster-whisper/) | 26.4k | 4.4M |
| #2 | [Kokoro](https://index.devtoolwatch.com/tools/kokoro/) | 9.8k | 150.7k |
| #3 | [Chatterbox](https://index.devtoolwatch.com/tools/chatterbox/) | 27.5k | 73.2k |
| #4 | [VoiceMem](https://index.devtoolwatch.com/tools/xzf-thu-voicemem/) | 2.8k | – |
| #5 | [Pipecat](https://index.devtoolwatch.com/tools/pipecat/) | 17k | 348.5k |
| #6 | [WhisperX](https://index.devtoolwatch.com/tools/whisperx/) | 25k | 158.6k |

## 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

1. [cartesia-ai/cartesia-python on GitHub](https://github.com/cartesia-ai/cartesia-python)
2. [Cartesia SDK README](https://github.com/cartesia-ai/cartesia-python/blob/main/README.md)
3. [@cartesia/cartesia-js on npm](https://www.npmjs.com/package/@cartesia/cartesia-js)
4. [cartesia on PyPI](https://pypi.org/project/cartesia/)
5. [Release v4.2.0 (Sep 2, 2026)](https://github.com/cartesia-ai/cartesia-python/releases/tag/v4.2.0)
6. [Release v4.1.0 (Aug 26, 2026)](https://github.com/cartesia-ai/cartesia-python/releases/tag/v4.1.0)
7. [Release v4.0.1 (Aug 14, 2026)](https://github.com/cartesia-ai/cartesia-python/releases/tag/v4.0.1)
8. [Devtoolwatch Board, the week of Oct 25–31, 2026](https://index.devtoolwatch.com/)
