Render Audio#
Script or free text to spoken audio — through the platform's Cartesia engine.
POST
/v2/audio/renderRequest#
| Field | Type | Meaning |
|---|---|---|
touchpoint | string | Touchpoint ID; the tenant's effective script is rendered |
text | string | Alternatively: free text (overrides touchpoint) |
vars | object | Placeholder values, e.g. {"telefon": "+49 30 …"} — {{firma}} and {{domain}} come from the tenant branding automatically |
bash
curl -s -X POST -H "Content-Type: application/json" -H "X-Tenant: bbe" \
-d '{"touchpoint": "call.inbound.greeting"}' \
https://api.callfluence.staging.bestbrandseverywhere.com/v2/audio/render \
-o greeting.mp3Response#
The body is the audio itself (audio/mpeg, MP3 mono 128 kbit/s). The X-Engine-Mode header names the path actually used:
X-Engine-Mode | Meaning |
|---|---|
direct | Directly via api.cartesia.ai (Sonic-3) — active as soon as a CARTESIA_API_KEY is configured |
together-fallback | Via the verified Together path (cartesia/sonic-2) |
If the downstream engine fails, the endpoint responds with 502 and a structured error — never with silent empty audio.
Verified round trip#
The render endpoint and voice-to-text are verified against each other: a rendered script transcribes back word for word.