Hanzo SQL
Managed PostgreSQL — provision databases, create copy-on-write branches, and scale reads with replicas over a single API and the standard Postgres wire protocol.
Hanzo SQL
Hanzo SQL is managed, serverless PostgreSQL 16. Provision a database in one call, connect with any Postgres client, and use instant branching, read replicas, connection pooling, and pgvector without running infrastructure.
Provision a Database
Databases are scoped to your organization. Creating one returns a ready-to-use connection string.
curl -X POST https://api.hanzo.ai/v1/sql \
-H "Authorization: Bearer sk-..." \
-H "X-Org-Id: org_a1b2c3" \
-H "Content-Type: application/json" \
-d '{ "name": "app", "region": "us-east" }'The response contains a pooled endpoint (recommended for applications) and a direct endpoint (for migrations, LISTEN/NOTIFY, and advisory locks).
Connect
Any PostgreSQL driver or psql works — Hanzo SQL speaks the standard wire protocol over TLS.
psql "postgresql://user:[email protected]:6432/app?sslmode=require"import asyncpg
conn = await asyncpg.connect(
"postgresql://user:[email protected]:5432/app?sslmode=require"
)
rows = await conn.fetch("SELECT id, title FROM documents LIMIT 10")Branches and Replicas
Branches are copy-on-write clones that share storage with the parent until data diverges — near-instant regardless of database size. Use them for development, CI, and schema previews. Read-heavy traffic points at a replica endpoint instead, where replication lag is typically under 100 ms.
Features
- PostgreSQL 16 with auto-scaling compute that scales to zero when idle
- pgvector for storing and searching embeddings alongside relational data
- Instant copy-on-write branches for dev, staging, and CI
- Read replicas, PgBouncer connection pooling, and point-in-time recovery
- Extensions:
pg_trgm,postgis,uuid-ossp,pg_stat_statements, and more
Related
- Hanzo DB engine reference — pooling modes, PITR, and pgvector indexing
- Vector — a dedicated vector database for embedding-first workloads
- DocDB — MongoDB-compatible document storage
- API Keys — authenticate with
sk-keys - API Reference — every endpoint at
api.hanzo.ai
In this section
Hanzo Vector
Managed vector database for embeddings and semantic search — HNSW indexing, metadata filtering, and hybrid…
Hanzo KV
Managed key-value store — a Redis/Valkey-compatible cache, queue, and pub/sub engine with sub-millisecond…
Hanzo Search
Managed search — full-text and hybrid indexes with typo tolerance, faceted filtering, and sub-50ms queries…
Hanzo Storage
S3-compatible object storage — durable, versioned buckets for models, datasets, and media that work with any…
Hanzo Base
Multi-tenant Hanzo Base — provision and manage tenant backend instances, each a single-binary BaaS with REST…
Hanzo Datastore
Managed column-oriented analytics store — run sub-second SQL over billions of rows with a…
Insights
Hanzo Insights — product analytics at insights.hanzo.ai. Event capture, person profiles, session replay…
Hanzo DocDB
Managed document database — a MongoDB-compatible store with BSON documents, aggregation pipelines, and…
Hanzo Memory
Your personal memory — a searchable, editable long-term memory service for agents and apps, built on semantic…
How is this guide?