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

# API Overview

> Authentication, response envelopes, and endpoint groups for /api/v1.

`/api/v1` is the canonical API boundary for the Onyx app, CLI, and external integrations.

## Authentication

API requests use bearer authentication:

```bash theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
curl https://app.onyxresearch.ai/api/v1/me \
  -H "Authorization: Bearer $ONYX_API_KEY"
```

Browser app requests can also authenticate with the WorkOS session cookie.

## Response Envelopes

Successful responses use:

```json theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
{
  "data": {}
}
```

Errors use:

```json theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
{
  "error": {
    "code": "bad_request",
    "message": "Readable error message",
    "details": {}
  }
}
```

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Research" icon="flask-conical" href="/docs/reference/api-endpoints">
    Projects, campaigns, experiments, graphs, timelines, explicit reconciliation, files, blobs, diffs, and repository sync.
  </Card>

  <Card title="GitHub" icon="github" href="/docs/reference/api-endpoints">
    GitHub App installations and repositories available to a team.
  </Card>

  <Card title="Teams" icon="users" href="/docs/reference/api-endpoints">
    Current user, teams, and license information.
  </Card>

  <Card title="API keys" icon="key-round" href="/docs/reference/api-endpoints">
    Team-scoped user keys, rotation, and revocation.
  </Card>
</CardGroup>

## OpenAPI

The checked-in OpenAPI artifact lives at:

```text theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
reference/openapi.json
```

Regenerate it from the product repo with:

```bash theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
node scripts/sync-openapi.mjs
```
