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

# Health

> Unauthenticated uptime endpoint for external monitors

# Health

The health endpoint reports whether the application and its database answer.
Use it for uptime monitors, status pages, and load-balancer probes.

This is the only Gradient endpoint that needs no authentication. It contains no
customer data.

## Get Health

```
GET /api/health
```

<Info>No authentication. No request parameters.</Info>

You can poll at any interval. The database result is cached for 10 seconds, so
more frequent polls are permitted but do not give more recent data.

<Accordion title="Response">
  ```json theme={null}
  {
    "status": "ok",
    "timestamp": "2026-08-05T12:00:00.000Z",
    "version": "f4fbf3a",
    "checks": {
      "database": { "status": "ok", "latencyMs": 14 }
    }
  }
  ```
</Accordion>

<ResponseField name="status" type="string">
  `ok` when all checks pass. `degraded` when one or more checks fail.
</ResponseField>

<ResponseField name="timestamp" type="string">
  The time of the response, in ISO 8601 format.
</ResponseField>

<ResponseField name="version" type="string">
  The short commit SHA of the deployed build, or `unknown`.
</ResponseField>

<ResponseField name="checks.database.status" type="string">
  `ok` when the database answered a read. `error` when the read failed or did
  not complete in 2.5 seconds.
</ResponseField>

<ResponseField name="checks.database.latencyMs" type="integer">
  The time the database check took, in milliseconds.
</ResponseField>

## Status Codes

| Code  | Meaning                                          |
| ----- | ------------------------------------------------ |
| `200` | All checks pass. `status` is `ok`.               |
| `503` | One or more checks fail. `status` is `degraded`. |

Monitor the status code. Do not monitor only the body: a `503` is the signal
that Gradient is unhealthy.

The endpoint does not report the cause of a failure. To get the cause, contact
[hi@trygradient.ai](mailto:hi@trygradient.ai).

## Example

```bash theme={null}
curl -i https://app.trygradient.ai/api/health
```
