Skip to main content

Overview

Our API is designed to provide clear, consistent, JSON-formatted responses for both successful requests and errors. This ensures developers can reliably parse responses and handle errors programmatically in their applications. All API responses follow the same structure, consisting of:
  • Success responses → contain the requested data along with status details.
  • Error responses → contain standardized error objects with clear messages, and sometimes additional context.

Success Responses

When a request is successful—meaning all required parameters are fulfilled and the request reaches our servers—the API returns an HTTP 200 status code with an ‘OK’ message, along with a JSON object.

Example: Account Balance Request

{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "credits_balance": 5008
}

Error Responses

There are two types of errors you may encounter.

1. Platform-Level Errors

In these cases, the API returns a 200 success status but includes an error message in the response body. These errors are typically related to your plan, product access, or exceeded request limit thresholds.
HTTP StatusMessage
200You don’t have enough credits.
200Ensure your plan includes access to this product.
200You have exceeded your plan’s request threshold (requests per minute). Please try again in one minute.
200Something went wrong.

2. Server Level Errors

If something goes wrong, the API will return an HTTP 4xx or 5xx status code along with a JSON error object.
HTTP StatusError CodeDescription
400bad_requestThe request was malformed, Missing API Key or missing required parameters.
401unauthorizedMissing or invalid Bearer Token
403forbiddenYou don’t have permission to access this resource (plan restriction).
404not_foundThe requested resource could not be found.
409conflictRequest could not be completed due to a conflict (e.g., duplicate entry).
422unprocessable_entityRequest was well-formed but contained invalid data.
500internal_server_errorUnexpected error occurred on our servers. Retry later.
503service_unavailableAPI temporarily unavailable (maintenance or overload).