Skip to main content

Overview

The Concentrate AI API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON body with details about what went wrong.

Error Response Format

All errors follow this structure:

Status Codes

Error Types

400 Bad Request

Invalid or malformed request parameters.
Causes:
  • Model doesn’t exist
  • Typo in model name
  • Unsupported model
Solution:
Causes:
  • Required parameter not provided
  • Empty or null value
Solution:
  • Include all required fields: model and input
  • Ensure values are not null or empty
Causes:
  • Wrong data type for parameter
  • Invalid enum value
Solution:
  • Check parameter types in API reference
  • Use correct data types (string, number, boolean, etc.)
Causes:
  • Value outside allowed range
  • Negative value for positive-only fields
Solution:
  • Review parameter constraints
  • temperature: 0.0 - 2.0
  • top_p: 0.0 - 1.0
  • max_output_tokens: > 0

401 Unauthorized

Authentication failed or API key is invalid.
Causes:
  • API key is missing
  • API key is invalid or revoked
  • Wrong header format
Solutions:
Get a new API key from the Concentrate AI dashboard if yours is invalid.

402 Payment Required

Insufficient credits to complete the request.
Causes:
  • Account credit balance too low
  • Request would exceed credit limit
  • Free tier exhausted
Solutions:
  1. Check your balance:
    • Visit dashboard
    • View credit usage and remaining balance
  2. Add credits:
    • Purchase additional credits
    • Upgrade your plan
  3. Optimize requests:
    • Reduce max_output_tokens
    • Use cost-optimized models
    • Enable auto routing with routing: { strategy: "min", metric: "cost" }

424 Failed Dependency

The requested provider is unavailable.
Causes:
  • Provider experiencing outage
  • Model temporarily unavailable
  • Regional restrictions
Solutions:
  1. Retry with exponential backoff
  2. Specify alternative provider
Implement client-side retry logic or specify an alternative provider/model to handle provider unavailability.

429 Too Many Requests

Rate limit exceeded.
Causes:
  • Exceeded requests per minute limit
  • Too many tokens per minute
  • Burst limit exceeded
Solutions:
  1. Implement rate limiting in your code
  2. Use exponential backoff
  3. Batch requests when possible
  4. Upgrade plan for higher limits

500 Internal Server Error

Server-side error. These are rare and usually temporary.
Causes:
  • Temporary server issue
  • Unexpected error condition
  • Any provider internal error (e.g., an outage at an upstream provider)
Solutions:
  1. Retry the request after a short delay
  2. If persists, contact support

503 Service Unavailable

The service is temporarily unable to handle the request. Unlike a 500, this signals a capacity or availability condition rather than an unexpected failure, so the same request is likely to succeed shortly.
Causes:
  • The API is shedding load during a traffic burst
  • A dependency required to serve the request is temporarily unavailable
Solutions:
  1. Retry with exponential backoff and jitter
  2. If a Retry-After header is present, wait at least that long before retrying
  3. If it persists across several minutes, check status.concentrate.ai

504 Gateway Timeout

The upstream provider did not respond within the allowed time window. The request reached the provider, so it may have been partially processed.
Causes:
  • The upstream provider is slow or degraded
  • A very large prompt or max_output_tokens value pushed the request past the timeout
Solutions:
  1. Retry the request, optionally with a smaller prompt or lower max_output_tokens
  2. Add model fallbacks so routing can move to another provider
  3. Use streaming for long generations, which begins delivering output before the full response is complete
503 and 504 are both safe to retry. Because a 504 may leave a partially processed request upstream, avoid blindly retrying non-idempotent work without checking whether the first attempt was billed.

Best Practices

Error Monitoring

Track and analyze errors in production:

Debugging Checklist

When encountering errors, check:
  • API key is valid and properly formatted
  • Request payload matches schema requirements
  • Parameter values are within allowed ranges
  • Account has sufficient credits
  • Model name is correct and supported
  • Network connectivity is stable
  • Timeout values are appropriate
  • Error handling is implemented
  • Retry logic is in place

Create Response

Main endpoint documentation

Auto Routing

Automatic provider/model routing

Rate Limits

Understanding rate limits

Support

Contact support for help
Last modified on August 16, 2026