GLM

glm/glm-5.2

- コンテキスト · $0.8400 / M 入力トークン · $2.6400 / M 出力トークン

GLM 5.2 は、hosted API access、coding workflows、長文コンテキストタスク、pricing、production assistant ワークロードを評価する開発者向けの OurToken 上の GLM モデルルートです。

価格

従量課金

初期費用なし。使った分だけお支払いください

60% of official price
入力$1.40 / M$0.8400 / M トークン
出力$4.40 / M$2.6400 / M トークン

API使用方法

APIアクセスガイド

Base URLhttps://api.ourtoken.ai/v1
API Endpointchat/completions
完全なURLhttps://api.ourtoken.ai/v1/chat/completions
Model IDglm-5.2
APIキーを取得

コード例

このモデルにはOurToken APIエンドポイントを使用します。以下の例では、直接HTTPリクエストとモデルファミリーに推奨されるエンドポイントを使用しています。

curl https://api.ourtoken.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "glm-5.2",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ],
    "max_tokens": 256
  }'

Chat Completions APIリファレンス

OpenAI Chat Completions互換エンドポイントでチャットレスポンスを作成します。SDK Base URLにはhttps://api.ourtoken.ai/v1を、エンドポイントにはPOST /chat/completionsを使用します。

Authorization

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

リクエスト本文

フィールド必須説明
modelstring必須呼び出すモデルID。
messagesarray<object>必須モデルに送信される会話メッセージ。
max_tokensinteger任意最大出力トークン数。
temperaturenumber任意サンプリング温度。
top_pnumber任意Nucleusサンプリングパラメータ。
streamboolean任意ストリーミングレスポンスを返すかどうか。
stream_optionsobject任意ストリーミングレスポンスの追加オプション。
toolsarray<object>任意モデルが使用できるツール。
tool_choicestring | object任意モデルがツールを選択する方法を制御します。
response_formatobject任意JSONオブジェクトレスポンスなどの構造化出力を制御します。

レスポンス本文

フィールド必須説明
idstring必須一意のチャット補完識別子。
object"chat.completion"必須Chat Completions APIによって返されるオブジェクトタイプ。
createdinteger必須レスポンスが作成されたUnixタイムスタンプ。
modelstring必須レスポンスを生成したモデル。
choicesarray<object>必須モデルによって返される候補レスポンス。
choices[].message.rolestring必須返されたチャットメッセージのロール。
choices[].message.contentstring任意返されたチャットメッセージ内のテキスト内容。
choices[].finish_reasonstring任意生成が停止した理由。
usageobject任意チャット補完のトークン使用量情報。
usage.prompt_tokensinteger任意入力トークン数。
usage.completion_tokensinteger任意出力トークン数。
usage.total_tokensinteger任意合計トークン数。
usage.prompt_tokens_detailsobject任意入力トークン使用量の内訳。
usage.prompt_tokens_details.cached_tokensinteger任意キャッシュから提供されたトークン。

モデル紹介

GLM glm-5.2

GLM 5.2 は、hosted API access、coding workflows、長文コンテキストタスク、pricing、production assistant ワークロードを評価する開発者向けの OurToken 上の GLM モデルルートです。

提供されたリリース資料によると、GLM 5.2 は GLM 5.1 系を継承し、coding 能力、長期タスク、1M-context の評価を重視しています。 model testing、pricing review、API keys、usage logs、production integration を1つの endpoint でまとめたい場合は、OurToken 経由で glm 5.2 api を使えます。

優れて見える理由

  • input、output、cache read tokens について official GLM 5.2 reference price の 60%。
  • 他の supported models と同じ OurToken endpoint から OpenAI-compatible API setup ができます。
  • GLM coding、agent workflows、long-context sessions、OpenCode-style development tasks の評価に向いています。
  • 提供された launch material では 1M-context support と GLM Coding Plan availability が示されており、independent benchmark は別途確認が必要です。
  • Dashboard logs と usage visibility により、launch 後の request cost 比較がしやすくなります。

主な機能

  • Model ID: glm-5.2
  • Input price: OurToken で $0.8400 / 1M tokens
  • Output price: OurToken で $2.6400 / 1M tokens
  • Cache read price: OurToken で $0.1560 / 1M tokens
  • Cache write price: OurToken で $0 / 1M tokens
  • Provider: GLM

仕様

ProviderGLM
Model TypeLarge Language Model (LLM)
Model IDglm-5.2
OurToken Input Price$0.8400 / 1M tokens
OurToken Output Price$2.6400 / 1M tokens
OurToken Cache Read Price$0.1560 / 1M tokens
OurToken Cache Write Price$0 / 1M tokens
Official Input Reference$1.40 / 1M tokens
Official Output Reference$4.40 / 1M tokens
Official Cache Read Reference$0.26 / 1M tokens

開発者向けの glm 5.2 api 機能

glm 5.2 api を使って、統一された GLM アクセス、glm 5.2 pricing の可視化、coding 評価、長文コンテキスト計画、production workflow テストを行えます。

Unified Access

別個の GLM provider integration を作る代わりに、OurToken unified endpoint から glm 5.2 api を呼び出せます。開発者は 1 つの API key を作成し、glm-5.2 を model ID として使い、testing と production で OpenAI-compatible request patterns を維持できます。

Pricing Visibility

traffic を流す前に glm 5.2 pricing を確認してください。OurToken では 100万 tokens あたり input $0.8400、output $2.6400、cache read $0.1560 が示され、cache write は $0 です。prompt や agent workload cost の見積もりに役立ちます。

Coding Workflows

repository tasks、coding agents、tool-use loops、planning-heavy development prompts に対する GLM 5.2 model の挙動を評価してください。launch material は long-horizon coding を想定していますが、quality は自分の acceptance tests で確認する必要があります。

Benchmark Context

glm 5.2 benchmark 検索は discovery signal として使い、最終判断の証拠とはしないでください。提供された notes には Pac-Man と coding-plan の評価が含まれ、launch coverage では独立 benchmark の third-party verification が必要とされています。

OpenCode Testing

OurToken 経由で realistic multi-step coding prompts を送り、opencode glm 5.2 workflows をテストし、tool behavior、latency、token usage、output quality を確認してください。comparison runs では prompts、model ID、budget assumptions を揃えてください。

Provider Comparison

provider 選定では、hosted な OurToken access を glm 5.2 openrouter のような検索意図と比較してください。OurToken は API keys、usage logs、pricing visibility、unified endpoint に重点を置いており、個別 provider の設定には寄っていません。

OurToken で glm 5.2 api を使う方法

API key を作成し、glm-5.2 をコピーし、glm 5.2 pricing を比較し、unified endpoint を呼び出して coding workflows を試してください。

Create API Key

Dashboard で OurToken API key を作成し、安全な server-side environment variable に保存します。これで backend は browser code、notebooks、public repositories に credentials を露出せずに glm 5.2 api を利用できます。

01

Copy Model ID

request body の model 値として glm-5.2 を使ってください。正確な GLM 5.2 model ID を configuration に保持すると、local tests、staging traffic、production routes を比較する際の naming mistake を防ぎやすくなります。

02

Call Endpoint

API key、model ID、prompt payload を付けて OurToken unified API endpoint に chat completions requests を送信します。base URL、credential、model value を変えれば、既存の OpenAI-compatible request patterns を再利用できることが多いです。

03

Compare Pricing

traffic を増やす前に glm 5.2 pricing を比較してください。OurToken では input $0.8400、output $2.6400、cache read $0.1560 / 1M tokens です。cache write は $0 なので、cached prompts と通常の input / output を分けて考えます。

04

Test Coding

repository tasks、one-shot application builds、OpenCode-style agent sessions、regression prompts を使って、自分の glm 5.2 coding plan を実行してください。public anecdotes は test cases の参考にはなりますが、production routing は latency、quality、cost data に基づくべきです。

05

Monitor Usage

launch 後は history logs で request counts、input tokens、output tokens、cache read tokens、spend を確認します。これにより、benchmark posts や provider listings ではなく、actual traffic に基づいて GLM 5.2 model performance を比較できます。

06

glm 5.2 api FAQ

glm 5.2 api access、glm-5.2 model ID、pricing、benchmark interpretation、OpenCode testing、OpenRouter comparison に関する回答です。

01

glm 5.2 api とは何ですか?

glm 5.2 api は、GLM coding、chat、long-context、agent-style workflows に hosted access したい開発者向けの GLM 5.2 model route です。OurToken API key と glm-5.2 model ID を使い、unified API flow から呼び出せます。
02

OurToken の glm 5.2 pricing はいくらですか?

OurToken の glm 5.2 pricing は input $0.8400 / 1M tokens、output $2.6400 / 1M tokens です。catalog では cache read が $0.1560 / 1M tokens、cache write が $0 とされ、official references は input $1.40、output $4.40、cache read $0.26 です。
03

GLM 5.2 ではどの model ID を使うべきですか?

API requests では正確な model 値として glm-5.2 を使ってください。development、staging、production で同じ model ID を維持すると、teams が GLM 5.2 model behavior、pricing、latency、coding quality を比較する際の route mismatch を避けやすくなります。
04

公式の glm 5.2 benchmark はありますか?

提供された launch coverage では、launch 時点で independent benchmark results は公開されていないとされています。一方で community tests には one-shot Pac-Man と coding workflow experiments が含まれます。glm 5.2 benchmark material は評価入力として使い、production default の前に自分の tasks を実行してください。
05

OurToken で opencode glm 5.2 workflows をテストできますか?

はい。realistic repository prompts、tool-use tasks、coding-plan sessions を使って glm-5.2 を OurToken から呼び出し、opencode glm 5.2 workflows をテストできます。output quality、latency、token usage、failure modes を自分の acceptance criteria と比較してください。
06

glm 5.2 openrouter の比較は OurToken とどう関係しますか?

glm 5.2 openrouter の検索は通常、provider 比較の意図を示します。OurToken は model IDs、pricing visibility、usage logs、unified endpoint を持つ hosted API route です。production workloads を移す前に、availability、latency、price、logging needs、integration effort を比較してください。