# Errors

Source: https://platform.msingiai.com/docs?page=errors

API base URL: https://api.msingiai.com

Every error response shares one JSON envelope, whatever the status code.

## Envelope

Every error is {"error": {"code", "message", "request_id", "param"?}}. Use request_id when contacting support.

## Common statuses

401: missing or invalid credential. 402: insufficient balance. 403: key not permitted for this operation. 422: request validation failed (see param). 429: rate limited. 502/503: temporarily unavailable, safe to retry with backoff.

## Error fields

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| error.code | string | Yes | Machine-readable error code. |
| error.message | string | Yes | Human-readable message, safe to show to a developer. |
| error.request_id | string | Yes | Correlate with a support ticket. |
| error.param | string | No | The offending field, when applicable. |

## Response 422 (application/json)

Validation error: param names the offending field.

```json
{
  "error": {
    "code": "invalid_request",
    "message": "Request validation failed.",
    "request_id": "req_...",
    "param": "text"
  }
}
```

[Documentation index](https://platform.msingiai.com/llms.txt)
