Skip to main content

Response Structure

All API responses follow this structure:
{
  "code": 0,
  "msg": "Success",
  "data": {...}
}
  • code: 0 = Success
  • code > 0 = Error

Error Codes

CodeMessageDescription
0SuccessRequest completed successfully
429Rate limit exceededToo many POST requests (20/minute limit)
10104Record not foundResource ID does not exist
10105Invalid API keyWrong or missing x-api-key header
18020Insufficient creditNot enough credits to complete request
18025No permission to call APIsAccount lacks API access permission
40000Parameter errorInvalid or missing required parameters
50000System errorInternal server error

Error Response Examples

Authentication Error

{
  "code": 10105,
  "msg": "Invalid API key",
  "data": null
}

Insufficient Credits

{
  "code": 18020,
  "msg": "Insufficient credit",
  "data": null
}

Parameter Error

{
  "code": 40000,
  "msg": "Parameter error: avatar_id is required",
  "data": null
}

Rate Limit Error

{
  "code": 429,
  "msg": "Rate limit exceeded. Please try again later.",
  "data": null
}

Best Practices

Check Response Code

Always verify the code field before processing data

Handle Errors

Implement proper error handling for all error codes

Log Errors

Record error details with timestamps for debugging

Retry Logic

Implement retry for system errors (50000) and rate limits (429)

Need Help?

Contact [email protected] with:
  • Error code and message
  • Request parameters
  • Timestamp
  • API endpoint
Include your user ID (not your API key) when contacting support.