Developer docs
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.
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#
- Quickstart: Create a key and make your first request with curl, Python or Node.
- API reference: Endpoints, headers, request and response shapes, streaming, tool calling and usage fields.
- Migrating: Coming from the OpenAI API, the Anthropic API or another gateway: what to change and what differs.
- Errors: What each status code means, how to fix it, and a retry pattern that does not waste credit.
- Tool guides: Exact settings for 8 coding tools, including Claude Code, Codex CLI, Cursor.
- Models and rates: 11 models across Claude, GPT, Grok, DeepSeek, with exact ids and per-token prices.
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.
Client
Your app or coding tool
Bearer sk-…
Relaykit gateway
- 1 Check key and balance
- 2 Route to the model you named
- 3 Meter tokens, deduct at the model's rate
Upstream
Model provider
Claude · GPT · Grok · DeepSeek
usage object lists the tokens you are charged for.Base URLs at a glance#
| Format | Base URL | Auth header | Copy |
|---|---|---|---|
| OpenAI | https://api.oneaiapikey.com/v1 | Authorization: Bearer sk-… | |
| Anthropic | https://api.oneaiapikey.com | x-api-key: sk-… |
Billing basics#
- Billing is prepaid. One credit is one US dollar of usage at the per-model rates on the models page.
- New accounts start at $0, with no sign-up credit. Models become available once the account has paid $3 or more; see billing.
- Nothing renews on its own. Optional plans are opening soon. See Pricing and 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, per-request usage log and balance live in the console.
Tool guides#
Prefer a ready-made coding tool to writing code? Each guide gives the exact fields to fill in.