Skip to content
Relaykit
DocsDocumentation

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.

Updated View .md
On this page

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.
  2. API reference: Endpoints, headers, request and response shapes, streaming, tool calling and usage fields.
  3. Migrating: Coming from the OpenAI API, the Anthropic API or another gateway: what to change and what differs.
  4. Errors: What each status code means, how to fix it, and a retry pattern that does not waste credit.
  5. Tool guides: Exact settings for 8 coding tools, including Claude Code, Codex CLI, Cursor.
  6. 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. 1 Check key and balance
  2. 2 Route to the model you named
  3. 3 Meter tokens, deduct at the model's rate

Upstream

Model provider

Claude · GPT · Grok · DeepSeek

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#

FormatBase URLCopy
OpenAIhttps://api.oneaiapikey.com/v1
Anthropichttps://api.oneaiapikey.com

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.

All topics#

↑ ↓ moveEnter openEsc close