Migration guides / Murf API
Move the Murf AI API to Cartesia
Cartesia /tts/bytes returns the audio in the response body, where the Murf AI API's Gen2 endpoint returns a file URL you then download.
What happened to Murf API
The dated events that ended the Murf API API, each linked to its source.
Gen2 streaming decommissioned
Murf took Gen2 off its streaming API and points streaming users to Falcon 2.1. Gen2 now runs only on the non-streaming generate endpoint, so any Gen2 streaming code needs rewriting whichever vendor you pick.
Murf API changelogMigrate from Murf API with your coding agent
Paste this into Claude Code, Cursor or Codex in the repo that calls Murf API. It carries the field mapping, the Cartesia request and a rollout that keeps Murf API behind a flag until you switch.
Prompt
Move this codebase from Murf API to Cartesia for text to speech. Keep Murf API working behind a flag until I switch over.
October 5, 2026: Gen2 streaming decommissioned. Murf took Gen2 off its streaming API and points streaming users to Falcon 2.1. Gen2 now runs only on the non-streaming generate endpoint, so any Gen2 streaming code needs rewriting whichever vendor you pick. (https://murf.ai/api/docs/changelog)
## 1. Find the calls
Search for `api.murf.ai` or `MURF_API_KEY`. The request to replace is `POST /v1/speech/generate` (Gen2). 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: Murf API sends the key in `api-key` header from `MURF_API_KEY`. Replace it with `X-API-Key` from `CARTESIA_API_KEY` on the Cartesia path only, and keep `MURF_API_KEY` for the Murf API path. Murf also accepts a short-lived `token` header minted from its generate-token endpoint. Cartesia takes the API key on server-side calls.
- Add `CARTESIA_API_KEY` wherever the project documents its environment (`.env.example`, README, deploy config). Never hardcode the key.
- Request size: Murf API caps a request at 3,000 characters per request. 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.
- Concurrency: Murf API allows 5 concurrent TTS requests on the free trial and pay as you go; Falcon 2.1 allows 2 on the global and regional endpoints, 5 on US-East. Look up the Cartesia plan's concurrent request limit at https://www.cartesia.ai/pricing, cap parallel requests at it, and retry rate-limit errors with backoff.
- Voice IDs don't carry over. Keep each voice ID in one named constant or config value, put a placeholder where each Murf API 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: en-US-natalie (US English, e-learning and explainers) → `26403c37-80c1-4a1a-8692-540551ca2ae5` (Marian - Poised Narrator); en-US-miles (US English, instructional) → `2948c301-9211-4112-8f36-4c3fc836ef12` (Bryce - Clear Explainer); en-UK-ruby (British English, calm voiceover) → `273f9ef7-9fc2-4def-88bb-ab108c6249ca` (Julia - Gentle Guide); en-UK-theo (British English, narration) → `5568a7df-e5ab-4442-9fae-2e9ba1b15ad8` (Quentin - Refined Narrator).
## 3. Field mapping, Murf API → Cartesia
- `POST /v1/speech/generate` (Gen2) → `POST /tts/bytes`
- `POST /v1/speech/stream` or the `stream-input` WebSocket (Falcon 2.1) → The TTS WebSocket. Sonic sends audio back in chunks while it generates; the [WebSocket reference](https://docs.cartesia.ai/api-reference/tts/websocket) has the message format.
- `api-key` header → `X-API-Key` and `Cartesia-Version: 2026-08-14`
- `text`, up to 3,000 characters → `transcript`
- `voiceId`, such as `en-US-natalie` → `voice`: `{"id": "<voice id>"}`
- `modelVersion`: `GEN2` → `model_id`: `sonic-3.6`
- `locale`, such as `en-US` → `language`: `en` or `en-US`
- `rate` (-50 to 50) → `generation_config.speed`. Cartesia's speed is a multiplier from 0.6 to 1.5. The two scales don't convert exactly, so set it by ear.
- `format`: `WAV`, `MP3`, `PCM`, `ULAW`, `ALAW` → `output_format.container` and `encoding`. `ULAW` becomes `raw` with `pcm_mulaw`, `ALAW` becomes `raw` with `pcm_alaw`, and `PCM` becomes `raw` with `pcm_s16le`.
- `sampleRate` → `output_format.sample_rate`
- `pronunciationDictionary`, a map sent with each request → `pronunciation_dict_id`. Create the dictionary once on Cartesia, then pass its ID.
- `wordDurations` in the response → `add_timestamps` on the TTS WebSocket. `/tts/bytes` returns no timings. Word timestamps come back as WebSocket events.
- `audioFile` URL, or `encodedAudio` with `encodeAsBase64` → Audio bytes in the response body
## 4. Murf API fields with no Cartesia equivalent
- `pitch` (-50 to 50). What to do: Cast a voice whose natural pitch already fits the script.
- `format`: `FLAC`, `OGG`. What to do: Generate `wav` or `mp3` and convert it in your pipeline.
## 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 = "Module three covers how to file an expense report."
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": 44100,
},
},
)
response.raise_for_status()
open("out.wav", "wb").write(response.content)
```
## 6. Roll out
1. Choose Murf API or Cartesia per request from one config flag, defaulting to Murf API.
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 Murf API 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
- Murf generate speech reference: https://murf.ai/api/docs/api-reference/text-to-speech/generate
- Murf stream speech reference: https://murf.ai/api/docs/api-reference/text-to-speech/stream
- Murf rate limits and concurrency: https://murf.ai/api/docs/resources/rate-limits
- Cartesia TTS bytes API reference: https://docs.cartesia.ai/api-reference/tts/bytes
When you're done, tell me which files changed, which fields you couldn't map, and how to flip the flag.Every Murf API field, mapped to Cartesia
The prompt carries this table. Each row is a field in your Murf API request and the Cartesia field that replaces it.
- Murf API
POST /v1/speech/generate(Gen2)CartesiaPOST /tts/bytes - Murf API
POST /v1/speech/streamor thestream-inputWebSocket (Falcon 2.1)CartesiaThe TTS WebSocketNoteSonic sends audio back in chunks while it generates; the WebSocket reference has the message format. - Murf API
api-keyheaderCartesiaX-API-KeyandCartesia-Version: 2026-08-14 - Murf API
text, up to 3,000 charactersCartesiatranscript - Murf API
voiceId, such asen-US-natalieCartesiavoice:{"id": "<voice id>"} - Murf API
modelVersion:GEN2Cartesiamodel_id:sonic-3.6 - Murf API
locale, such asen-USCartesialanguage:enoren-US - Murf API
rate(-50 to 50)Cartesiageneration_config.speedNoteCartesia's speed is a multiplier from 0.6 to 1.5. The two scales don't convert exactly, so set it by ear. - Murf API
format:WAV,MP3,PCM,ULAW,ALAWCartesiaoutput_format.containerandencodingNoteULAWbecomesrawwithpcm_mulaw,ALAWbecomesrawwithpcm_alaw, andPCMbecomesrawwithpcm_s16le. - Murf API
sampleRateCartesiaoutput_format.sample_rate - Murf API
pronunciationDictionary, a map sent with each requestCartesiapronunciation_dict_idNoteCreate the dictionary once on Cartesia, then pass its ID. - Murf API
wordDurationsin the responseCartesiaadd_timestampson the TTS WebSocketNote/tts/bytesreturns no timings. Word timestamps come back as WebSocket events. - Murf API
audioFileURL, orencodedAudiowithencodeAsBase64CartesiaAudio bytes in the response body
Murf 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.
- Murf API
api-keyheaderCartesiaX-API-KeyplusCartesia-Version: 2026-08-14NoteMurf also accepts a short-livedtokenheader minted from its generate-token endpoint. Cartesia takes the API key on server-side calls. - Murf API
MURF_API_KEYCartesiaCARTESIA_API_KEY
Murf 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
Murf Falcon 2.1, pay as you go
Murf API$0.010NoteMurf's model for real-time voice agents; new accounts get $10 of free API usage - Model or plan
Murf Gen2, pay as you go
Murf API$0.030NoteMurf's studio voiceover model
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.
Murf API 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)Murf API$10 of API credit once, at signup, with no card - Limit
Request limit
CartesiaNo published maximum; stream long text over the TTS WebSocketMurf API3,000 characters per request - Limit
Voices
Cartesia1,022 voices in the library, plus instant clonesMurf API150+ voices - Limit
Languages
Cartesia44 languages for text to speechMurf API35 languages
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.
Murf API voices and where to start on Cartesia
Murf AI voices are IDs that combine locale and name, such as en-US-natalie or en-UK-theo, each with its own list of styles.
Each card is a starting point for a common Murf API pick, matched by language and use. Listen before you choose.
What you get on Cartesia
What changes once the Murf API call is gone.
The audio comes back in the response
/tts/bytes answers with the audio bytes, so the second request to fetch audioFile and the base64 decode both go away.
Clone a voice on a self-serve plan
An instant clone needs 10 seconds of a recording you have permission to use, on the Pro plan and up. A professional clone needs 30 minutes, on the Startup plan and up. Murf's API pricing page lists professional voice cloning under Enterprise.
How to migrate from Murf API to Cartesia
The same changes the prompt makes, if you'd rather make them yourself.
Sign up for Cartesia and create an API key.
Shortlist voices in the voice library and render a few of your real scripts on each. Murf voice IDs have no Cartesia counterpart.
Collapse the generate-then-download code into the single request above. Pick a
speedvalue by listening, and droppitch.If you narrate in several locales, set
languageon each request and review every locale before cutover.
Sources
Request shapes checked against vendor documentation in November 2026.
Compare and read next
Frequently asked questions
Is Murf AI free?
The Murf API gives each new account $10 of free credit, which covers about a million Falcon 2.1 characters at $0.01 per 1,000. After that it is pay as you go. Cartesia's Free plan renews every month at 20,000 credits, about 20,000 characters.
Does Cartesia return a download link?
No. The audio is the response body of /tts/bytes, so there is no second request to make.
Can I clone a voice the way Murf AI voice cloning does?
Yes, with a recording you have permission to use. An instant clone needs 10 seconds of audio; the cloning guide walks through it.
What doesn't carry over?
pitch, FLAC and Ogg output, and word durations on a plain HTTP call. Word timestamps are available, but only as WebSocket events. Murf voice IDs don't map to Cartesia voices, so plan a casting pass.
Can I switch back if a voice doesn't work out?
Yes. Keep both clients behind a flag per project or per voice, regenerate a sample of your scripts on Cartesia, and point the flag back at Murf for anything that fails review.
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.