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

# API Reference

> How the SomyaLabs API reference is generated and kept in sync.

The endpoint pages under **API Reference** are generated automatically from the
backend's **OpenAPI specification** — so they always match what the API
actually does.

## How it's wired

`docs.json` points the **Endpoints** group at the backend's **live** spec:

```json theme={null}
{ "group": "Endpoints", "openapi": "https://api.somya.ai/openapi.json" }
```

The backend is FastAPI, which serves an always-current OpenAPI document at
`/openapi.json`. Because we read it live, there's **no file to maintain** — when
the API changes, the reference updates on the next docs build.

<Note>
  Prefer a versioned, in-repo copy instead? Export it and point `openapi` at the
  committed file:

  ```bash theme={null}
  curl https://api.somya.ai/openapi.json -o docs-site/api-reference/openapi.json
  ```
</Note>

## Authentication

All endpoints accept your API key in either the `X-API-Key` header or
`Authorization: Bearer …`. See [Authentication](/authentication).
