LLM
無料で試せる GLM-5.3 API
クレジットカード不要 · 無料クレジットの有効期限は30日 · その後は残高をチャージして従量課金、サブスクなし
model: "glm-5.3"
reasoning_effort: "high"
system: You are an on-call SRE. Name the root cause in at most two sentences, then give a one-line fix. Plain text, no Markdown.
Logins return 500 since 09:12. What is the root cause?
09:12:01 INFO api GET /reports/418 200 41ms
09:12:07 WARN redis OOM command not allowed when used memory > 'maxmemory'
09:12:07 ERROR api POST /login 500 SessionStoreError: could not save session
09:12:08 ERROR api POST /login 500 SessionStoreError: could not save session
09:12:09 INFO api GET /health 200 2ms
Root cause: Redis hit its maxmemory limit at 09:12:07 and started rejecting writes (OOM command not allowed), so the login endpoint can no longer save sessions, causing 500 errors.
Fix: Free up or raise Redis memory (e.g., flush stale keys / increase maxmemory or set an eviction policy like allkeys-lru), then restart or re-enable writes.
GLM-5.3 のユースケース
GLM-5.3 APIの料金
| トークン | 100万トークンあたり | $5 で使える量 |
|---|---|---|
| 入力(テキスト) | $1.54 | 約 3.2M トークン |
| キャッシュ済み入力(繰り返されるプロンプトの先頭部分) | $0.308 | 約 16M トークン |
| 出力(回答と推論) | $4.84 | 約 1.0M トークン |
| 冒頭のログの質問、1回の呼び出し | $0.00064 | 約 7,700 回 |
| ログ行を JSON に(Python の例)、1回の呼び出し | $0.00025 | 約 19,000 回 |
GLM-5.3 と GLM-5.3 Flash、Kimi K3 の比較
| GLM-5.3 | GLM-5.3 Flash | Kimi K3 | |
|---|---|---|---|
| 入力 | テキスト | テキスト、画像 | テキスト、画像 |
| コンテキスト | 1,000,000 トークン | 1,048,576 トークン | 1,000,000 トークン |
| 最大出力 | 131,072 トークン | 131,072 トークン | 131,072 トークン |
reasoning_effort |
low、high、max | none から max まで7つの値。none でも推論する | none から max まで7段階 |
response_format |
json_object |
json_schema、json_object |
json_schema、json_object |
| 100万トークンあたりの料金、入力 / 出力 | $1.54 / $4.84 | $0.165 / $0.55 | $3.30 / $16.50 |
GLM-5.3 API のサンプルコード
- モデル ID
- エンドポイント
- 入力
- コンテキストと出力
- 推論
- 出力オプション
curl https://oai.deapi.ai/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "glm-5.3",
"reasoning_effort": "low",
"messages": [
{"role": "system", "content": "Sort support tickets. Reply with one word: billing, bug, feature or other."},
{"role": "user", "content": "I was charged twice for the November top-up."}
]
}'
import json
from openai import OpenAI
client = OpenAI(base_url="https://oai.deapi.ai/v1", api_key="YOUR_API_KEY")
log_line = "09:12:07 ERROR api POST /login 500 SessionStoreError: could not save session"
response = client.chat.completions.create(
model="glm-5.3",
reasoning_effort="low",
messages=[
{"role": "system", "content": "Read the log line. Reply with a JSON object "
"with exactly these keys: service (string), level (string), "
"status (number), error (string)."},
{"role": "user", "content": log_line},
],
response_format={"type": "json_object"},
)
entry = json.loads(response.choices[0].message.content)
print(entry["service"], entry["level"], entry["status"]) # api ERROR 500
print(entry["error"]) # SessionStoreError: could not save session
print(response.usage)
GLM-5.3とは?
-
無料アカウントを作成
-
クライアントの接続先を deAPI に変更
-
リクエストを送信