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

# One API. Every model. Built for agent loops.

> Layer X1 is a model API built for agents: point your tool at a single endpoint, authenticate with one key, and reach the entire Layer X1 model catalog through the protocols your stack already speaks.

## What is Layer X1

Layer X1 serves its own catalog of `lx1-` models through a single gateway that is
wire-compatible with the `Anthropic Messages API`, the `OpenAI Chat Completions API`,
and the `OpenAI Responses API`. Swap your base URL and key; keep the rest of your
stack exactly as it is.

What you get on the other side of that swap:

* **The whole catalog, one key** — from fast, near-free small models to premium
  reasoning and vision, all included on every plan. See [Models](/models).
* **Every protocol your tools speak** — Messages, Chat Completions, Responses,
  legacy Completions, embeddings, and batches, with streaming on every chat surface.
* **Sessions that keep moving** — if a model can't answer, the engine keeps your
  session moving. See [Reliability](/reliability).
* **Predictable plans** — a monthly pool of included usage measured in dollars at
  public list rates, with published rate limits. See [Plans & limits](/plans).
* **A surface for jobs, not just turns** — durable runs, state handles, and queryable
  artifacts for work that outlives a request. See [Agent Runs](/api/agent-runs).

## Base URL

The gateway lives at a single origin. Every endpoint is served under `/v1`.

```
https://api.layerx1.com
```

API keys are created in the dashboard and are prefixed `lx1_`. The Anthropic-style
endpoints accept the key as `x-api-key`; the OpenAI-style endpoints accept it as a
bearer token. See [Authentication](/authentication) for the details.

```sh title="A first request (Anthropic-compatible)" theme={null}
curl https://api.layerx1.com/v1/messages \
  -H "x-api-key: lx1_your_key" \
  -H "content-type: application/json" \
  -d '{"model":"lx1-gpt-oss-120b","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'
```

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" href="/quickstart">
    Key → base URL → first call, in three steps. One command for coding agents.
  </Card>

  <Card title="Claude Code" href="/guides/claude-code">
    Run Claude Code on the Layer X1 catalog with four environment variables.
  </Card>

  <Card title="API reference" href="/api/overview">
    Every endpoint on the unified surface, with request and response shapes.
  </Card>

  <Card title="Models" href="/models">
    The full catalog: tiers, context windows, capabilities, and list pricing.
  </Card>

  <Card title="Migrating" href="/guides/migrating">
    Already calling OpenAI or Anthropic? It is usually two lines.
  </Card>

  <Card title="Troubleshooting" href="/support">
    The failures people actually hit, and the one thing to change for each.
  </Card>
</CardGroup>
