What to use
You do not need every tool below. Start with an API key and the copy-paste prompt; add the rest when they help.| If you want to… | Use |
|---|---|
| AI helps you integrate Cartesia | Copy the prompt below or Agent Skills — same rules; pick one |
| Ship an app | Client libraries + API conventions |
| Agent finds the right doc pages | llms.txt — fetch the URL; nothing to install on your machine |
| Try voices / TTS inside Cursor or Claude | MCP — optional; not a replacement for SDKs in production |
| Build Cartesia Line voice agents | line-voice-agent skill + Line docs |
Copy into your editor
Paste this into Cursor rules, Claude Code project instructions, or the start of a Cartesia integration thread:Common patterns
Web: button → play audio
- Backend (API key):
POST /access-tokenwithCartesia-Versionand a JSON body ({}or{ "grants": { "tts": true } }). - Browser (access token):
POST /tts/byteswithAuthorization: Bearer <token>, validmodel_id,voice, andoutput_format. - Play the response bytes with
Blob+Audio(or the JS SDK).
Reference links
| Topic | Link |
|---|---|
| Machine-readable docs index | llms.txt · llms-full.txt |
| API conventions | API conventions |
| API keys | play.cartesia.ai/keys |
| Client SDKs | Client libraries |
| Browser TTS example | Play audio in browser |
| Next.js example | Next.js full example |
| MCP | MCP |
| Agent Skills | Agent skills |