{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://app.shockai.co/developers/schemas/v0/ApiError.json",
  "title": "ApiError",
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "invalid_request",
            "unsupported_case",
            "consent_refused",
            "authentication",
            "rate_limited",
            "quote_expired",
            "provider_error",
            "timeout"
          ],
          "description": "The error family. `unsupported_case` and `consent_refused` are final; `rate_limited`, `provider_error` and `timeout` may be retried."
        },
        "code": {
          "type": "string",
          "maxLength": 80,
          "pattern": "^[a-z][a-z0-9_]*$",
          "description": "A stable machine-readable code within the family."
        },
        "message": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        },
        "param": {
          "description": "The case field at fault, as a JSON Pointer.",
          "type": "string",
          "maxLength": 200
        }
      },
      "required": [
        "type",
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ],
  "description": "Every non-2xx response carries this body."
}
