Skip to main content

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

StatusMeaning
400The request body or parameters are invalid.
401Authentication is missing or invalid.
403The token does not have the required scope.
404The requested model or resource was not found.
429The request exceeded a rate or concurrency limit.
500Spectral 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.