Quickstart
This guide gets you from zero to your first observed, governed request in about five minutes.
1. Create a project key
From the dashboard, open Settings → API keys and create a key scoped to chat:write. Copy it — it's shown only once.
shell
# keep keys in env, never in source export APIHUB_KEY="ah_live_•••••••"
2. Point your SDK at the gateway
APIHub Star is OpenAI-compatible. Change only the base_url:
quickstart.py
from openai import OpenAI import os client = OpenAI( base_url="https://api.apihubstar.tech/v1", api_key=os.environ["APIHUB_KEY"], ) resp = client.chat.completions.create( model="auto", messages=[{"role":"user","content":"Hello, gateway!"}], ) print(resp.choices[0].message.content)
3. Or call it over plain HTTP
curl
curl https://api.apihubstar.tech/v1/chat/completions \ -H "Authorization: Bearer $APIHUB_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'
The special model
"auto" lets APIHub Star pick the cheapest upstream that meets your latency target. Pin a provider any time by passing its name instead.4. Watch it live
Open Observability → Live tail to see the request you just made, with its route, cache status, token cost and latency breakdown.