API Reference
Hanzo Gateway API
Hanzo Gateway provides a unified LLM API gateway with support for multiple providers,
Hanzo Gateway provides a unified LLM API gateway with support for multiple providers,
bearerAuth — HTTP bearer
apiKey — API key in header (Authorization)
BearerAuth — HTTP bearer
All Hanzo APIs share one bearer credential and common error and pagination conventions. See API conventions.
curl -H "Authorization: Bearer $HANZO_API_KEY" https://api.hanzo.ai
| Method | Endpoint | Description |
|---|
POST | /v1/gateway/cdn/purge | Purge CDN cache |
GET | /v1/gateway/cdn/analytics | CDN cache analytics |
| Method | Endpoint | Description |
|---|
POST | /v1/gateway/chat/completions | Create chat completion |
| Method | Endpoint | Description |
|---|
POST | /v1/gateway/completions | Create completion |
| Method | Endpoint | Description |
|---|
GET | /v1/gateway/dns/zones | List DNS zones (proxy to dns.hanzo.ai) |
GET | /v1/gateway/dns/zones/{zone}/records | List DNS records (proxy to dns.hanzo.ai) |
| Method | Endpoint | Description |
|---|
GET | /v1/gateway/edge/{slug} | Invoke edge function (GET) |
POST | /v1/gateway/edge/{slug} | Invoke edge function via gateway |
| Method | Endpoint | Description |
|---|
POST | /v1/gateway/embeddings | Create embeddings |
| Method | Endpoint | Description |
|---|
GET | /health | Health check |
GET | /v1/gateway/health/liveliness | Liveliness check |
GET | /v1/gateway/health/readiness | Readiness check |
| Method | Endpoint | Description |
|---|
POST | /v1/gateway/key/generate | Generate API key |
GET | /v1/gateway/key/info | Get key info |
POST | /v1/gateway/key/update | Update key |
POST | /v1/gateway/key/delete | Delete key |
| Method | Endpoint | Description |
|---|
GET | /v1/gateway/models | List models |
GET | /v1/gateway/models/{model} | Get model |
| Method | Endpoint | Description |
|---|
GET | /v1/gateway/routes | List custom routing rules |
POST | /v1/gateway/routes | Create routing rule |
GET | /v1/gateway/routes/{id} | Get routing rule |
PUT | /v1/gateway/routes/{id} | Update routing rule |
DELETE | /v1/gateway/routes/{id} | Delete routing rule |
| Method | Endpoint | Description |
|---|
GET | /v1/gateway/spend/logs | Get spend logs |
POST | /v1/gateway/spend/calculate | Calculate spend for request |
| Method | Endpoint | Description |
|---|
POST | /v1/gateway/team/new | Create team |
GET | /v1/gateway/team/info | Get team info |
GET | /v1/gateway/team/list | List teams |
Hanzo Gateway API guide · All Hanzo APIs · OpenAPI spec
How is this guide?