---
title: "How to Switch from ElevenLabs to Cartesia"
description: "Switch ElevenLabs text-to-speech to Cartesia while keeping the ElevenLabs SDK. Point it at AllModels, then change the model and voice."
canonical: "https://allmodels.io/guides/how-to-switch-from-elevenlabs-to-cartesia"
markdown: "https://allmodels.io/guides/how-to-switch-from-elevenlabs-to-cartesia.md"
author: "AllModels"
datePublished: "2026-07-30"
dateModified: "2026-07-30"
---

# How to Switch from ElevenLabs to Cartesia

Keep the ElevenLabs SDK. Point it at AllModels, then replace the model and voice. Your speech-generation call stays the same.

## The short answer

1. Use your AllModels API key and set the SDK base URL to `https://api.allmodels.io/el`.
2. Set the model to `cartesia/sonic-3.5` and replace `CARTESIA_VOICE_ID` with a [Cartesia voice ID](https://allmodels.io/model?model=cartesia%2Fsonic-3.5#voices).

> AllModels is an independent service and is not affiliated with, endorsed by, or sponsored by OpenAI, ElevenLabs, Fish Audio, or Cartesia.

## Code

These examples generate an MP3 response. The provider migration only changes the client configuration, model, and voice.

### JavaScript

Before — ElevenLabs:

```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

const client = new ElevenLabsClient({
  apiKey: process.env.ELEVENLABS_API_KEY
});

const audio = await client.textToSpeech.convert("ELEVENLABS_VOICE_ID", {
  text: "Hello from my application",
  modelId: "eleven_flash_v2_5",
  outputFormat: "mp3_44100_128"
});
```

After — Cartesia through AllModels:

```javascript
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

const client = new ElevenLabsClient({
  apiKey: process.env.ALLMODELS_API_KEY,
  baseUrl: "https://api.allmodels.io/el"
});

const audio = await client.textToSpeech.convert("CARTESIA_VOICE_ID", {
  text: "Hello from my application",
  modelId: "cartesia/sonic-3.5",
  outputFormat: "mp3_44100_128"
});
```

### Python

Before — ElevenLabs:

```python
import os
from elevenlabs.client import ElevenLabs

client = ElevenLabs(
    api_key=os.environ["ELEVENLABS_API_KEY"],
)

audio = client.text_to_speech.convert(
    "ELEVENLABS_VOICE_ID",
    text="Hello from my application",
    model_id="eleven_flash_v2_5",
    output_format="mp3_44100_128",
)
```

After — Cartesia through AllModels:

```python
import os
from elevenlabs.client import ElevenLabs

client = ElevenLabs(
    api_key=os.environ["ALLMODELS_API_KEY"],
    base_url="https://api.allmodels.io/el",
)

audio = client.text_to_speech.convert(
    "CARTESIA_VOICE_ID",
    text="Hello from my application",
    model_id="cartesia/sonic-3.5",
    output_format="mp3_44100_128",
)
```

## Keep using the ElevenLabs SDK

Switching providers through AllModels is intentionally simple: keep the SDK and request flow you already use, point the client at AllModels, then choose a different model and voice.

The compatible ElevenLabs SDK surface supports:

- [text-to-speech and streaming TTS](https://docs.allmodels.io/elevenlabs/text-to-speech)
- [file transcription](https://docs.allmodels.io/elevenlabs/transcription)
- [realtime transcription](https://docs.allmodels.io/elevenlabs/realtime)
- [Speech Engine conversations](https://docs.allmodels.io/elevenlabs/speech-engine)
- [voice discovery](https://docs.allmodels.io/elevenlabs/voices)

Read the [complete ElevenLabs SDK compatibility guide](https://docs.allmodels.io/elevenlabs) for setup details, supported methods, and current limitations.

## About Cartesia Sonic 3.5

This guide switches speech generation to Sonic 3.5, Cartesia’s streaming text-to-speech model. Cartesia highlights natural pacing and emotional expression, accurate transcript following, clean multilingual audio, natural handling of alphanumeric text, and support for 42 languages.

Cartesia’s Ink-2 announcement covers the complementary speech-to-text side of its voice stack, not the TTS model used in the code above. Cartesia describes Ink-2 as a realtime voice-agent transcription model focused on accuracy, semantic turn detection, and low time-to-final-transcript.

- [Read about Cartesia Sonic 3.5](https://docs.cartesia.ai/build-with-cartesia/tts-models/latest)
- [Read Cartesia’s Ink-2 announcement](https://www.cartesia.ai/blog/ink-2)

## Common migration questions

### Do I need to replace the ElevenLabs SDK?

No. Keep the installed SDK and its speech method. AllModels exposes a compatible base URL for it.

### Can I reuse my ElevenLabs voice?

No. Choose a voice from the [Cartesia Sonic 3.5 voice list](https://allmodels.io/model?model=cartesia%2Fsonic-3.5#voices), then replace `CARTESIA_VOICE_ID` with its ID.

### Can I switch providers again later?

Yes. Keep the AllModels base URL and API key, then change the model and voice to another supported provider.

## Continue

- [Browse Cartesia models](https://allmodels.io/models?provider=cartesia)
- [Read the AllModels documentation](https://docs.allmodels.io)
- [View the canonical HTML guide](https://allmodels.io/guides/how-to-switch-from-elevenlabs-to-cartesia)
