API Reference
Overview
Base URL, authentication, and the full endpoint list.
Base URL: https://agent-router.gaib.ai
All endpoints are under /v1/ except /health.
Machine-readable spec
The full API is published as an OpenAPI 3.1 spec — point your
agent, SDK generator, or API client at it. For LLM context, /llms.txt
indexes the docs and /llms-full.txt is every page as one markdown file.
Authentication
| Method | Used for |
|---|---|
API key — Authorization: Bearer sk-<64 hex> | Inference, usage queries |
| SIWE — signed message + signature | API key management |
| x402 — payment signature | Top-up |
See Authentication for details.
Endpoints
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/health | GET | — | Health check |
/v1/models | GET | — | List models with pricing |
/v1/topup | POST | x402 | Fund balance with USDC or USDT |
/v1/topups/:wallet | GET | API key / SIWE | List top-up history |
/v1/auth/keys | POST | SIWE | Create API key |
/v1/auth/keys | GET | SIWE | List API keys |
/v1/auth/keys/:id | DELETE | SIWE | Revoke API key |
/v1/chat/completions | POST | API key | Inference (OpenAI-compatible) |
/v1/usage/:wallet | GET | API key / SIWE | Balance & usage stats |
/v1/balance/:wallet | GET | — | Available balance only |
Health
GET /health
curl https://agent-router.gaib.ai/health{ "status": "ok" }