Felo API PlatformFelo API Platform

Guides

Errors, Limits, and Retries

Read error responses and rate-limit headers, retry safely, and diagnose common failures.

Every Felo API returns a JSON error body with a stable error code and a request ID. Read the HTTP status first, then the code, then the message.

Error envelope

Current production responses use the HTTP status as status:

{
  "status": 401,
  "code": "UNAUTHORIZED",
  "message": "Invalid API Key",
  "request_id": "202610221444486982113280416060637185"
}
FieldMeaning
statusHTTP status code, repeated in the body
codeMachine-readable error code
messageHuman-readable explanation
request_idOpaque identifier for this request; include it in support requests

Some older endpoint examples use status: "error" and a different code string. Branch on the HTTP status and code, not on the exact wording of message.

Common codes

HTTPCodeWhat it meansWhat to do
400Endpoint-specific validation codeA parameter is missing or invalidFix the request; do not retry unchanged
401UNAUTHORIZEDMissing, invalid, expired, or revoked API keySend Authorization: Bearer $FELO_API_KEY; rotate the key if revoked
402INSUFFICIENT_CREDITSNot enough service creditsTop up in Console Billing, then retry
404Endpoint-specificUnknown model, task, or routeCheck the model ID or task ID and the endpoint path
429RATE_LIMITEDA rate limit was exceededWait for Retry-After, then retry
5xxCHAT_FAILED, *_FAILED, SERVICE_UNAVAILABLEUpstream or service failureRetry with backoff; contact support if it persists

Endpoint references list the codes specific to that endpoint. Start with the Chat API errors or the reference for the endpoint you are calling.

Model generation endpoints

POST /api/v1/images/generations and POST /api/v1/videos/generations return endpoint-level errors in the OpenAI envelope instead of the envelope above:

{
  "error": {
    "message": "Model kind does not match this generation endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_kind_mismatch"
  }
}

For video generation, param names the field that caused the 400, such as input, first_frame_url, or frame_images.0.frame_type. Legacy fields, unsupported fields, and values the selected channel cannot run are rejected rather than ignored.

The request ID is in the X-Request-Id response header, not in the body. A rejected request does not create a task. Once a task exists, most failures arrive as a terminal task status in a 200 response rather than an HTTP error: check status for failed or interrupted, then read error.message. See Image Generation and Async Tasks.

Request IDs

Felo error bodies include request_id. Log it with the endpoint, HTTP status, error code, model ID, and task ID. Never log the full API key.

The Model API also accepts an optional X-Request-Id request header. When you send one, it is echoed back for diagnostics, which lets you correlate your own logs with a request. If you do not send one, use the returned request_id.

Rate limits

/v2/chat is the only Felo endpoint with documented enforced rate limits:

  • Per API key, 1-minute window.
  • Per user, 1-minute window.
  • Per user, 1-hour window.

Users with an effective paid Felo subscription, including enterprise subscriptions, are exempt and receive no X-RateLimit-* headers. If subscription status cannot be verified, the limits still apply.

HeaderMeaning
X-RateLimit-LimitLimit of the tightest dimension currently in effect
X-RateLimit-RemainingMinimum remaining quota across the three dimensions
X-RateLimit-ResetUnix timestamp in seconds when the current window resets
Retry-AfterOn a 429, the recommended delay in seconds

Other /v2/** endpoints currently have no enforced rate limits. Model API requests can still be limited by the upstream provider, which can surface as a 429.

Do not hardcode numeric limits. Read the headers on each response.

Retry policy

SituationRetry?
400, 401, 402, 404No. Fix the request, the key, or the balance first.
429Yes, after Retry-After or X-RateLimit-Reset.
5xx, timeouts, connection resetsYes, with exponential backoff and jitter.
Streaming connection dropped mid-responseRetry only if your application can tolerate a duplicate generation.

Recommended loop:

  1. Retry only idempotent or safe-to-repeat requests.
  2. Use exponential backoff: start around 1 second, double it, cap at 30 seconds.
  3. Add random jitter so clients do not retry in lockstep.
  4. Stop after a small number of attempts and surface the error.
  5. On 429, honor Retry-After instead of your own schedule.

Debugging sequence

  1. Check that the key is present and not revoked.
  2. Call GET /api/v1/models with the same key to confirm authentication.
  3. Send the smallest valid request to the target endpoint.
  4. Add streaming, tools, or large inputs one at a time.
  5. For async work, check the task status before resubmitting.

Need help?