400 | invalid_request_error / invalid_reference_image | Invalid parameters, an empty prompt, or an invalid reference image | Ask the user to correct the parameters |
401 | missing_api_key / invalid_api_key | Missing or invalid key | Check the key configuration |
402 | insufficient_balance | Insufficient balance | Ask the user to add funds or contact an administrator |
403 | model_not_allowed | The current key cannot access the model, or its available groups do not intersect the model’s enable_groups | Check the model allowlist; see Model groups & pricing to change group or use a different key |
404 | not_found | The task does not exist or does not belong to the current user | Stop polling |
429 | rate_limit_rpm / rate_limit_tpm | Rate limit exceeded | Retry with backoff and reduce concurrency |
500 | internal_error / billing_error | Internal service error | Record logs and retry later |
502 / 503 | upstream_error / service_unavailable | The upstream route is temporarily unavailable | Allow the user to retry |