Error Handling

Basically, if status is getting false, you can expect these errors.

If there was an error at the request or response, API will return status: false also you can get details of the error with this parameters.

Common Error Responses

All endpoints can return the following error responses:

Authentication Error

{
  "status": false,
  "errors": {
    "auth": ["Wrong credentials or expired token"]
  }
}

Credit Limit Error

{
  "status": false,
  "insert_coin": true
}

Model-Specific Errors

Generation Errors

{
  "status": false,
  "error": "Something wrong with main server",
  "response": "Detailed error message"
}

Response Status Codes

Status Code
Description

200

Success

400

Bad Request - Invalid parameters

401

Unauthorized - Invalid or missing token

403

Forbidden - Insufficient permissions

404

Not Found - Resource doesn't exist

429

Too Many Requests - Rate limit exceeded

500

Internal Server Error

Last updated