Zhipu GLM

GLM Embedding 3 API

CN Zhipu GLM | released 2024-06
View embedding docs → Get API key

GLM Embedding 3 is Zhipu AI embedding model, producing 2048-dimensional vectors tuned for Chinese-English bilingual retrieval. It is widely used in Chinese RAG pipelines and matches frontier English embedding models on C-MTEB at a fraction of the cost.

Embedding

Pricing (official list, per 1M tokens)

Input
$0.05/M
Output
$0.00/M

Specifications

Context window8.192K tokens Input modalitiesText StreamingYes APIOpenAI-compatible

How to use GLM Embedding 3

Drop-in OpenAI replacement. Change only the base_url and model.

# Python -pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://meshtok.com/v1",
    api_key="sk-your-MeshTok-key",
)

resp = client.chat.completions.create(
    model="bigmodel/embedding-3",
    messages=[{"role":"user","content":"Hello!"}],
)
print(resp.choices[0].message.content)
# cURL
curl https://meshtok.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-MeshTok-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"bigmodel/embedding-3","messages":[{"role":"user","content":"Hello!"}]}'

Related models

Other models you might consider.