Skip to content

hanzoai/openapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

79 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hanzo Cloud API

One API key. One gateway. 26 services.

curl -H "Authorization: Bearer hk-your-api-key" https://api.hanzo.ai/v1/models
from hanzo import Hanzo
client = Hanzo(api_key="hk-your-api-key")

Version 4.0.0 β€” api.hanzo.ai β€” docs.hanzo.ai


What is Hanzo Cloud?

Hanzo Cloud is a unified AI infrastructure platform. Every service β€” from LLM inference to databases to DNS β€” is accessible through a single API gateway at api.hanzo.ai with a single API key. All services share identity (Hanzo IAM), secrets (Hanzo KMS), and multi-tenant isolation.

Think: AWS + Vercel + Heroku, but unified under one auth system with AI-native primitives built in.


Services

AI & Intelligence

Service Endpoint What it does
Cloud api.cloud.hanzo.ai LLM inference API β€” 86+ models (OpenAI, Anthropic, open-source), usage tracking
Chat hanzo.chat Multi-model AI chat with MCP tools, agents, assistants, RAG
Search search.hanzo.ai Typo-tolerant full-text search with faceted filtering
Bot app.hanzo.bot Bot framework with 743 skills and plugin marketplace
Nexus nexus.hanzo.ai Knowledge base β€” document management, embeddings, semantic Q&A
Vector vector.hanzo.ai Vector database β€” collections, similarity search, hybrid retrieval

Automation & Workflows

Service Endpoint What it does
Flow flow.hanzo.ai Visual workflow builder β€” drag-and-drop, 600+ integrations
Auto auto.hanzo.ai Trigger-based automations, cron jobs, scheduled tasks
Operative operative.hanzo.ai Computer use β€” AI controls a desktop via screenshot/mouse/keyboard

Platform & Identity

Service Endpoint What it does
IAM hanzo.id Identity β€” OAuth2, OIDC, SAML, Web3 login, MFA, org management
Commerce commerce.hanzo.ai Billing β€” payments, invoicing, subscriptions, usage metering
Gateway api.hanzo.ai Unified API proxy β€” routing, rate limiting, CDN, spend tracking
Console console.hanzo.ai Observability β€” LLM traces, scores, prompt versioning, datasets
KMS kms.hanzo.ai Secrets β€” API keys, certificates, encryption, dynamic secrets
Analytics analytics.hanzo.ai Web analytics β€” pageviews, events, sessions, reports

Infrastructure

Service Endpoint What it does
PaaS paas.hanzo.ai K8s-native deployments β€” GitOps, per-org clusters, fleet management
Platform platform.hanzo.ai Local dev PaaS β€” Docker-based deployments for development
DB db.hanzo.ai Serverless Postgres β€” instant branching, autoscaling, point-in-time restore
KV kv.hanzo.ai Key-value store β€” caching, TTL, pub/sub channels, streams
MQ mq.hanzo.ai Message queue β€” pub/sub, durable streams, request/reply, KV buckets
Edge edge.hanzo.ai Edge functions β€” deploy TypeScript/JS globally, zero cold starts
Registry registry.hanzo.ai Container registry β€” image storage, vulnerability scanning, webhooks
Visor vm.hanzo.ai VM management β€” cloud instances, remote desktop (RDP/SSH)

Operations

Service Endpoint What it does
Engine engine.hanzo.ai GPU scheduling β€” ML training jobs, Ray clusters, model serving
O11y o11y.hanzo.ai Observability β€” logs (LogQL), metrics (PromQL), distributed traces, alerts
DNS dns.hanzo.ai DNS hosting β€” zones, records, DNSSEC, query analytics
ZT zt.hanzo.ai Zero-trust networking β€” identity-based overlay mesh, no open ports

Gateway Routes

Every service is accessible through api.hanzo.ai:

# AI
api.hanzo.ai/v1/chat/completions   β†’ Cloud (LLM inference)
api.hanzo.ai/v1/models             β†’ Cloud (model listing)
api.hanzo.ai/v1/chat/*             β†’ Chat
api.hanzo.ai/v1/search/*           β†’ Search
api.hanzo.ai/v1/bot/*              β†’ Bot
api.hanzo.ai/v1/nexus/*            β†’ Nexus (knowledge base)
api.hanzo.ai/v1/vector/*           β†’ Vector DB

# Automation
api.hanzo.ai/v1/flow/*             β†’ Flow (workflows)
api.hanzo.ai/v1/operative/*        β†’ Operative (computer use)

# Platform
api.hanzo.ai/v1/auth/*             β†’ IAM
api.hanzo.ai/v1/billing/*          β†’ Commerce
api.hanzo.ai/v1/kms/*              β†’ KMS
api.hanzo.ai/v1/console/*          β†’ Console
api.hanzo.ai/v1/analytics/*        β†’ Analytics

# Infrastructure
api.hanzo.ai/v1/paas/*             β†’ PaaS
api.hanzo.ai/v1/platform/*         β†’ Platform
api.hanzo.ai/v1/db/*               β†’ DB (Postgres)
api.hanzo.ai/v1/kv/*               β†’ KV
api.hanzo.ai/v1/mq/*               β†’ MQ
api.hanzo.ai/v1/edge/*             β†’ Edge (functions)
api.hanzo.ai/v1/registry/*         β†’ Registry
api.hanzo.ai/v1/vm/*               β†’ Visor (VMs)

# Operations
api.hanzo.ai/v1/engine/*           β†’ Engine (GPU/ML)
api.hanzo.ai/v1/o11y/*             β†’ O11y
api.hanzo.ai/v1/dns/*              β†’ DNS
api.hanzo.ai/v1/zt/*               β†’ ZT (zero trust)

Authentication

All services use a single HANZO_API_KEY:

curl -H "Authorization: Bearer hk-your-api-key" https://api.hanzo.ai/v1/models

Get your API key at hanzo.id or console.hanzo.ai.

Auth Methods

Method Use Case How
API Key Server-to-server, scripts Authorization: Bearer hk-...
OAuth2 + PKCE User-facing apps hanzo.id/login/oauth/authorize
Client Credentials Service-to-service POST hanzo.id/api/login/oauth/access_token
JWT After OAuth login Authorization: Bearer eyJ...

Architecture

Multi-Tenancy

Every resource is scoped by org_id from the IAM token. Tenant isolation is enforced at the gateway, service, and database layers. No cross-tenant access is possible.

Unified Identity (Hanzo IAM)

No service has its own login in production. All authentication flows through hanzo.id via OAuth2/OIDC. JWT tokens carry org and role claims. One login, all services.

Secrets (Hanzo KMS)

All credentials, TLS certs, and connection strings are managed by kms.hanzo.ai. The KMS Operator syncs secrets into K8s namespaces. No hardcoded secrets in production.

ZAP Protocol

All services implement ZAP (Zero-knowledge Attestation Protocol) for end-to-end verifiable data integrity β€” cryptographic attestation from database writes through API responses. See github.com/hanzoai/zap.

Deployment

All services deploy via Hanzo PaaS on per-org DOKS clusters with GitOps, fleet management, and autoscaling.


SDKs & Client Libraries

Official SDKs

pip install hanzo          # Python
npm install @hanzo/sdk     # TypeScript/Node
go get github.com/hanzoai/go-sdk  # Go

Generate from OpenAPI

# Python
openapi-generator generate -i hanzo.yaml -g python -o clients/python

# TypeScript
openapi-generator generate -i hanzo.yaml -g typescript-axios -o clients/typescript

# Go
openapi-generator generate -i hanzo.yaml -g go -o clients/go

# Rust
openapi-generator generate -i hanzo.yaml -g rust -o clients/rust

NPM Packages

Package Description
@hanzo/sdk Unified client for all Hanzo services
@hanzo/kv Key-value store client
@hanzo/mq Message queue client
@hanzo/pubsub Pub/sub and streaming client

OpenAPI Specs

Every service has a complete OpenAPI 3.1.0 specification:

openapi/
β”œβ”€β”€ hanzo.yaml              # Master unified spec (all 26 services)
β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ errors.yaml         # Shared error responses
β”‚   β”œβ”€β”€ pagination.yaml     # Pagination schemas
β”‚   └── auth.yaml           # Auth schemas
β”‚
β”œβ”€β”€ iam/openapi.yaml        # Identity & auth
β”œβ”€β”€ commerce/openapi.yaml   # Billing & payments
β”œβ”€β”€ cloud/openapi.yaml      # AI model API
β”œβ”€β”€ gateway/openapi.yaml    # API gateway
β”œβ”€β”€ console/openapi.yaml    # Observability
β”œβ”€β”€ kms/openapi.yaml        # Secrets management
β”‚
β”œβ”€β”€ chat/openapi.yaml       # AI chat
β”œβ”€β”€ flow/openapi.yaml       # Workflows
β”œβ”€β”€ auto/openapi.yaml       # Automations
β”œβ”€β”€ analytics/openapi.yaml  # Web analytics
β”œβ”€β”€ bot/openapi.yaml        # Bot framework
β”œβ”€β”€ search/openapi.yaml     # Full-text search
β”‚
β”œβ”€β”€ paas/openapi.yaml       # K8s PaaS
β”œβ”€β”€ platform/openapi.yaml   # Local dev PaaS
β”œβ”€β”€ visor/openapi.yaml      # VM management
β”œβ”€β”€ operative/openapi.yaml  # Computer use
β”œβ”€β”€ vector/openapi.yaml     # Vector database
β”œβ”€β”€ nexus/openapi.yaml      # Knowledge base / RAG
β”œβ”€β”€ registry/openapi.yaml   # Container registry
β”œβ”€β”€ db/openapi.yaml         # Serverless Postgres
β”œβ”€β”€ edge/openapi.yaml       # Edge functions
β”œβ”€β”€ kv/openapi.yaml         # Key-value store
β”œβ”€β”€ mq/openapi.yaml         # Message queue
β”‚
β”œβ”€β”€ engine/openapi.yaml     # GPU / ML pipelines
β”œβ”€β”€ o11y/openapi.yaml       # Logs, metrics, traces
β”œβ”€β”€ dns/openapi.yaml        # DNS management
└── zt/openapi.yaml         # Zero-trust networking

Validate

# All specs
for spec in */openapi.yaml; do
  echo "Validating $spec..."
  openapi-generator validate -i "$spec"
done

# Master spec
npx @redocly/cli lint hanzo.yaml

Serve Docs Locally

npx @redocly/cli preview-docs hanzo.yaml           # Redoc
npx @scalar/cli serve hanzo.yaml                    # Scalar
docker run -p 8080:8080 -e SWAGGER_JSON=/specs/hanzo.yaml \
  -v $(pwd):/specs swaggerapi/swagger-ui             # Swagger UI

Open Source

Hanzo Cloud is built on world-class open-source infrastructure:

GitHub Org Focus Key Projects
@hanzoai Core platform All 26 services
@hanzozt Zero-trust networking 79 repos
@hanzo-ml GPU/ML kubeflow, kuberay
@hanzodns DNS coredns
@hanzofn Edge functions edge-runtime
@hanzosql Databases neon
@hanzokv Key-value store valkey
@hanzocr Container registry harbor
@hanzomsg Messaging nats-server, nats.go, nats.js, nats.py
@hanzoo11y Observability loki, grafana, signoz

Copyright 2024-2026 Hanzo AI, Inc. All rights reserved.

About

🧬 OpenAPI 3.1 definition for the Hanzo APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •