言語 / MODEL API
GLM-5.2
入力 $1 · 出力 $3 / 100万トークン
OVERVIEW
モデル概要
GLM-5.2 marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a solid 1M-token context. GLM-5.2's new capabilities include: Solid 1M Context: A solid 1M-token context that stably sustains long-horizon work Advanced Coding with Flexible Effort: Stronger coding capabilities with multiple thinking effort levels to balance performance and latency Improved Architecture: We propose IndexShare, which reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length. We also improve GLM-5.2’s MTP layer for speculative decoding, increasing the acceptance length by up to 20% Pure Open: An MIT open-source license — no regional limits, technical access without borders
モデル仕様
- カテゴリー
- 言語
- 入力モダリティ
- text
- 出力モダリティ
- text
MODEL PRICING
モデルAPI料金
言語
100万トークンあたりの米ドル料金| モデル | 入力 | 出力 | キャッシュ読み取り |
|---|---|---|---|
| $1 | $3 | $0.2 |
公開料金は5分間隔で更新されます。「—」は料金が提供されていないことを示し、無料を意味しません。実際の請求額はコンソールでご確認ください。
BUILT FOR YOUR STACK
API呼び出しサンプル
まず接続設定を開き、準備コマンドを実行してください。その後、PythonまたはcURLのサンプルを保存して実行できます。
接続設定と準備コマンドAPIアドレス、モデルID、環境変数
- APIアドレス
https://api.evermo.com/v1- APIモデルID
GLM-5.2
YOUR_API_KEYをコンソールで発行した推論APIキー全体に置き換えてください。準備コマンドはmacOS/Linuxまたは互換シェルで実行します。cURLのJSONサンプルでは、Python標準ライブラリを使ってリクエスト本文を生成します。
python -m pip install openai
export EVERMO_API_BASE_URL='https://api.evermo.com/v1'
export EVERMO_MODEL_ID='GLM-5.2'
export EVERMO_API_KEY="YOUR_API_KEY"EVERMO_API_KEYは環境変数名です。値にはコンソールで発行した推論APIキーを設定してください。OpenAIが発行したAPIキーは使用しません。 APIキーを発行
import osfrom openai import OpenAIMODEL_ID = os.environ["EVERMO_MODEL_ID"]client = OpenAI( base_url=os.environ["EVERMO_API_BASE_URL"], api_key=os.environ["EVERMO_API_KEY"],)response = client.chat.completions.create( model=MODEL_ID, messages=[{"role": "user", "content": "Hello!"}], max_tokens=256,)print(response.choices[0].message.content)