AnyInt Docs
API Reference

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

CodeMeaningTypical action
400Invalid request body or missing fieldsValidate payload shape before retrying
401Authentication failedCheck your API key and header style
403Access blocked by subscription or policyCheck entitlement, model access, or org policy
429Limit reachedBack off, retry later, or upgrade limits
503Upstream temporarily unavailableRetry 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

SituationRetry?Guidance
Invalid JSON or missing required fieldNoFix the request body first.
Invalid API keyNoRotate or correct the key before retrying.
Model not available to the accountNo immediate retryCall Models API and choose an available model.
Rate limit or quota exhaustedLaterUse exponential backoff or reduce concurrency.
Temporary upstream failureYesRetry with exponential backoff and a maximum retry count.
Interrupted streamUsuallyRetry from the application level if the operation is safe to repeat.
Async task still pendingPoll, do not recreateContinue querying the task route instead of creating duplicate tasks.

Family-specific notes

  • Anthropic-compatible routes may return request-shape errors if anthropic-version is missing
  • OpenAI-compatible chat returns stream chunks when stream is true
  • AI Music has additional task and callback status codes documented in its own section

On this page