API Reference
Errors
All API errors use a consistent envelope format.
Error envelope
{
"error": {
"code": "NOT_FOUND",
"message": "Model not found or has no published version"
}
}| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error code |
message | string | Human-readable description |
HTTP status codes
| Status | When it occurs |
|---|---|
400 Bad Request | Invalid request body or parameters |
401 Unauthorized | Missing, invalid, or revoked API key |
404 Not Found | Resource doesn't exist, isn't published, or isn't accessible with your key |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | Unexpected server error |
Error codes
| Code | Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | API key missing or invalid |
RATE_LIMITED | 429 | Rate limit exceeded |
NOT_FOUND | 404 | Resource not found |
MODEL_NOT_PUBLISHED | 404 | Model exists but has no published version |
INVALID_FORMAT | 400 | Unsupported export format |
INTERNAL_ERROR | 500 | Unexpected server error |
404 vs 401
The API returns 404 (not 403) when a resource exists but the requesting API key doesn't have access to it. This prevents information leakage about the existence of private models.
Retrying errors
401— Check your API key; no retry will help404— Verify the model ID and that the model is published429— Wait untilX-RateLimit-Resetbefore retrying500— Retry with exponential back-off; if persistent, contact support