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

# API reference

## Base URL

All API requests are made against:

```
https://api.glialhealth.com
```

This is the forthcoming production host (placeholder until GA).

## Authentication

Every request must include a bearer token in the `Authorization` header:

```http theme={null}
Authorization: Bearer sk_test_…   # sandbox
Authorization: Bearer sk_live_…   # production
```

API keys are managed in your Folio dashboard. See the [Authentication](/authentication) page for how to obtain and rotate keys.

## Error envelope

All errors return a consistent JSON envelope:

```json theme={null}
{
  "error": {
    "type": "invalid_request_error",
    "code": "file_too_large",
    "message": "The uploaded file exceeds the 50 MB limit."
  }
}
```

| Field     | Description                                                                                 |
| --------- | ------------------------------------------------------------------------------------------- |
| `type`    | High-level error category (e.g. `auth_error`, `invalid_request_error`, `rate_limit_error`). |
| `code`    | Machine-readable error code for programmatic handling.                                      |
| `message` | Human-readable description of what went wrong.                                              |
