Skip to main content

Errors

CleverThis uses standard HTTP status codes and returns structured JSON error bodies. The error body is always in the following shape for both the inference API and the A2A control plane.

Error response shape

{
"error": {
"code": "insufficient_credits",
"message": "Your workspace has insufficient credits. Top up at https://app.cleverthis.com/billing.",
"type": "billing_error",
"param": null,
"request_id": "req_abc123xyz"
}
}

HTTP status codes

StatusMeaning
400Bad Request — malformed JSON, missing required fields, or invalid parameter values
401Unauthorized — missing or invalid API key
402Payment Required — wallet balance is zero or below zero
403Forbidden — valid key used against the wrong API surface (e.g. inference key on A2A)
404Not Found — model not deployed in this namespace, or resource not found
422Unprocessable Entity — request is well-formed but semantically invalid (e.g. Actor YAML validation failure)
429Too Many Requests — rate limit exceeded
500Internal Server Error — unexpected error in CleverThis
502Bad Gateway — error from upstream provider
503Service Unavailable — deployment is stopping or temporarily unavailable

Common error codes

error.codeStatusDescription
invalid_api_key401Key is malformed or does not exist
revoked_api_key401Key has been revoked
insufficient_credits402Wallet balance too low
model_not_found404Requested model is not deployed in this namespace
namespace_not_found404Namespace does not exist
actor_validation_error422Actor YAML failed schema validation
rate_limit_exceeded429Per-minute request or token rate limit hit
upstream_error502Provider returned an error
context_length_exceeded400Messages exceed the model's context window

Retries

For 429 and 503 responses, the response includes a Retry-After header indicating the number of seconds to wait before retrying. For 502 errors, implement exponential backoff with jitter.

Coming soon

A complete error code registry with resolution guidance is being added to this page.