LogoToRouter Docs
LogoToRouter Docs
HomepageWhat is ToRouter5-minute quickstartCore concepts

5-minute quickstart

Sign up, top up, subscribe, create a key, and make your first call against ToRouter.

Go from zero to your first successful API call in under five minutes. You only need an email address and a card.

Create your account

Open portal.torouter.ai and register with your email and password. Click the verification link we email you to activate the account.

See Sign up & verify email for details.

Top up with Stripe

In the console, open Billing → Top up and pay with a card via Stripe. The credit lands on your account balance and is what pay-per-token requests will draw against.

See Top up your balance.

Enable model access

Open Subscriptions in the console and follow the prompts. Once active, your key can call the models covered by that access.

Create an API key

Open API Keys → New key, give it a name, and copy the sk-*** value. You only see it once.

See Create an API key.

Make your first call

Use the OpenAI-compatible endpoint with your new key.

from openai import OpenAI

client = OpenAI(
    api_key="sk-***",
    base_url="https://portal.torouter.ai/v1",
)

resp = client.chat.completions.create(
    model="gpt-5",
    messages=[{"role": "user", "content": "Say hello in one word."}],
)
print(resp.choices[0].message.content)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-***',
  baseURL: 'https://portal.torouter.ai/v1',
});

const resp = await client.chat.completions.create({
  model: 'gpt-5',
  messages: [{ role: 'user', content: 'Say hello in one word.' }],
});
console.log(resp.choices[0].message.content);
curl https://portal.torouter.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-***" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5",
    "messages": [{"role": "user", "content": "Say hello in one word."}]
  }'

You can also call Anthropic's /v1/messages or Gemini's /v1beta against the same host — see Base URL & authentication.

Next steps

Core concepts

Account, channel, model, key, quota — the mental model.

Base URL & auth

Endpoint table for OpenAI / Anthropic / Gemini SDKs.

Per-key limits

Rate limits, model whitelists, IP allowlists, expiry.

What is ToRouter

ToRouter is a unified AI API gateway — one key, every model, one bill.

Core concepts

The five-noun mental model behind ToRouter — account, channel, model, key, quota.

Table of Contents

Create your accountTop up with StripeEnable model accessCreate an API keyMake your first callNext steps