API Error Code Reference#
Base URL: https://api.ideal.house
Version: v1
Updated: 2026-03-06
π Overview#
All API responses follow a unified JSON structure. When an error occurs, the code field will contain a non-zero error code, and the message field will provide a human-readable description of the error.
Unified Response Format
{
"code": 1001,
"message": "Request failed",
"data": null
}
β
Success Code#
Example
{
"code": 0,
"message": "success",
"data": { }
}
β Error Codes#
π§ General Errors#
π Authentication Errors#
π‘οΈ Content Moderation Errors#
π° Credits Errors#
π Complete Error Code Summary#
π¦ Error Response Examples#
1001 β Request Failed#
{
"code": 1001,
"message": "Request failed",
"data": null
}
1003 β Internal Server Error#
{
"code": 1003,
"message": "Internal server error",
"data": null
}
1011 β Parameter Error#
{
"code": 1011,
"message": "Request parameter error: imageUrl is required",
"data": null
}
5002 β Invalid API Key#
{
"code": 5002,
"message": "Invalid API Key",
"data": null
}
9010 β Text Content Moderation Failed#
{
"code": 9010,
"message": "Text prompt failed content review, contains prohibited content",
"data": null
}
9038 β Output Prohibited Content#
{
"code": 9038,
"message": "Prohibited content",
"data": null
}
9051 β Insufficient Credits#
{
"code": 9051,
"message": "Insufficient coins",
"data": null
}
π‘ Best Practices for Error Handling#
- Always check
code β Do not rely solely on HTTP status codes; always inspect the code field in the response body.
- Handle
1001 dynamically β This is a generic error code; the message field will contain the specific reason.
- Retry on
1003 β Server-side errors are usually transient; implement exponential backoff retry logic.
- Validate inputs before sending β Avoid
1011 errors by validating required fields client-side before making the API call.
- Content moderation β If you receive
9010 or 9038, review your content against the platform's Content Policy before resubmitting.
Β© Ideal House AI β All rights reserved.