Browse documentation

Errors

HTTP errors return a JSON body with a code field. Retry only what is marked retryable.

HTTP errors

CodeHTTPMeaning
UNAUTHORIZED401API key missing, malformed, or revoked.
INVALID_INPUT400Malformed request body.
INSUFFICIENT_BALANCE402Not enough balance to open a stream.
CONCURRENCY_LIMIT429Account-wide limit (all keys share it), the global cap, or a regional pool share. There is no per-key cap.
NOT_FOUND404Recording or stream does not exist for this user.
ADMISSION_DISABLED503API admission is off on this deployment.
REGION_UNAVAILABLE503No healthy node in the requested region. When region is omitted, every region was unavailable.

WebSocket close codes

Every retryable close code resolves the same way: call connect again and open a new stream. There is no reconnect path that preserves a stream.

CodeMeaningWhat to do
4001Token invalid or expiredCall connect again for a fresh token.
4003sessionId mismatchDo not retry. Fix the client.
4004Session is not on this nodeCall connect again for a fresh url.
4010Balance exhaustedTop up, then call connect again.
4011Concurrency limit reachedBack off, then call connect again.
1003Protocol errorDo not retry. Fix the client.
1012Gateway restartingCall connect again for a fresh url.
4012Max duration (4 hours)Call connect again for a new stream.
4013Idle timeout: 60 seconds with no audio. Ping does not reset it.Send audio, or call connect again.
4014Billing was not confirmedCall connect again after the account can be charged.
4015API key revokedCreate a new key, then call connect again.
4016Client reads too slowlyCall connect again for a new stream.

Each stream is rounded up to whole minutes of accepted audio at settlement. A reconnect creates a separately billed stream. No accepted audio means no charge.