Overview
APIXO API uses two layers of error information:- HTTP Status Codes — Returned immediately when request fails
- Failure Codes — Returned as
failCodefor failed tasks, or as a provider error identifier for some immediate errors
HTTP Status Codes
Failure Codes
When an async task fails, the status response includesfailCode and failMsg:
The same
failCode can appear with slightly different failMsg text depending on the upstream provider. Use failCode for programmatic handling and show failMsg to support/debugging tools.Content Policy and Safety
Prompt and Parameter Validation
Image, Video, and Media Inputs
Authentication, Quota, and Rate Limits
Upstream and Processing Failures
Error Response Examples
HTTP Error (Immediate Return)
400 - Parameter ErrorTask Failure (When Querying Status)
Content ViolationError Handling Best Practices
1. Retry Strategy
2. Exponential Backoff Example
3. Content Moderation Tips
To avoid content violation errors:- Avoid violence, pornography, politically sensitive content
- Check that input images comply with content policy
- Use clear, specific descriptions, avoid ambiguous expressions
- Test with simple, safe content first
4. Monitoring and Logging
Recommended to log for debugging:taskId— Unique task identifierfailCode— Failure codefailMsg— Failure message- Request parameters (sanitized)
Provider-Specific Errors
OpenAI
MidJourney
Seedream (ByteDance)
FAQ
Q: Got429 error, how long should I wait?A: Wait 60 seconds then retry, or use exponential backoff strategy. Q: How to avoid
PromptLengthExceeded error?A: Each model has different prompt length limits, check the model documentation. Generally keep under 2000 characters. Q: Can I appeal
SensitiveContentDetected error?A: This is the upstream AI provider’s content moderation result. Recommend modifying content and resubmitting. Q: What should I do with
5xx errors?A: These are temporary server issues. Use exponential backoff retry, max 3 times. If persistent, contact support. Q: Why does task status return
200 but state is failed?
A: HTTP 200 means the status query succeeded, but task execution failed. Use failCode and failMsg for the actual failure reason.
Support
Experiencing persistent errors? Contact support with:taskId— Failed task IDfailCode— Error code- Request parameters (sanitized)
- Error occurrence time