Quickstart

Create an API key and run the example with model free. Compatible chat models accept OpenAI Chat Completions or Anthropic Messages with the same key. Other modalities use the endpoint listed on their model page.

1. Create an API key

Sign in and create a key with your email using a one-time code. KeepRouter does not use passwords. New accounts can call the free model without a top-up. The key starts with sk-kr-, is scoped to free by default in this flow, and is shown once.

2. Call a compatible chat model like OpenAI

Point your client's base_url at https://keeprouter.com/v1:

curl https://keeprouter.com/v1/chat/completions \
  -H "Authorization: Bearer sk-kr-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"free","messages":[{"role":"user","content":"Hello!"}]}'

Python with the official OpenAI SDK:

from openai import OpenAI
client = OpenAI(base_url="https://keeprouter.com/v1", api_key="sk-kr-...")
r = client.chat.completions.create(
    model="free",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)

3. Or call the compatible chat model like Anthropic

The same key works on the Anthropic Messages API used by Claude Code and the Anthropic SDK:

curl https://keeprouter.com/v1/messages \
  -H "x-api-key: sk-kr-..." \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"free","max_tokens":256,"messages":[{"role":"user","content":"Hello!"}]}'

These first-call examples deliberately use the production trial-eligible free model, so a new account can run them before topping up. To replace free with a paid model such as claude-opus-4-8, complete a valid top-up first and confirm the model's current endpoint on Models & pricing.

Next

  • Models & pricing: current price, modality, and endpoint guidance for each model.
  • API errors: documented error codes, retry behavior, and corrective actions.
  • API reference: the full OpenAPI reference.

Billing in one line

Paid usage is deducted from prepaid USD credit at the published model rate. There is no recurring subscription. Card checkout shows the processing fee and applicable tax before payment. Per-key spend limits are optional.