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

# API Overview

> The OnlookAI REST API for querying sessions, scores, and webhooks.

## Base URL

```
https://api.onlookai.com/v1
```

For self-hosted deployments, replace with your ingest endpoint (default: `http://localhost:4000/v1`).

## Authentication

All API requests require a Bearer token.

```bash theme={null}
curl https://api.onlookai.com/v1/sessions \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Generate API keys from the dashboard under **Settings → API Keys**.

## Response format

All responses are JSON. Errors follow this shape:

```json theme={null}
{
  "error": {
    "code": "session_not_found",
    "message": "No session found with id sess_8xK2mP9q"
  }
}
```

## Rate limits

| Plan       | Requests/minute |
| ---------- | --------------- |
| Free       | 60              |
| Pro        | 600             |
| Enterprise | Unlimited       |

## Pages

<CardGroup cols={2}>
  <Card title="Sessions" icon="users" href="/api/sessions">
    List and retrieve session data.
  </Card>

  <Card title="Scores" icon="chart-line" href="/api/scores">
    Query attention scores and history.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api/webhooks">
    Configure and verify webhook delivery.
  </Card>
</CardGroup>
