> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/13.2-surfaces/rest-api.md).

# REST API

The Stratix REST API — same surface the dashboard and SDK use.

The Stratix REST API is the underlying interface the dashboard and SDK both call. If you're building a tool in a language without a Stratix SDK (Go, TypeScript, Ruby, etc.), use the REST API directly.

## Base URL

`https://stratix.layerlens.ai/api/v1`

## Authentication

```http
X-API-Key: ll_xxxxxx...
```

Generate keys at **Premium → Settings → API keys**.

## Common endpoints

| Method | Path                   | Description            |
| ------ | ---------------------- | ---------------------- |
| GET    | `/models`              | List models            |
| GET    | `/models/{id}`         | Get a model            |
| GET    | `/benchmarks`          | List benchmarks        |
| POST   | `/evaluations`         | Create an evaluation   |
| GET    | `/evaluations/{id}`    | Get an evaluation      |
| POST   | `/traces`              | Ingest a trace         |
| GET    | `/traces/{id}`         | Get a trace            |
| POST   | `/judges`              | Create a judge         |
| POST   | `/judge-optimizations` | Run GEPA               |
| POST   | `/trace-evaluations`   | Run a trace evaluation |

Full reference: [API reference](/13.1-sdk-and-apis/api.md).

## curl example

```bash
curl -H "X-API-Key: $LAYERLENS_STRATIX_API_KEY" \
 https://stratix.layerlens.ai/api/v1/models
```

## Errors

| Status | Meaning                  |
| ------ | ------------------------ |
| 200    | Success                  |
| 400    | Bad request (validation) |
| 401    | Unauthenticated          |
| 403    | Forbidden (org/role)     |
| 404    | Not found                |
| 429    | Rate limited             |
| 500    | Server error             |

## Request IDs

Every response includes an `X-Request-ID` header and (where relevant) a `request_id` field in the body. Cite this when filing support tickets.

## Where to next

* [API reference](/13.1-sdk-and-apis/api.md)
* [Python SDK](/6.-build-wire-your-code/sdk-python.md)
* [CLI reference](/13.1-sdk-and-apis/cli.md)
