Hanzo Embeddings
Generate, store, and search vector embeddings at scale — the embeddings endpoint on Hanzo Cloud, serving our own zen-embedding and pairing with Vector.
Hanzo Embeddings
Hanzo Embeddings turns text into vectors on the AI API — one endpoint, the same sk- key as everything else. Generate embeddings, then store and query them in Vector for semantic search and RAG.
Generate Embeddings
zen-embedding is ours, and the default:
curl https://api.hanzo.ai/v1/embeddings \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "zen-embedding",
"input": "Hanzo is an AI cloud platform."
}'Response:
{
"object": "list",
"data": [{ "object": "embedding", "index": 0, "embedding": [0.021, -0.014, "..."] }],
"model": "zen-embedding",
"usage": { "prompt_tokens": 8, "total_tokens": 8 }
}Pass an array of strings as input to embed a batch in one request.
Store and Search
Provision a Vector collection whose dimensions match your model, then upsert the returned vectors and query for nearest neighbors.
from hanzoai import Hanzo
client = Hanzo(api_key="sk-...")
vecs = client.embeddings.create(
model="zen-embedding",
input=["first document", "second document"],
)
# Upsert vecs.data[i].embedding into your Vector collection, then search.Models
| Model | Dimensions | Notes |
|---|---|---|
zen-embedding | 1024 | Default. Hanzo's own embedding model. |
The catalogue also carries open-weight embedding models such as bge-m3. GET /v1/models lists every id this endpoint accepts — see Models. Whichever you pick, set your Vector collection's dimensions from the length of the vector you actually get back rather than assuming it.
Pricing follows the AI API. Because embeddings share the gateway's per-key budgets and rate limits, the same sk- key governs spend across chat and embeddings.
/v1/embeddings takes and returns the same JSON shapes as the widely-implemented embeddings format, so an HTTP client written against it works here once its base URL points at https://api.hanzo.ai/v1 and it sends a Hanzo key.
Related
- Vector — store and search the embeddings you generate
- Search — hybrid full-text + semantic ranking
- AI API — chat, embeddings, images and reranking on one host
- API Keys — budgets and rate limits per key
- API Reference — every endpoint at
api.hanzo.ai
How is this guide?