Integration troubleshooting
Access to troubleshooting is used for fast-tracking authentication, models, parameters, ranges, task and callback questions. It is recommended that task_id, trace_id, model names and original error objects be kept in the business log.
Common Errors
| HTTP status code | type | code | Annotations |
|---|---|---|---|
400 | invalid_request_error | invalid_request | request body is formatted wrong, field or field type is missing correctly. |
400 | invalid_request_error | invalid_parameter | Parameter values are not within the support of the model. |
401 | authentication_error | missing_api_key | The request is missing the Authorization header. |
401 | authentication_error | invalid_api_key | API Key does not exist, is invalid or is formatted wrong. |
403 | permission_error | model_not_enabled | Currently account does not have a model or capability for the request facility. |
404 | not_found_error | task_not_found | task does not exist or does not belong to the current account. |
429 | rate_limit_error | rate_limit_exceeded | The request rate exceeds the account or model limit. |
402 | billing_error | insufficient_balance | account balance or insufficient amount. |
500 | server_error | service_error | MoonNexAI service anomaly, please try again later. |
504 | timeout_error | request_timeout | request or task await timeout. |
Query order
- Call
GET /v1/models, confirm API Key available. - Checks whether Base URL is
https://moonnexai.comorhttps://moonnexai.com. - Checks if request head contains
Authorization: Bearer <MOONNEXAI_API_KEY>. - Check the model ID, size, aspect ratio, duration and asset fields against the corresponding model matrix.
- When asynchronous tasks failed,
task_id,trace_id,error.codeand the original response were saved. - When Webhook did not receive it, he volunteered to search for task status and to check whether the address of callback was a public network HTTPS.
Recommended handling
| Problem | Recommendations |
|---|---|
400, 422 | Check request parameters and media assets and re-submit. |
401 | Checks whether API Key is correct and confirms that the placeholder is not used as a real key. |
402, 403 | Check balances, amounts and model privileges in the MoonNexAI console. |
429 | Reduces the interval between simultaneous or large retry. |
5xx | Use the index to avoid retrying and record task_id and trace_id. |