> ## Documentation Index
> Fetch the complete documentation index at: https://docs.airrating.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Health

> Check the operational status of the AirRating API and its components.

## Overview

Public endpoint — no API key required. Returns the current status of the API, the database, and the ML model. Use this endpoint to verify connectivity before making scored requests, or to integrate into your own monitoring stack.

## Response

<ResponseField name="status" type="string">
  Overall status: `ok` if all components are healthy, `degraded` if one or more components are unavailable.
</ResponseField>

<ResponseField name="time" type="string">
  ISO 8601 UTC timestamp of the health check.
</ResponseField>

<ResponseField name="components" type="object">
  Status of individual components.

  <Expandable title="Component fields">
    <ResponseField name="api" type="string">
      HTTP server status. Always `ok` if this response is received.
    </ResponseField>

    <ResponseField name="database" type="string">
      Supabase database connectivity. `ok` or `error`.
    </ResponseField>

    <ResponseField name="ml_model" type="string">
      XGBoost ML model availability. `ok` or `unavailable` (score still works via statistical model).
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```bash theme={null}
curl "https://app.airrating.io/api/health"
```

```json theme={null}
{
  "status": "ok",
  "time": "2026-03-21T10:00:00Z",
  "components": {
    "api": "ok",
    "database": "ok",
    "ml_model": "ok"
  }
}
```

### Degraded example

Returns **HTTP 503** when any component is unhealthy.

```json theme={null}
{
  "status": "degraded",
  "time": "2026-03-21T10:00:00Z",
  "components": {
    "api": "ok",
    "database": "error",
    "ml_model": "ok"
  }
}
```

## Status page

For live uptime monitoring and incident history, see [status.airrating.io](https://status.airrating.io).
