⚡ Zen LM

Embeddings

Generate 3072-dimensional vector embeddings with zen3-embedding

Embeddings

Generate dense vector embeddings for text using the zen3-embedding model.

Endpoint

POST https://api.hanzo.ai/v1/embeddings

Request Body

ParameterTypeRequiredDescription
modelstringYesMust be zen3-embedding
inputstring/arrayYesText to embed (string or array of strings)

Example

curl https://api.hanzo.ai/v1/embeddings \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zen3-embedding",
    "input": "Zen LM is a family of frontier AI models"
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.hanzo.ai/v1", api_key="hk-your-key")

response = client.embeddings.create(
    model="zen3-embedding",
    input=["Hello world", "Zen LM models"],
)

for embedding in response.data:
    print(f"Vector dim: {len(embedding.embedding)}")

Response

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0023, -0.0091, 0.0152, "..."]
    }
  ],
  "model": "zen3-embedding",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}

Specifications

PropertyValue
Modelzen3-embedding
Upstreamtext-embedding-3-large by OpenAI
Dimensions3,072
Max Input8,191 tokens
Tierpro max
Pricing$0.39 / 1M tokens

Use Cases

  • Semantic search: Find similar documents by meaning
  • RAG: Retrieval-augmented generation pipelines
  • Clustering: Group similar texts together
  • Classification: Use embeddings as features for classifiers
  • Deduplication: Identify near-duplicate content at scale

On this page