Quickstart

From signup to your first routed request in under 2 minutes.

HiWay2LLM is a BYOK (Bring Your Own Key) routing layer that sits between your code and any LLM provider. You plug in your own OpenAI / Anthropic / Google / Mistral API keys, you change your base_url to HiWay, and the router picks the cheapest capable model for every request. You pay providers directly at their published rates - HiWay applies a markup % on your monthly API spend (9-12.5% on Scale by volume, automatically decreasing).

1. Create an account

Head to /auth, sign up with an email and a password. Or skip the dashboard entirely and use the CLI (see the SDK & CLI page - one command creates your account from the terminal).

2. Add your provider keys

Open Dashboard → Settings → Providers and paste your own API keys for the providers you want to use. HiWay stores them encrypted (AES-256-GCM) and uses them to call the upstream providers on your behalf. The providers charge your card, not ours.

BYOK - your providers bill you directly

Every token you consume is billed by the provider at their published rate, directly on your card. HiWay is not a reseller - it applies a markup % on your monthly API spend. The more volume you have, the lower the markup percentage.

3. Mint an API key

Open Dashboard → Keys and click New key. Your key is shown once and starts with hw_live_. Copy it into your secret manager - HiWay only stores its SHA-256 hash and cannot recover it if you lose it.

4. Send your first request

HiWay speaks the OpenAI chat-completions wire protocol. Any client that targets it works - OpenAI Python, OpenAI Node, LangChain, Vercel AI SDK, n8n, curl. Just point your client at HiWay and pass your hw_live_ key.

from openai import OpenAI

client = OpenAI(
    base_url="https://app.hiway2llm.com/v1",
    api_key="hw_live_YOUR_KEY",
)

response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Say hello in 5 words"}],
)

print(response.choices[0].message.content)
print("Routed to:", response.model)

5. Read what was routed

Every response carries a _hiway metadata object and two custom headers telling you exactly which model answered, why, and whether a fallback kicked in.

json
{
  "id": "chatcmpl-...",
  "choices": [...],
  "_hiway": {
    "routed_model": "anthropic/claude-haiku-4-5",
    "routed_tier":  "light",
    "score":        0.18,
    "reason":       "short prompt, no tools, temp=0",
    "fallback":     false
  }
}
http
X-HiWay-Routed-Model: anthropic/claude-haiku-4-5
X-HiWay-Routed-Tier:  light

Open Dashboard → Usage to see the live timeline of your requests, the cost breakdown by model, and your savings vs always routing to the flagship baseline (Claude Opus 4.7).