# Documentation

> Everything you need to call Claude, GPT, Grok and DeepSeek through one OpenAI- and Anthropic-compatible API: quickstart, API reference, errors and tool guides.

Source: https://oneaiapikey.com/docs

Relaykit is a prepaid gateway that puts many models behind one API key. If your code or tool already talks to the OpenAI or Anthropic API, you change two things: the **base URL** and the **API key**. Request bodies, SDKs and streaming stay the same.

## Start here

1. [Quickstart: Create a key and make your first request with curl, Python or Node.](https://oneaiapikey.com/docs/quickstart)
2. [API reference: Endpoints, headers, request and response shapes, streaming, tool calling and usage fields.](https://oneaiapikey.com/docs/api-reference)
3. [Migrating: Coming from the OpenAI API, the Anthropic API or another gateway: what to change and what differs.](https://oneaiapikey.com/docs/migrate)
4. [Errors: What each status code means, how to fix it, and a retry pattern that does not waste credit.](https://oneaiapikey.com/docs/errors)
5. [Tool guides: Exact settings for 8 coding tools, including Claude Code, Codex CLI, Cursor.](https://oneaiapikey.com/docs/guides)
6. [Models and rates: 11 models across Claude, GPT, Grok, DeepSeek, with exact ids and per-token prices.](https://oneaiapikey.com/models)

## How it works

Your app sends a normal OpenAI- or Anthropic-format request with your key. The gateway checks the key and your balance, forwards the request to the model you named, returns the answer in the format you used, and deducts the tokens used at that model's published rate.

The response comes back in the same format you sent. Its `usage` object lists the tokens you are charged for.

## Base URLs at a glance

| Format | Base URL | Auth header |
| --- | --- | --- |
| OpenAI | `https://api.oneaiapikey.com/v1` | `Authorization: Bearer sk-…` |
| Anthropic | `https://api.oneaiapikey.com` | `x-api-key: sk-…` |

> **The /v1 rule:** OpenAI SDKs expect the base URL to _include_ `/v1`. Anthropic SDKs and Claude Code expect it _without_ `/v1`, because they append `/v1/messages` themselves. Most 404 errors come from mixing these up.

## Billing basics

- Billing is prepaid. One credit is one US dollar of usage at the per-model rates on the [models page](https://oneaiapikey.com/models).
- New accounts start at $0, with no sign-up credit. Models become available once the account has paid $3 or more; see [billing](https://oneaiapikey.com/console/billing).
- Nothing renews on its own. Optional plans are opening soon. See [Pricing and billing](https://oneaiapikey.com/docs/billing).
- Each request is charged for the input and output tokens it used. Requests the gateway rejects up front (invalid key, empty balance, unknown model) are not charged.
- Your [keys](https://oneaiapikey.com/console/keys), [per-request usage log](https://oneaiapikey.com/console/usage) and [balance](https://oneaiapikey.com/console/billing) live in the [console](https://oneaiapikey.com/console).

## Tool guides

Prefer a ready-made coding tool to writing code? Each guide gives the exact fields to fill in.

- [Claude Code](https://oneaiapikey.com/docs/guides/claude-code)
- [Codex CLI](https://oneaiapikey.com/docs/guides/codex-cli)
- [Cursor](https://oneaiapikey.com/docs/guides/cursor)
- [Cline](https://oneaiapikey.com/docs/guides/cline)
- [Kilo Code](https://oneaiapikey.com/docs/guides/kilo-code)
- [OpenCode](https://oneaiapikey.com/docs/guides/opencode)
- [Aider](https://oneaiapikey.com/docs/guides/aider)
- [Zed](https://oneaiapikey.com/docs/guides/zed)
- [All guides](https://oneaiapikey.com/docs/guides)

## All topics

### Get started

- [Quickstart](https://oneaiapikey.com/docs/quickstart)
- [Authentication and keys](https://oneaiapikey.com/docs/authentication)
- [Models](https://oneaiapikey.com/docs/models)
- [Chat in the browser](https://oneaiapikey.com/docs/chat)

### Build

- [Chat completions](https://oneaiapikey.com/docs/chat-completions)
- [Anthropic Messages](https://oneaiapikey.com/docs/anthropic-messages)
- [Responses API](https://oneaiapikey.com/docs/responses)
- [Streaming](https://oneaiapikey.com/docs/streaming)
- [Tool calling](https://oneaiapikey.com/docs/tool-calling)
- [MCP servers](https://oneaiapikey.com/docs/mcp)
- [Vision and files](https://oneaiapikey.com/docs/vision)
- [Structured output](https://oneaiapikey.com/docs/structured-output)
- [Reasoning models](https://oneaiapikey.com/docs/reasoning)

### Optimize

- [Prompt caching](https://oneaiapikey.com/docs/prompt-caching)
- [Cost control](https://oneaiapikey.com/docs/cost-control)
- [Rate limits and retries](https://oneaiapikey.com/docs/rate-limits)
- [Errors](https://oneaiapikey.com/docs/errors)
- [Performance metrics](https://oneaiapikey.com/docs/performance)
- [Routing and privacy](https://oneaiapikey.com/docs/routing-privacy)
- [Migrating to Relaykit](https://oneaiapikey.com/docs/migrate)

### Account and billing

- [Pricing and billing](https://oneaiapikey.com/docs/billing)
- [Account security and alerts](https://oneaiapikey.com/docs/account-security)

### Apps and SDKs

- [SDKs and frameworks](https://oneaiapikey.com/docs/sdks)
- [Open WebUI](https://oneaiapikey.com/docs/apps/open-webui)
- [LibreChat](https://oneaiapikey.com/docs/apps/librechat)
- [LobeChat](https://oneaiapikey.com/docs/apps/lobechat)
- [SillyTavern](https://oneaiapikey.com/docs/apps/sillytavern)
- [Chatbox](https://oneaiapikey.com/docs/apps/chatbox)

### Reference

- [API reference](https://oneaiapikey.com/docs/api-reference)
- [Docs for AI tools](https://oneaiapikey.com/docs/llms)
- [Changelog](https://oneaiapikey.com/changelog)
