Errors & limits
Errors use OpenAI's wire format, so SDKs raise their native error classes (AuthenticationError, RateLimitError, BadRequestError, …) exactly as they do against OpenAI:
{
"error": {
"message": "'input' is too long: 5000 characters (maximum 4096).",
"type": "invalid_request_error",
"param": "input",
"code": null
}
}Status codes
| Status | type | When |
|---|---|---|
| 400 | invalid_request_error | Malformed body, unknown voice/model, unsupported format, out-of-range values. param names the offending field. |
| 401 | invalid_request_error | Missing or unknown API key (code: invalid_api_key). |
| 413 | invalid_request_error | Uploaded file over the 4 MB limit (code: file_too_large). |
| 429 | rate_limit_error | Too many requests (code: rate_limit_exceeded). Honor the Retry-After header. |
| 502 | api_error | Speech synthesis or transcription failed upstream. Safe to retry. |
| 504 | api_error | The request timed out (code: timeout). Retry, or shorten the input. |
Limits
| TTS input | 4,096 characters per request |
| TTS speed | 0.25 – 4.0 |
| STT file size | 4 MB per file |
| STT containers | webm, mp4, ogg, wav, mp3 |
| Playground demo | 300 characters, rate-limited per IP |
Not supported yet
- TTS
response_format:opus,flac(use mp3/wav/aac/pcm). - STT
response_format:srt,vtt, and segment-level timestamps. - Server-sent-events streaming (
stream_format: sse) — useresponse_format: pcmfor streaming audio.
Per-key rate limits are generous and set per project during the beta — if you're hitting 429s or need any of the unsupported features, email help@runanything.ai and we'll sort it out.