Zhipu GLM

Glm 4.6 API

CN Zhipu GLM
Coba di Playground → Dapatkan Kunci API

Glm 4.6 adalah model serbaguna dari Zhipu GLM. Tersedia melalui API terpadu MeshTok.

PenalaranAlatJSON

Harga (daftar resmi, per 1M token)

Input
$0.29/M
Output
$1.14/M

Spesifikasi

Jendela konteks200K token Modalitas inputTeks StreamingYa APIKompatibel dengan OpenAI

Cara menggunakan Glm 4.6

Pengganti langsung OpenAI. Ubah hanya base_url dan 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/glm-4.6",
    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/glm-4.6","messages":[{"role":"user","content":"Hello!"}]}'

Model terkait

Model lain yang mungkin Anda pertimbangkan.