Migration guides / Rime
Move Rime AI's Coda API to Cartesia
On Cartesia, the audio format that Rime AI reads from the Accept header moves into the JSON body as output_format.
What happened to Rime
The dated events that ended the Rime API, each linked to its source.
Arcana retired from the Rime cloud API
Requests that set modelId to arcana, arcanav2 or arcanav3 are now served by Coda, which has a different voice catalog. Rime warns that an unsupported speaker and language pair can still return audio, so a successful response doesn't prove the pairing is supported.
Migrate from Rime with your coding agent
Paste this into Claude Code, Cursor or Codex in the repo that calls Rime. It carries the field mapping, the Cartesia request and a rollout that keeps Rime behind a flag until you switch.
Prompt
Move this codebase from Rime to Cartesia for text to speech. Keep Rime working behind a flag until I switch over.
August 15, 2026: Arcana retired from the Rime cloud API. Requests that set `modelId` to `arcana`, `arcanav2` or `arcanav3` are now served by Coda, which has a different voice catalog. Rime warns that an unsupported speaker and language pair can still return audio, so a successful response doesn't prove the pairing is supported. (https://docs.rime.ai/docs/arcana-sunset)
## 1. Find the calls
Search for `coda.api.rime.ai` or `RIME_API_KEY`. The request to replace is `POST https://coda.api.rime.ai/`. List every call site before you edit anything.
## 2. Target
- Request: `POST https://api.cartesia.ai/tts/bytes`
- Model: `model_id: "sonic-3.6"`
- Headers: `X-API-Key` read from the `CARTESIA_API_KEY` environment variable, and `Cartesia-Version: 2026-08-14`
- Auth swap: Rime sends the key in `Authorization: Bearer <key>` from `RIME_API_KEY`. Replace it with `X-API-Key` from `CARTESIA_API_KEY` on the Cartesia path only, and keep `RIME_API_KEY` for the Rime path. Rime rejects a token sent without the `Bearer ` prefix as `invalid api key`. Cartesia's key goes in its own header with no prefix.
- Add `CARTESIA_API_KEY` wherever the project documents its environment (`.env.example`, README, deploy config). Never hardcode the key.
- Request size: Rime caps a request at 1,000 characters per request on the Coda HTTP endpoint. Cartesia publishes no per-request maximum, so keep any chunking the code already does and split at sentence boundaries; for long text, stream over the Cartesia TTS WebSocket.
- Voice IDs don't carry over. Keep each voice ID in one named constant or config value, put a placeholder where each Rime voice was, and list them for me so I can pick replacements at https://www.cartesia.ai/voices.
- Suggested starting points to put in those placeholders, for me to confirm by ear: astra (young American woman, bright and quick) → `8d8ce8c9-44a4-46c4-b10f-9a927b99a853` (Connie - Candid Conversationalist); eyre (American woman, 30 to 50, calm and friendly) → `d7bf7d75-64b7-4c1e-86c0-79d647366587` (Michelle - Empathetic Voice); masonry (man, 30 to 50, confident and low) → `228fca29-3a0a-435c-8728-5cb483251068` (Kiefer - Assured Tone); godfrey (young American man, easygoing) → `630ed21c-2c5c-41cf-9d82-10a7fd668370` (Corey - Supportive Buddy).
## 3. Field mapping, Rime → Cartesia
- `POST https://coda.api.rime.ai/` → `POST https://api.cartesia.ai/tts/bytes`. Rime retired Arcana on August 15, 2026 and now serves Arcana calls with Coda, so Coda is the request to port.
- `Authorization: Bearer <key>` → `X-API-Key` and `Cartesia-Version: 2026-08-14`
- `text`, up to 1,000 characters → `transcript`
- `speaker`, such as `astra` → `voice`: `{"id": "<voice id>"}`
- `lang`, such as `en` → `language`
- `Accept: audio/wav`, `audio/mpeg`, `audio/PCMU`, `audio/L16` → `output_format`: `wav`, `mp3`, `raw` with `pcm_mulaw`, or `raw` with `pcm_s16le`. `audio/L16` is headerless 16-bit PCM, which Cartesia calls the `raw` container with `pcm_s16le`.
- `samplingRate` → `output_format.sample_rate`
- `timeScaleFactor` (below 1.0 is faster) → `generation_config.speed` (above 1.0 is faster). The two scales point in opposite directions. Cartesia's range is also narrower, 0.6 to 1.5 against Rime's 0.4 to 2.5.
- `customLexicon` (X-SAMPA, for `en`, `de`, `es`, `fr`, `it`, `pt`) → `pronunciation_dict_id`. Cartesia pronunciations are written in [IPA](https://docs.cartesia.ai/build-with-cartesia/capability-guides/phonemes), so convert each X-SAMPA entry before you load it into a dictionary.
## 4. Rime fields with no Cartesia equivalent
- `Accept`: Opus in WebM or Ogg. What to do: Ask for `mp3` or raw PCM and encode Opus yourself.
## 5. Reference request
Match the language and HTTP client the codebase already uses. This is the same request in Python:
```python
import os
import requests
text = "Your table for four is booked for seven thirty on Friday."
VOICE_ID = "6ccbfb76-1fc6-48f7-b71d-91ac6298247b" # from /voices
response = requests.post(
"https://api.cartesia.ai/tts/bytes",
headers={
"X-API-Key": os.environ["CARTESIA_API_KEY"],
"Cartesia-Version": "2026-08-14",
},
json={
"model_id": "sonic-3.6",
"transcript": text,
"voice": {"id": VOICE_ID},
"language": "en",
"output_format": {
"container": "wav",
"encoding": "pcm_s16le",
"sample_rate": 24000,
},
},
)
response.raise_for_status()
open("out.wav", "wb").write(response.content)
```
## 6. Roll out
1. Choose Rime or Cartesia per request from one config flag, defaulting to Rime.
2. Run the same scripts through both and save the clips side by side for me to listen to. Check that the container, encoding and sample rate match what downstream code expects.
3. Leave the Rime client, call and key in place so rollback is flipping the flag. Don't delete them in this change.
4. Run the existing tests, and add one that checks the Cartesia request body.
## Docs
- Rime Coda streaming HTTP reference: https://docs.rime.ai/api-reference/coda/http.md
- Rime Arcana sunset notice: https://docs.rime.ai/docs/arcana-sunset
- Rime voices: https://docs.rime.ai/docs/voices.md
- Rime API authentication: https://docs.rime.ai/docs/api-authentication.md
- Cartesia TTS bytes API reference: https://docs.cartesia.ai/api-reference/tts/bytes
- Cartesia IPA phonemes guide: https://docs.cartesia.ai/build-with-cartesia/capability-guides/phonemes
When you're done, tell me which files changed, which fields you couldn't map, and how to flip the flag.Every Rime field, mapped to Cartesia
The prompt carries this table. Each row is a field in your Rime request and the Cartesia field that replaces it.
- Rime
POST https:// coda.api.rime.ai/ CartesiaPOST https:// api.cartesia.ai/ tts/ bytes NoteRime retired Arcana on August 15, 2026 and now serves Arcana calls with Coda, so Coda is the request to port. - Rime
Authorization: Bearer <key>CartesiaX-API-KeyandCartesia-Version: 2026-08-14 - Rime
text, up to 1,000 charactersCartesiatranscript - Rime
speaker, such asastraCartesiavoice:{"id": "<voice id>"} - Rime
lang, such asenCartesialanguage - Rime
Accept: audio/wav,audio/mpeg,audio/PCMU,audio/L16Cartesiaoutput_format:wav,mp3,rawwithpcm_mulaw, orrawwithpcm_s16leNoteaudio/L16is headerless 16-bit PCM, which Cartesia calls therawcontainer withpcm_s16le. - Rime
samplingRateCartesiaoutput_format.sample_rate - Rime
timeScaleFactor(below 1.0 is faster)Cartesiageneration_config.speed(above 1.0 is faster)NoteThe two scales point in opposite directions. Cartesia's range is also narrower, 0.6 to 1.5 against Rime's 0.4 to 2.5. - Rime
customLexicon(X-SAMPA, foren,de,es,fr,it,pt)Cartesiapronunciation_dict_idNoteCartesia pronunciations are written in IPA, so convert each X-SAMPA entry before you load it into a dictionary.
Rime API key and auth, mapped to Cartesia
Cartesia reads the key from the X-API-Key header and pins the API version with Cartesia-Version on every request.
- Rime
Authorization: Bearer <key>CartesiaX-API-KeyplusCartesia-Version: 2026-08-14NoteRime rejects a token sent without theBearerprefix asinvalid api key. Cartesia's key goes in its own header with no prefix. - Rime
RIME_API_KEYCartesiaCARTESIA_API_KEY
Rime API pricing per 1,000 characters
List prices per 1,000 characters from the vendor's own pricing page. Plans, regions and volume discounts change what you pay.
- Model or plan
Coda v2 on Flex
RimeNot publishedNoteRime publishes per-minute rates only: $0.050 a minute for Coda v2 - Model or plan
Coda v2 on Scale ($100 a month)
RimeNot publishedNote$0.040 a minute, 20% off Flex - Model or plan
Mist v3 on Flex
RimeNot publishedNote$0.030 a minute
On Cartesia, usage draws from your plan's credits: 20,000 credits a month on the Free plan (about 20,000 characters). Enterprise pricing is custom.
Cartesia plans and pricingSources
Prices read from each company's pricing page in November 2026.
Rime limits compared with Cartesia
Published limits from both companies. Plans change them, so check both pages before you size a rollout.
- Limit
Free tier
Cartesia20,000 credits a month on the Free plan (about 20,000 characters)Rime$50 of usage every month on the Free plan - Limit
Request limit
CartesiaNo published maximum; stream long text over the TTS WebSocketRime1,000 characters per request on the Coda HTTP endpoint - Limit
Voices
Cartesia1,022 voices in the library, plus instant clonesRime313 Coda voices and 78 Mist v3 voices - Limit
Languages
Cartesia44 languages for text to speechRime10 on Coda v2, 4 on Mist v3
Cartesia's figures come from its pricing page and voice library.
Cartesia pricing and plan limitsSources
Limits read from each company's documentation in November 2026.
Rime voices and where to start on Cartesia
Rime AI voices are speaker names such as astra or masonry, and each one speaks a single language: 185 of Coda's 313 are English.
Each card is a starting point for a common Rime pick, matched by language and use. Listen before you choose.
What you get on Cartesia
What changes once the Rime call is gone.
44 languages on one model
Coda takes 10 values for lang. Sonic speaks 44, so adding a market means changing language on the same model.
Volume and emotion as request fields
generation_config sets volume from 0.5 to 2.0 and an emotion such as calm, next to speed, on sonic-3 and newer.
How to migrate from Rime to Cartesia
The same changes the prompt makes, if you'd rather make them yourself.
Issue a Cartesia API key for the service that calls Rime today.
Pick a voice for each Rime speaker in the voice library. Speaker names such as
astradon't exist on Cartesia.Swap the request. Move the audio type out of the
Acceptheader intooutput_format, and turn eachtimeScaleFactorinto its inversespeed.Convert your
customLexiconentries from X-SAMPA to IPA and load them into one pronunciation dictionary.Run the same scripts on both vendors, then shift traffic.
Sources
Request shapes checked against vendor documentation in November 2026.
Compare and read next
Frequently asked questions
Is Rime AI the same as Rime TTS?
Yes. Rime AI is the company at rime.ai, and its text to speech models are Coda and Mist v3. This guide ports the Coda HTTP call, which is also where Arcana traffic now lands.
How is Rime AI pricing metered?
By the minute of audio. Flex has no monthly fee, Scale costs $100 a month and takes 20% off every rate, and the Free plan includes $50 of usage each month. Cartesia bills credits per character, so price a sample of your own scripts on both.
Where does the audio format go?
Rime reads it from the Accept header. Cartesia reads it from the output_format object in the JSON body.
Which way does speed go?
A Rime timeScaleFactor above 1.0 slows speech down. A Cartesia speed above 1.0 speeds it up, within 0.6 to 1.5.
What doesn't carry over?
Opus output, timeScaleFactor values that fall outside 0.6 to 1.5 once inverted, and lexicon entries in X-SAMPA until you convert them to IPA. Speaker names start over as well.
Can I keep Rime live while I test?
Yes. Send each call through a flag that picks the vendor, move a slice of calls to Cartesia, and compare on your own call recordings. If something sounds off, the flag sends that traffic back to Rime.
Get started today
Talk to an expert.
Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.
Start building.
Create an API key, then hand your coding agent the migration prompt and a few of your own scripts.