Handle errors
Understand API errors, status codes, and optional job logs.
AudioLasso errors are designed to be simple to handle in code and readable by humans.
{
"error": {
"code": "INVALID_AUDIO_URL",
"message": "input.audio_url must be a public HTTPS URL.",
"param": "input.audio_url",
"request_id": "req_01jabc"
}
}HTTP status codes
| Status | Meaning |
|---|---|
400 | Invalid request body or parameter |
401 | Missing or invalid API key |
402 | Not enough credits |
403 | API key is missing a required scope |
404 | Request or file was not found |
409 | Request is not ready for the attempted operation |
410 | Temporary file or result expired |
413 | File is too large |
429 | API-key rate limit exceeded; honor Retry-After |
500 | Internal server error |
502 | Upstream model provider failed |
503 | A temporary dependency, such as billing, is unavailable |
Queue logs
Use ?logs=true on status or stream endpoints to include short progress messages.
curl "https://audiolasso.dev/v1/queue/requests/req_01jabc/status?logs=true" \
-H "Authorization: Bearer $AUDIOLASSO_API_KEY"Logs are meant for humans and agents. Treat status as the source of truth for program logic.
Every /v1 response includes X-Request-Id for HTTP tracing. This is different from the durable queue request_id; record both when reporting an integration failure.
IDEMPOTENCY_CONFLICT means an Idempotency-Key was reused with a different request body. Generate a new key for new work; do not retry the conflicting body with the old key.
BILLING_UNAVAILABLE is different from INSUFFICIENT_CREDITS. Retry the former with the same idempotency key and backoff. The latter requires more credits or a smaller input.
RATE_LIMITED responses include Retry-After in seconds. The default API-key bucket allows 120 requests per minute; audio submissions use a separate 10-per-minute bucket. Limits are enforced atomically across application instances.
{
"logs": [
{
"timestamp": "2026-04-25T08:00:00.000Z",
"message": "Started audio separation"
}
]
}Recommended client behavior
- Branch on HTTP status and
error.code. - Show
error.messageto developers. - Retry
408,429,500,502,503,504, and network errors with backoff only when the request is read-only or idempotent. - Do not retry
400,401,402, or403without changing the request or key.