Error responses
Errors use an OpenAI-compatible shape. The body always contains an error object with type, code, and message:
{ "error": { "type": "invalid_request_error", "code": "model_not_found", "message": "Model was not found" } }
Do not classify errors from the human-readable message. Use the HTTP status and code instead.
| HTTP | Code | What to do |
| --- | --- | --- |
| 402 | balance_too_low | The balance is not enough to reserve this request. |
| 403 | community_not_allowed | Enable allow_community or choose a Verified/First-party model. |
| 404 | model_not_found | Check the model name and listing. |
| 413 | request_too_large | Reduce the request size or input token count. |
| 502 | upstream_error | The provider failed; retry with backoff. |
| 504 | upstream_timeout | The provider did not respond in time; retry with limits. |
Retry policy
Retry transient errors such as 502 and 504 with backoff. Use an idempotency key at the application layer when a workflow may resend a request. Do not blindly retry 402, 403, 404, or 413.
ModelMart does not write prompts or responses to error logs. When contacting support, provide the request ID and metadata such as model, status, and time, not request content.