Errors & Warnings
Errors & Warnings
Overview
The Murf TTS API reports problems in two different ways depending on the transport:
- HTTP streaming (
POST /v1/speech/stream) and synthesis (POST /v1/speech/generate) return a standard HTTP status code. - WebSocket streaming (
/v1/speech/stream-input) returns JSONerrorandwarningframes on the open connection, and uses WebSocket close codes for connection-level failures.
How to handle errors
Every WebSocket error and warning frame carries a machine-readable code alongside the human-readable text.
- Branch on
error_codeandwarning_code, never on the prose. The wording can change at any time; the codes are stable. "fatal": truemeans nothing further is coming for that context. Stop waiting for audio orfinaland clean up.- A
warningis not fatal. Something was ignored or substituted, and synthesis continues. trace_idis present on every frame, includingaudioandfinal, not just on errors. Quote it when you contact support.
HTTP errors
These apply to POST /v1/speech/stream and POST /v1/speech/generate.
WebSocket errors
An error frame looks like this:
WebSocket warnings
Warnings mean something in your frame was ignored or substituted. Synthesis continues, so you will still receive audio.
Connection close codes
An invalid API key on a WebSocket connection is not reported as HTTP 401. The upgrade succeeds first, so clients that only inspect the HTTP response never see the failure. Always handle the close code.
Recommended handling pattern
FAQs
Why do I get 403 instead of 401 for a bad API key?
The HTTP endpoints return 403 for both invalid and expired keys. There is no 401 response. Over WebSockets the connection is closed with code 1008 instead, because the HTTP upgrade has already completed by the time the key is rejected.
What causes ACTIVE_CONTEXT_LIMIT_EXCEEDED?
Concurrency is counted by the number of simultaneously active
context_ids, not by the number of connections. Closing each turn with
{"end": true} frees its slot. See
Rate Limits for per-plan numbers.
Should I retry on a warning?
No. Warnings are informational and synthesis continues with a default or the previously accepted value. Fix the offending field in your next frame.
What should I include in a support request?
The trace_id from any frame in the affected context, the context_id,
the endpoint host you connected to, and the approximate time of the
request.