Skip to content

Quick Start

From sign-up to your first successful call in 5 minutes.

1. Sign up

Visit https://wrouter.ai/register. Email + password, GitHub, or Google all work.

New accounts get a small free trial credit.

2. Create an API Key

  1. Sign in at https://wrouter.ai/dashboard/overview
  2. API Keys → Create API Key
  3. Fill in:
    • Name: e.g. dev-test
    • Group: keep the default
    • Expiry: Never / 1 month / 1 day / 1 hour
    • Unlimited quota: on by default; turn it off and set a cap for production
  4. Click Save changes, then copy the generated sk-... key from the list.

See API Keys.

3. Top up (optional)

Trial credits cover initial exploration. To go further, go to Wallet → Top-up:

  • Credit / debit card
  • Stablecoin
  • Redemption codes

See Billing.

4. Make your first call

Point any OpenAI SDK at WRouter.

curl

bash
curl https://wrouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $WROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello, WRouter!"}]
  }'

Python (openai SDK)

python
from openai import OpenAI

client = OpenAI(
    api_key="sk-...",
    base_url="https://wrouter.ai/v1",  # note trailing /v1
)

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Node.js (openai SDK)

js
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.WROUTER_API_KEY,
  baseURL: "https://wrouter.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);

5. Call Claude or Gemini

Same token — just change the model ID:

python
client.chat.completions.create(model="claude-sonnet-4-5", messages=[...])
client.chat.completions.create(model="gemini-2.5-pro",  messages=[...])

Or use the native protocols:

  • Anthropic: POST https://wrouter.ai/v1/messages — see Messages
  • Gemini: POST https://wrouter.ai/v1beta/models/{model}:generateContent

6. Plug into your tools

Troubleshooting

401 Unauthorized — Wrong token or missing Authorization: Bearer sk-... header.

404 Model not found — Model ID mistyped or not enabled for your group. Check https://wrouter.ai/models.

Insufficient balance — Top up or request a trial credit.