LogoLogo
  • Overview
  • Quick Start
  • Authentication
  • Rate limits
  • Errors
  • Image Editing API
    • Image I/O
    • Image Operations
      • Restorations
      • Resizing
      • Outpainting
      • Generative Editing
      • Color Adjustments
      • Background
      • Padding
      • Privacy
    • API Reference
    • Async API Reference
    • Batch API Reference
    • Upload API Reference
  • image generation api
    • Image Generation I/O
    • Image Generation Options
    • API Reference
  • AI Background API
    • AI Background I/O
    • AI Background Options
      • Object
      • Scene
      • Product Shadow
    • API Reference
  • Image to Video API
    • Image to Video I/O
    • Image to Video Options
    • Async API Reference
  • Storage Connectors
    • Overview
    • AWS S3
    • Google Cloud Storage
    • Web Folder
    • API Reference
  • Guides
    • E-commerce
    • Real Estate
    • Printing
  • Redoc
  • Blog
Powered by GitBook
On this page
  • Error response structure
  • HTTP status codes summary
  • Get help
Edit on GitHub

Errors

The page provides the description of expected errors of Claid API and guidance how to handle them.

The Claid API provides standard HTTP status codes. Every successful responses are indicated with a 200-series and error responses with non-200-series HTTP code.

Error reasons can vary, but the structure of the response always looks the following:

Error response structure

{
    "error_code": "9000",
    "error_type": "validation",
    "error_message": "name: ensure this value has at most 50 characters. parameters.credentials.access_key: field required.",
    "error_details": {
        "name": [
            "ensure this value has at most 50 characters"
        ],
        "parameters.credentials.access_key": [
            "field required"
        ],
}

Error response attributes:

  • error_code string Claid internal error identifier.

  • error_type string Claid errors are grouped by topics and this field returns the name of that group.

  • error_message string A human-readable description of the error. If there were several reasons for failure - they will be concatenated as separate sentences, divided with . (dot).

  • error_details object If there is a request validation error with key:value pairs - this field represents a nicely formatted version of error_message. Otherwise it can be an empty object - {}.

Error response example with an empty error_details

{
    "error_code": "111",
    "error_type": "auth",
    "error_message": "Authorization is required.",
    "error_details": {}
}

How to get error reason

If you want to get a human-readable error message, then it is best to always get data from the error_message attribute.

If you prefer to represent the error yourself according to the key:value pairs of errored fields, use error_details. Note: It can be an empty object if there was no validation error associated with the field. In this case, you can get the message from the error_message attribute.

HTTP status codes summary

200-2xx OK

Everything worked as expected

400 Bad Request

Since this is a generic error, there can be several reasons why we get it, such as when we can't get the object from storage, or can't even parse JSON payload when it's invalid.

401 Unauthorized

402 No API calls left

403 Forbidden

The API key doesn't have permissions to perform the request. We recommend checking the scopes and correctness of the API key.

404 Not Found

The requested resource doesn't exist.

409 Conflict

The request can't be processed, because of conflict in the current state of the resource.

422 Unprocessable Entity

The error indicates that the payload has logical or validation issues. The concrete reasons can be found in error_message and error_details fields.

429 Too Many Requests

500 Internal Server Error

Temporary error, which indicates that we experiencing an internal error.

Get help

PreviousRate limitsNextImage I/O

Last updated 7 months ago

In any case, you can get the error reason from error_message attribute. See the above.

You are unauthorized to access the requested resource. Learn how to .

Your account has run out of API calls. Purchase more API call credits to continue using .

Request cannot be served due to the API's rate limit. See page for more information.

This is a rare case but if you continue to receive this error, please with request details.

In case of any issues with image processing, you can reach out to our and provide them details with x-request-id header value (see the API reference).

authenticate via API key
Claid.ai
Rate Limits
technical support
How to get error reason
reach out to API support