# Introduction

URL: https://docs.router.ezat.io/

> What EZAT Router is, its two API formats and their base URLs, and where to get an API key.

## When to use this page

Start here if you are new to EZAT Router, or if you need the base URLs and want to know which API format to use.

## What EZAT Router is

EZAT Router gives you leading AI models through one API key and one prepaid balance. You add credit in the dashboard, create a key, and point your tool or SDK at EZAT Router. Each request is paid from your balance for the tokens it uses. There is no subscription.

It speaks two API formats, with the same key and the same balance:

- **Anthropic Messages API.** For Claude Code, the Anthropic SDKs and anything else that speaks Anthropic's format. You change the base URL and the key, and keep your code.
- **OpenAI Chat Completions API.** For the OpenAI SDKs, Cursor, Cline, LangChain's OpenAI client and other tools that take an OpenAI base URL.

Models are served through Amazon Bedrock. See [Models](https://docs.router.ezat.io/models.md) for the current list.

## Base URLs

| API format | Base URL | Endpoints |
| --- | --- | --- |
| Anthropic Messages | `https://api.router.ezat.io` | `POST /v1/messages`, `POST /v1/messages/count_tokens`, `GET /v1/models` |
| OpenAI-compatible | `https://api.router.ezat.io/openai/v1` | `POST /chat/completions`, `GET /models`, `GET /models/{id}` |

Both accept your `ezat_sk_…` key in the `x-api-key` header or as `Authorization: Bearer`. See [Authentication](https://docs.router.ezat.io/authentication.md).

<Callout type="warn" title="SDKs add the path themselves">
Give the Anthropic SDKs and Claude Code `https://api.router.ezat.io`, without `/v1`. Give the OpenAI SDKs `https://api.router.ezat.io/openai/v1`, with `/openai/v1`. Getting this wrong is the most common setup error: see [Troubleshooting](https://docs.router.ezat.io/troubleshooting.md).
</Callout>

## Which format to use

| You use | Format | Base URL |
| --- | --- | --- |
| Claude Code | Anthropic Messages | `https://api.router.ezat.io` |
| Anthropic SDK (Python, TypeScript and others) | Anthropic Messages | `https://api.router.ezat.io` |
| OpenAI SDKs, Cursor, Cline, LangChain's OpenAI client, other OpenAI-format tools | OpenAI-compatible | `https://api.router.ezat.io/openai/v1` |
| Your own HTTP code | Either | Prefer `https://api.router.ezat.io` |

For your own code, prefer the Anthropic format: requests reach the model as you send them. The OpenAI-compatible API translates each request into the Anthropic format and back, and refuses a few OpenAI fields that have no equivalent (see [Chat Completions](https://docs.router.ezat.io/openai/chat-completions.md)). The same conversation costs the same through either API.

## Get an API key

1. Sign in at `https://router.ezat.io`. Signing in for the first time creates your account and your first organization.
2. Add credit on the **Billing** page.
3. Create a key on the **API keys** page and copy it. The full key is shown only once.

The [Quickstart](https://docs.router.ezat.io/quickstart.md) walks through each step and your first request.

## How it works

1. **Keys belong to an organization.** Every key in an organization draws on that organization's balance. A person can be in several organizations, each with its own keys, balance and usage. See [Organizations and members](https://docs.router.ezat.io/organizations.md).
2. **Each request is checked first.** EZAT Router checks the key, the model, the key's limits and that the balance is above zero. A request that fails a check is refused and costs nothing.
3. **Each request is billed per token.** Input, output, cache-write and cache-read tokens are charged at the model's price ([Pricing](https://docs.router.ezat.io/pricing.md)) and taken from the balance when the request finishes. A request that starts with a positive balance always finishes, so a balance can end slightly below zero. See [How billing works](https://docs.router.ezat.io/billing.md).
4. **Everything is on record, except your content.** Usage shows every request with its model, tokens and cost. Prompts and responses are never stored or logged.

When you contact support at support@ezat.io, quote the response's `request-id` header, or `x-request-id` if there is no `request-id`. See [Troubleshooting](https://docs.router.ezat.io/troubleshooting.md).

EZAT Router is an independent service. It isn't affiliated with or endorsed by Anthropic, OpenAI or Amazon Web Services, and model names belong to their owners.

## Next steps

<Cards>
  <Card title="Quickstart" href="/quickstart">
    Sign up, create a key and send your first request.
  </Card>
  <Card title="Claude Code" href="/tools/claude-code">
    Run Claude Code on your EZAT Router balance.
  </Card>
  <Card title="Anthropic Messages" href="/anthropic/messages">
    `POST /v1/messages`, streaming, token counting and headers.
  </Card>
  <Card title="OpenAI-compatible" href="/openai/base-url">
    Base URL and setup for OpenAI SDKs and tools.
  </Card>
  <Card title="Models" href="/models">
    Every model you can call, with its id and aliases.
  </Card>
  <Card title="Pricing" href="/pricing">
    Prices per million tokens, next to the official price.
  </Card>
</Cards>

## For AI agents

1. Anthropic-format base URL: `https://api.router.ezat.io` (no `/v1`). OpenAI-format base URL: `https://api.router.ezat.io/openai/v1`.
2. Send the key as `x-api-key: $EZAT_API_KEY` or `Authorization: Bearer $EZAT_API_KEY`. Read it from the `EZAT_API_KEY` environment variable; never ask the user to paste it into the chat.
3. List models with `GET https://api.router.ezat.io/v1/models`. Don't hard-code model lists or prices.
4. The index of every page is `https://docs.router.ezat.io/llms.txt`, and all pages in one file are at `https://docs.router.ezat.io/llms-full.txt`. Add `.md` to any page URL for its Markdown (`https://docs.router.ezat.io/quickstart.md`).
5. The API spec is `https://docs.router.ezat.io/openapi.yaml`.
6. For setup work, follow [Notes for AI agents](https://docs.router.ezat.io/agents.md), or install the [agent skill](https://docs.router.ezat.io/agents/skill.md) from `https://docs.router.ezat.io/skill/ezat-router.zip`.