Gateway & API
gateway.idlidu.dev is the prepaid, Bottom-first inference front. api.idlidu.dev holds accounts, keys, usage, and billing. Id uses both; any OpenAI-compatible client can use the gateway alone.
Hosts
| Host | Purpose |
|---|---|
https://gateway.idlidu.dev | Chat completions, models, health, agent handoff |
https://api.idlidu.dev | Auth, keys, credits, usage, alerts, settings |
https://app.idlidu.dev | Browser console (session cookie) |
https://pay.idlidu.dev | PayU checkout for prepaid packs |
Authentication
- API key —
Authorization: Bearer idl_…(gateway + most API routes) - Session — HttpOnly cookie on
.idlidu.devafter app login (billing checkout)
Mint keys in app → API keys. Each key has a turn budget default, optional hard limit ($ lifetime), and spent counter.
Chat completions
OpenAI-shaped POST /v1/chat/completions on the gateway:
curl https://gateway.idlidu.dev/v1/chat/completions \
-H "Authorization: Bearer idl_…" \
-H "Content-Type: application/json" \
-d '{
"model": "bottom",
"messages": [{"role":"user","content":"ping"}]
}' model: "bottom"— gateway picks the cheapest capable catalog id- Explicit catalog id — pin that model (see Models)
- Usage billed at 1.5× provider token cost against prepaid balance
Streaming: set "stream": true (SSE). Headers may include balance / alert hints.
Health & models
curl -s https://gateway.idlidu.dev/health | jq .
# expect: ok, catalog size, bottom_ready GET /v1/models lists the catalog Id shows via Id models.
Product page: /models.
Agent HTTP
Long-running / cloud agent runs go through the gateway agent surface
(Id handoff, Id serve clients). Protocol details:
Agent API.
Credits & me
GET /v1/me/GET /v1/credits— balance, key meta,alerts- Burn happens on successful inference; hard limit and $0 balance reject further spend
Full URL list: Reference.
Errors you will see
| Symptom | Likely cause |
|---|---|
| 401 / invalid key | Revoked or mistyped idl_; stale shell ID_API_KEY |
| 402 / insufficient | Account balance $0 or key hard limit hit |
| Turn stopped early | Local --budget / key turn budget |
| Checkout disabled | Pay soft-off until launch; see Billing |
Bottom routing · Billing · Id · Status