Hanzo
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,

Base URLhttps://api.hanzo.ai
Version1.0.0
Operations28
GuideHanzo Gateway API guide

Authentication

  • 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

Endpoints

CDN

MethodEndpointDescription
POST/v1/gateway/cdn/purgePurge CDN cache
GET/v1/gateway/cdn/analyticsCDN cache analytics

Chat

MethodEndpointDescription
POST/v1/gateway/chat/completionsCreate chat completion

Completions

MethodEndpointDescription
POST/v1/gateway/completionsCreate completion

DNS

MethodEndpointDescription
GET/v1/gateway/dns/zonesList DNS zones (proxy to dns.hanzo.ai)
GET/v1/gateway/dns/zones/{zone}/recordsList DNS records (proxy to dns.hanzo.ai)

Edge

MethodEndpointDescription
GET/v1/gateway/edge/{slug}Invoke edge function (GET)
POST/v1/gateway/edge/{slug}Invoke edge function via gateway

Embeddings

MethodEndpointDescription
POST/v1/gateway/embeddingsCreate embeddings

Health

MethodEndpointDescription
GET/healthHealth check
GET/v1/gateway/health/livelinessLiveliness check
GET/v1/gateway/health/readinessReadiness check

Keys

MethodEndpointDescription
POST/v1/gateway/key/generateGenerate API key
GET/v1/gateway/key/infoGet key info
POST/v1/gateway/key/updateUpdate key
POST/v1/gateway/key/deleteDelete key

Models

MethodEndpointDescription
GET/v1/gateway/modelsList models
GET/v1/gateway/models/{model}Get model

Routes

MethodEndpointDescription
GET/v1/gateway/routesList custom routing rules
POST/v1/gateway/routesCreate 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

Spend

MethodEndpointDescription
GET/v1/gateway/spend/logsGet spend logs
POST/v1/gateway/spend/calculateCalculate spend for request

Teams

MethodEndpointDescription
POST/v1/gateway/team/newCreate team
GET/v1/gateway/team/infoGet team info
GET/v1/gateway/team/listList teams

Hanzo Gateway API guide · All Hanzo APIs · OpenAPI spec

How is this guide?

On this page