Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.requesty.ai/llms.txt

Use this file to discover all available pages before exploring further.

When a request fails, Requesty returns a standard JSON error response with an HTTP status code and a human-readable message. Errors originate from either the router (Requesty’s own validation and routing logic) or an upstream provider (OpenAI, Anthropic, Google, etc.).
Example error response (HTTP 404)
{
  "error": {
    "origin": "router",
    "message": "Provider and/or model not supported"
  }
}
The origin field tells you where the error came from — "router" means Requesty caught the problem before it reached a provider, while "provider" means an upstream LLM provider returned the error.

Authentication & Authorization

Errors related to API key validation, account status, and access control.
HTTP CodeOriginError MessageDescriptionWhat to Do
401routerUnauthorizedNo Authorization header was provided, or it is empty.Include Authorization: Bearer sk-... in your request headers.
402routerInsufficient balance, top up at: https://app.requesty.ai/settingsYour organization’s balance has been exhausted.Top up your balance or contact your organization admin.
403routerInvalid authorization tokenThe API key is invalid, expired, or revoked.Generate a new API key at app.requesty.ai/api-keys.
403routerYour account has been restricted…Your organization has been restricted due to a policy violation.Contact [email protected] for more information.
403routerProvider blocked by policyThe requested model is not in the approved models or access list for your API key.Ask your admin to add the model to your access list, or use an approved model.
412routerReached monthly spend limit for API keyThe monthly spending cap for your API key or project has been reached.Wait for the next billing cycle, or ask your admin to increase the spend limit.

Request Validation

Errors returned when the request payload is malformed or contains invalid parameters.
HTTP CodeOriginError MessageDescriptionWhat to Do
400routerInvalid request formatThe request body is malformed, missing required fields, or contains invalid JSON.Check your request body against the API reference. Ensure valid JSON and required fields like model and messages.
400routerRequest body is emptyAn empty request body was sent.Provide a valid JSON request body.
400routerInvalid model, expected: “provider/model”The model field is not in the required provider/model format.Use the format provider/model (e.g., openai/gpt-4.1, anthropic/claude-sonnet-4-5). See available models.
400routerInvalid model paramsModel parameters (region, reasoning effort, etc.) are invalid.Check supported model parameters and region suffixes.

Model & Routing

Errors related to model resolution, routing policies, and plan compilation.
HTTP CodeOriginError MessageDescriptionWhat to Do
404routerProvider and/or model not supportedThe requested provider/model combination does not exist in Requesty’s model library.Check the model library for available models. Verify the provider and model names are spelled correctly.
400routerRouting policy is unknownThe referenced routing policy does not exist.Verify the policy name in your model field (e.g., policy/my-policy). Create or check policies at Routing Policies.
422routerRouting policy uses forbidden models or BYOK is missingAll models in the routing policy are either not in your access list, or require BYOK credentials that haven’t been configured.Add the policy’s models to your access list, or configure the required BYOK provider keys.
500routerRouting policy is corruptedThe routing policy exists but failed to compile into a valid plan.Re-create the routing policy, or contact support if the issue persists.
500routerSmart routing failedThe smart routing classifier was unable to select a model.Retry the request. If persistent, fall back to a specific model or policy.

Provider Errors

Errors originating from upstream providers (OpenAI, Anthropic, Google, Bedrock, etc.), translated and normalized by Requesty.
HTTP CodeOriginError MessageDescriptionWhat to Do
429providerToo many requestsThe upstream provider returned a rate limit error.Reduce request frequency, or create a Routing Policy to automatically failover to another provider.
502providerProvider is down: Bad GatewayThe upstream provider returned a 502 error.Retry after a short delay. Consider setting up a Fallback Policy for automatic failover.
502routerThere was a problem with the provider streamThe provider sent an error within an SSE stream after streaming had started.Retry the request. If consistent, try a different provider or model.
503routerThe provider timed out, please try againThe upstream provider did not respond within the timeout window.Retry the request. For long-running requests, consider models with higher timeout allowances or use a fallback policy.
424routerInvalid provider response formatThe provider returned a response that Requesty could not parse.Retry the request. This is typically a transient provider issue. If persistent, contact support.
424routerProvider response missing usageThe provider did not include token usage data in the response.Retry the request. This is a transient provider issue.
529providerThe provider is overloaded, please try againThe upstream provider is experiencing high load (common with Anthropic).Wait and retry, or use a fallback policy to route to an alternative provider automatically.
504providerProvider is down: Gateway timeoutThe upstream provider returned a 504 Gateway Timeout.Retry after a short delay. Set up automatic failover with a Routing Policy.
Requesty automatically retries provider errors when you use a Routing Policy with multiple models. Provider rate limits (429), overload (529), timeouts (503), and bad gateway (502) errors all trigger automatic fallback to the next model in the chain.

Rate Limiting

HTTP CodeOriginError MessageDescriptionWhat to Do
429providerToo many requestsUpstream provider rate limit.See Provider Errors above.
429routerToo many simultaneous requests for userYour API key has exceeded the configured concurrent request limit.Reduce parallelism, or ask your admin to increase the in-flight rate limit for your project.

Security & Guardrails

HTTP CodeOriginError MessageDescriptionWhat to Do
403routerProvider blocked by policyThe requested model is blocked by your organization’s routing policy.Use a model that is allowed by your policy, or ask your admin to update the policy.
400routerRequest security policy not foundA guardrail policy referenced in your configuration does not exist.Verify guardrail configuration in the Requesty dashboard.
400routerRequest violated security policyThe request content triggered a guardrail violation with the block action.Review and adjust your request content, or update guardrail settings if this is a false positive.

Connection & Client Errors

HTTP CodeOriginError MessageDescriptionWhat to Do
499routerClient closed connectionThe client disconnected before the response completed.Ensure your HTTP client has a sufficient timeout. For streaming requests, keep the connection open until the stream ends.
499routerStream interrupted, please try againThe streaming response was interrupted after some data was already sent.Retry the request. Ensure a stable network connection.

Internal Errors

HTTP CodeOriginError MessageDescriptionWhat to Do
500routerInternal server errorAn unexpected error occurred within the router.Retry the request. If persistent, contact [email protected] with your request ID.
500routerGet API key configuration failedRequesty failed to load the configuration for your API key.Retry the request. If persistent, this may indicate a temporary platform issue.
500routerApply rate-limit failedThe rate-limiting system encountered an internal error.Retry the request. This is a transient infrastructure issue.

Context Length Errors

When your input exceeds a model’s context window, Requesty translates the provider-specific error into a clear, actionable message.
HTTP CodeOriginError MessageWhat to Do
400routerYour input is tokens, which exceeds the model’s maximum context length of tokens.Reduce your input by shortening messages, removing older conversation history, or summarizing prior context.
400routerYour input is tokens and max_tokens is , which together exceed the model’s context limit of tokens.Lower max_tokens or shorten your input so that input + max_tokens stays within the model’s context window.
400routerYour input exceeds the model’s maximum context length.Shorten your messages. See the model library for each model’s context window.
400routermax_tokens must be greater than thinking.budget_tokens.Increase max_tokens or decrease thinking.budget_tokens in your request.

Error Response Format

All errors return JSON with the following structure:
{
  "error": {
    "origin": "router",
    "message": "Human-readable error description"
  }
}
FieldTypeDescription
error.originstringWhere the error originated — "router" for Requesty errors, "provider" for upstream provider errors.
error.messagestringA human-readable description of the error.
The HTTP status code is returned in the response status line (e.g., HTTP/2 404). The origin field helps you determine whether to fix your request (router) or retry / failover (provider).
HTTP 400
{
  "error": {
    "origin": "router",
    "message": "Invalid model, expected: \"provider/model\""
  }
}

Best Practices

Use Routing Policies

Set up fallback chains so provider errors (429, 502, 503, 529) automatically retry on a different model — your application never sees the error.

Set Spend Limits

Configure per-project or per-key spend limits to avoid unexpected 402 errors from balance exhaustion.

Monitor with Logs

Use the Logs view to inspect individual request errors, filter by status code, and debug issues in real time.

Check the Model Library

Verify model names, providers, and capabilities before making requests to avoid 404 and 400 errors.
Track errors in Advanced Analytics. Group by status_code in Advanced Analytics to see which errors are costing you the most and spot trends over time.
Include request IDs in support tickets. Every response includes an x-request-id header. When contacting support, include this ID so we can trace the exact request path through the router.
Last modified on May 28, 2026