Error codes and troubleshooting
Locate call failures by HTTP status, error text, and request ID.
Keep the failure evidence first
Log time, request path, model, HTTP status, masked error object, and X-Oneapi-Request-Id. The error code may come from the gateway or upstream, and the structure of different protocols is not exactly the same.
| Status or phenomenon | Priority check |
|---|---|
| 400 | JSON structure, parameter types, model capabilities and billing configuration |
| 401 | API key is incorrect, expired, or disabled |
| 403 | Model, group, IP and account access restrictions |
| 404 | Domain name, final path, model, or task ID |
| 413 | Request body, media volume and input quantity |
| 429 | Account, key, model or upstream current limit |
| 5xx | Channel status, upstream errors and server logs |
| Interrupt after 200 | SSE completion events, agent buffering and connection timeouts |
Recommended troubleshooting order
- Query
/v1/modelsusing the same key. - Send a minimal text request without extended parameters.
- Confirm the protocol and model support range, and then add tools, pictures or inference parameters one by one.
- If only the application fails, compare the URL it actually sent with the desensitized request body.
Contact support
Attach the request ID, time, model, error and minimum recurrence; only the last few digits of the key are retained for identification. Do not upload raw logs containing customer data, full tokens, or payment credentials.
Position by status code
| Status | Check First | Next |
|---|---|---|
| 400 | JSON, fields, model parameters and materials | Restore item by item with minimum successful request |
| 401 | Key, Space, Variable, Expiration and Deactivation | Check the credentials read by the actual process |
| 403 | Permissions, IP, or content access restrictions | Check policy with error message |
| 404 | Final path, model, or task ID | Distinguish between URL non-existence and resource non-existence |
| 413 | Request and media size | Compress or split by model limits |
| 415 | Content-Type | Distinguish between JSON and multipart |
| 429 | Rate, concurrency and upstream limits | Current limiting and limited backoff |
| 5xx | Gateway, upstream or timeout | Save request ID, check if executed |
The code, type, and message of the error body can help further distinguish the cause. You cannot rely solely on the status code to determine whether to charge or whether it can be safely withdrawn.
Minimal reproduction method
Press Quick Start to test on the same network, the same Key, and the same model. If curl succeeds but the client fails, compare the protocol, final URL, parameters and operating environment; if they all fail, keep the two request times and errors. When sharing commands, use environment variables to reference the key and remove the original business text.
200 also needs to be checked
Streaming errors, media task failures, empty candidates, and length truncation may occur after the request is accepted. The application must check the protocol end status and business artifacts, not just HTTP 200.