Errors and Limits
AnyInt publishes both bearer-style and provider-style auth patterns. If a request fails unexpectedly, verify that you used the right header family for the route you called.
Common HTTP outcomes
| Code | Meaning | Typical action |
|---|---|---|
400 | Invalid request body or missing fields | Validate payload shape before retrying |
401 | Authentication failed | Check your API key and header style |
403 | Access blocked by subscription or policy | Check entitlement, model access, or org policy |
429 | Limit reached | Back off, retry later, or upgrade limits |
503 | Upstream temporarily unavailable | Retry with backoff or use a fallback route |
Practical guidance
Header mismatches
AnyInt publishes both bearer-style and provider-style auth patterns. If a request fails unexpectedly, verify that you used the right header family for the route you called.
Model access issues
Before treating a response as a platform outage, confirm:
- the model ID exists
- the model is enabled for your account
- your subscription or key policy allows it
Rate and usage limits
Limits can come from:
- subscription caps
- per-key restrictions
- team-level policies
- upstream provider throttling
Async workflows
For video and AI Music routes, do not treat the initial task response as completion. Poll the task route or wait for a webhook before assuming the asset is ready.
Error response examples
Authentication failure
{
"error": {
"message": "Invalid or missing API key",
"type": "authentication_error",
"code": "invalid_api_key"
}
}Check that you are using the auth header documented for the endpoint family. For OpenAI-compatible and most media routes, use Authorization: Bearer <ANYINT_API_KEY>. For Anthropic-compatible routes, use x-api-key: <ANYINT_API_KEY> with the documented compatibility headers.
Rate or quota limit
{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}Back off before retrying. For user-facing products, show a temporary capacity or quota message instead of retrying in a tight loop.
Invalid request
{
"error": {
"message": "Missing required field: model",
"type": "invalid_request_error",
"param": "model"
}
}Fix invalid request parameters before retrying. Repeating the same invalid request will not succeed.
Retry guidance
| Situation | Retry? | Guidance |
|---|---|---|
| Invalid JSON or missing required field | No | Fix the request body first. |
| Invalid API key | No | Rotate or correct the key before retrying. |
| Model not available to the account | No immediate retry | Call Models API and choose an available model. |
| Rate limit or quota exhausted | Later | Use exponential backoff or reduce concurrency. |
| Temporary upstream failure | Yes | Retry with exponential backoff and a maximum retry count. |
| Interrupted stream | Usually | Retry from the application level if the operation is safe to repeat. |
| Async task still pending | Poll, do not recreate | Continue querying the task route instead of creating duplicate tasks. |
Family-specific notes
- Anthropic-compatible routes may return request-shape errors if
anthropic-versionis missing - OpenAI-compatible chat returns stream chunks when
streamistrue - AI Music has additional task and callback status codes documented in its own section
AI Music API
Suno-compatible music routes for song generation, audio transforms, task polling, and webhook-based completion.
Overview
AnyInt is not only a transport layer. The platform also changes how applications behave once they are in production: how output is streamed, how keys are limited, how routing is applied, and how model output is shaped for downstream systems.