# Knot > An OpenAI-compatible API gateway. One key for every model, automatic failover past rate limits, and honest per-token metering on every request. Knot is an OpenAI-compatible HTTP API gateway. It sits between a client and a pool of model capacity: one public model ID maps to an ordered pool of slots spanning several regions, requests are routed to a healthy one, rate limits are retried past transparently, and every token spent is priced and recorded against the caller's balance. It is invite-only. Creating an account requires a valid invite code, which also carries the credit the account starts with. This applies to email, Google and GitHub sign-up alike. ## Using it Point any OpenAI SDK at `https://tryknot.xyz/v1` and authenticate with an Knot key (`Authorization: Bearer knot_live_…`, or `x-api-key`). No client code changes are required beyond the base URL. ```python from openai import OpenAI client = OpenAI(base_url="https://tryknot.xyz/v1", api_key="knot_live_…") client.chat.completions.create( model="openai/gpt-5.6-luna", messages=[{"role": "user", "content": "Hello"}], stream=True, ) ``` ## Endpoints - `POST /v1/chat/completions` — chat, streaming and non-streaming. Billed on input + output tokens, cached input discounted. - `POST /v1/images/generations` — billed on the tokens the model reports, so cost tracks image size and quality. - `GET /v1/models` — public catalog with live pricing. No auth required. - `GET /v1/credits` — remaining balance for a key. ## Models - `anthropic/claude-opus-4.8` (chat) — Claude Opus 4.8. $5.00 per 1M input tokens, $25.00 per 1M output tokens, $0.50 per 1M cached input tokens. - `anthropic/claude-opus-5` (chat) — Claude Opus 5. $5.00 per 1M input tokens, $25.00 per 1M output tokens, $0.50 per 1M cached input tokens. - `moonshot/kimi-k2.6` (chat) — Kimi K2.6. $0.95 per 1M input tokens, $4.00 per 1M output tokens, $0.13 per 1M cached input tokens. - `openai/gpt-5.4` (chat) — GPT-5.4. $2.50 per 1M input tokens, $15.00 per 1M output tokens, $0.25 per 1M cached input tokens. - `openai/gpt-5.4-mini` (chat) — GPT-5.4 Mini. $0.75 per 1M input tokens, $4.50 per 1M output tokens, $0.07 per 1M cached input tokens. - `openai/gpt-5.4-nano` (chat) — GPT-5.4 Nano. $0.20 per 1M input tokens, $1.25 per 1M output tokens, $0.02 per 1M cached input tokens. - `openai/gpt-5.5` (chat) — GPT-5.5. $5.00 per 1M input tokens, $30.00 per 1M output tokens, $0.50 per 1M cached input tokens. - `openai/gpt-5.6-luna` (chat) — GPT-5.6 Luna. $1.00 per 1M input tokens, $6.00 per 1M output tokens, $0.10 per 1M cached input tokens. - `openai/gpt-5.6-sol` (chat) — GPT-5.6 Sol. $5.00 per 1M input tokens, $30.00 per 1M output tokens, $0.50 per 1M cached input tokens. - `openai/gpt-5.6-terra` (chat) — GPT-5.6 Terra. $2.50 per 1M input tokens, $15.00 per 1M output tokens, $0.25 per 1M cached input tokens. - `openai/gpt-image-2` (image) — GPT Image 2. $5.00 per 1M input tokens, $30.00 per 1M output tokens, — per 1M cached input tokens. - `xai/grok-4.1-fast` (chat) — Grok 4.1 Fast. $0.20 per 1M input tokens, $0.50 per 1M output tokens, $0.05 per 1M cached input tokens. - `xai/grok-4.3` (chat) — Grok 4.3. $1.25 per 1M input tokens, $2.50 per 1M output tokens, $0.20 per 1M cached input tokens. ## Behaviour worth knowing - **Failover happens before the first byte.** A 429 or 5xx moves the request to the next deployment in the pool. Because that decision is made on response headers, streamed requests get failover too — but once a stream has started it belongs to that deployment. - **Metering runs after the response.** Usage rows and ledger debits are written once the client already has its answer, so billing never adds latency. - **Money is integer micro-dollars** (1,000,000 = $1.00). Balances cannot drift through floating-point rounding. - **A balance is checked before a request, and charged after it.** The true cost is only known once the model has answered, so a final request can overshoot slightly; the debit is still recorded and the next request is refused. - **`max_tokens` is rewritten to `max_completion_tokens`** for deployments that require it, so standard OpenAI clients work unmodified. - **Errors use the OpenAI error shape** — `{ "error": { "message", "type", "code", "param" } }` — so existing SDK error handling works: 401 invalid key, 402 out of credit, 404 unknown model, 429 rate limited, 503 no capacity. ## Pages - [Home](https://tryknot.xyz/) — what it is and how a request flows through it. - [Model catalog](https://tryknot.xyz/models) — every model and its price. - [Documentation](https://tryknot.xyz/docs) — API reference. - [Security](https://tryknot.xyz/security) — how keys and credentials are handled, and how to report an issue. - [Privacy](https://tryknot.xyz/privacy) · [Terms](https://tryknot.xyz/terms) ## Optional - [Full reference](https://tryknot.xyz/llms-full.txt) — the same material with complete request and response examples.