# Zen Embedding — Use via Hanzo AI API

> Dense text embeddings for semantic search, retrieval, and clustering. Call via Hanzo's OpenAI-compatible API. Context: 33K.

[Models](https://hanzo.ai/models)/[Hanzo](https://hanzo.ai/models/hanzo)/zen-embedding

Hanzo · starter

# Zen Embedding

Dense text embeddings for semantic search, retrieval, and clustering.

[Get API key](https://platform.hanzo.ai/api-keys)[Try in Chat](https://hanzo.ai/chat)

[GitHub ↗](https://github.com/zenlm/zen-embedding)[Benchmarks](https://hanzo.ai/benchmarks#zen)

POST /v1/chat/completionsexample

{ "model": "zen-embedding",
"messages": [{ "role": "user", "content": "Who are you?" }] }

Zen EmbeddingDense text embeddings for semantic search, retrieval, and clustering.

33Kembeddings

## Specifications

Context Window33K

Modalitiesembeddings

Price…

Model IDzen-embedding

8K context · Embeddings

## Quick start

[Get an API key →](https://platform.hanzo.ai/api-keys)

TypeScript

Python

cURL

Go

TypeScript

```
import OpenAI from 'openai' const client = new OpenAI({ apiKey: process.env.HANZO_API_KEY, baseURL: 'https://api.hanzo.ai/v1' }) const response = await client.chat.completions.create({ model: 'zen-embedding', messages: [{ role: 'user', content: 'Hello!' }] }) console.log(response.choices[0].message.content)
```

Python

```
from openai import OpenAI client = OpenAI( api_key=os.environ["HANZO_API_KEY"], base_url="https://api.hanzo.ai/v1" ) response = client.chat.completions.create( model="zen-embedding", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content)
```

cURL

```
curl https://api.hanzo.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $HANZO_API_KEY" \ -d '{ "model": "zen-embedding", "messages": [{"role": "user", "content": "Hello!"}] }'
```

Go

```
package main import ( "context" "fmt" "os" "github.com/sashabaranov/go-openai" ) func main() { cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY")) cfg.BaseURL = "https://api.hanzo.ai/v1" client := openai.NewClientWithConfig(cfg) resp, _ := client.CreateChatCompletion(context.Background(), openai.ChatCompletionRequest{ Model: "zen-embedding", Messages: []openai.ChatCompletionMessage{ {Role: openai.ChatMessageRoleUser, Content: "Hello!"}, }, }, ) fmt.Println(resp.Choices[0].Message.Content) }
```

…

## More from Hanzo

[zen-embedding-333K](https://hanzo.ai/models/hanzo/zen-embedding-3)

[zen-free1M](https://hanzo.ai/models/hanzo/zen-free)

[Zen Guard — Content Safety128KSafety classifier for moderation and guardrails across a broad category and language set.](https://hanzo.ai/models/hanzo/zen-guard)

[zen-scribeHanzo's speech-to-text model, which writes down what is said in any language, served at /v1/audio/transcriptions.](https://hanzo.ai/models/hanzo/zen-scribe)

[Zen VL — Vision-Language1MReads images and reasons over them — visual Q&A, document and chart understanding, grounded captioning.](https://hanzo.ai/models/hanzo/zen-vl)

[zen-voice-miniHanzo's text-to-speech voice, served at /v1/audio/speech.](https://hanzo.ai/models/hanzo/zen-voice-mini)

[View all Hanzo models →](https://hanzo.ai/models/hanzo)

## Use Zen Embedding via Hanzo AI

One API key. Every major model. OpenAI-compatible. Start free.

[Get an API key](https://platform.hanzo.ai/api-keys)[Browse All Models](https://hanzo.ai/models)
