Your first request
Send a request, read the routing headers, iterate.
Once you have a funded account and an API key, the fastest way to feel the router is a one-line curl against the chat-completions endpoint.
curl https://www.hiway2llm.com/v1/chat/completions \
-H "Authorization: Bearer hwy_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [
{"role": "user", "content": "What is the capital of France?"}
]
}'The response headers tell you what happened
HiWay adds three custom headers on every successful response:
X-HiWay-Model— the exact provider model that answered the request.X-HiWay-Tier— the routing tier picked (light,standard,heavy).X-HiWay-Cost-USD— the exact cost of this request, in USD, debited from your balance.
Deterministic routing
The same prompt always routes to the same tier — we use a pure CPU scoring engine, no ML, no randomness. You can replay a request and get the same tier back as long as your routing profile hasn't changed.
What `model: auto` means
Passing auto tells HiWay to pick the best tier for the prompt based on complexity. You can also pin a tier (e.g. light, standard, heavy) or a specific provider model (e.g. claude-sonnet, gpt-4o-mini). Pinning overrides the router and goes straight to the provider.