Errors
Spectral Model API errors use HTTP status codes with JSON response bodies where
the service can return structured details. FastAPI validation errors use a detail
array; application errors may return a string or object in detail.
Common Response Shapes
{
"detail": "Authentication is required."
}
{
"detail": [
{
"loc": ["body", "name"],
"msg": "Field required",
"type": "missing"
}
]
}
Status codes
| Status | Meaning |
|---|---|
400 | The request body or parameters are invalid. |
401 | Authentication is missing or invalid. |
403 | The token does not have the required scope. |
404 | The requested model or resource was not found. |
429 | The request exceeded a rate or concurrency limit. |
500 | Spectral could not complete the request. |
Retry Guidance
Retry only failed network requests where the model was not created. Do not blindly retry model-creation or upload requests unless your workflow uses an idempotency key or you first confirm the model was not created.
For validation errors, fix the request body or parameters before retrying.