GLM

glm/glm-5.2

- context · $0.8400 / M input tokens · $2.6400 / M output tokens

GLM 5.2 is a GLM model route on OurToken for developers evaluating hosted API access, coding workflows, long-context tasks, pricing, and production assistant workloads.

Pricing

Pay-per-use

No upfront costs, pay only for what you use

60% of official price
Input$1.40 / M$0.8400 / M Tokens
Output$4.40 / M$2.6400 / M Tokens

API Usage

API Access Guide

Base URLhttps://api.ourtoken.ai/v1
API Endpointchat/completions
Full URLhttps://api.ourtoken.ai/v1/chat/completions
Model IDglm-5.2
Get API Key

Code examples

Use the OurToken API endpoint for this model. The examples below use direct HTTP requests and the recommended endpoint for the model family.

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 Reference

Create a chat response with the OpenAI Chat Completions-compatible endpoint. Use https://api.ourtoken.ai/v1 as the SDK Base URL and POST /chat/completions as the endpoint.

Authorization

Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

Request Body

FieldTypeRequiredDescription
modelstringRequiredModel ID to call.
messagesarray<object>RequiredConversation messages sent to the model.
max_tokensintegerOptionalMaximum number of output tokens.
temperaturenumberOptionalSampling temperature.
top_pnumberOptionalNucleus sampling parameter.
streambooleanOptionalWhether to return a streaming response.
stream_optionsobjectOptionalAdditional options for streaming responses.
toolsarray<object>OptionalTools available to the model.
tool_choicestring | objectOptionalControls how the model selects tools.
response_formatobjectOptionalControls structured output, such as JSON object responses.

Response Body

FieldTypeRequiredDescription
idstringRequiredUnique chat completion identifier.
object"chat.completion"RequiredObject type returned by the Chat Completions API.
createdintegerRequiredUnix timestamp when the response was created.
modelstringRequiredModel that produced the response.
choicesarray<object>RequiredCandidate responses returned by the model.
choices[].message.rolestringRequiredRole of the returned chat message.
choices[].message.contentstringOptionalText content in the returned chat message.
choices[].finish_reasonstringOptionalReason generation stopped.
usageobjectOptionalToken usage information for the chat completion.
usage.prompt_tokensintegerOptionalInput token count.
usage.completion_tokensintegerOptionalOutput token count.
usage.total_tokensintegerOptionalTotal token count.
usage.prompt_tokens_detailsobjectOptionalBreakdown of input token usage.
usage.prompt_tokens_details.cached_tokensintegerOptionalTokens served from cache.

Model Introduction

GLM glm-5.2

GLM 5.2 is a GLM model route on OurToken for developers evaluating hosted API access, coding workflows, long-context tasks, pricing, and production assistant workloads.

GLM 5.2 builds on the GLM 5.1 line with a focus on coding capability, long-horizon work, and 1M-context evaluation according to supplied launch material. Use glm 5.2 api through OurToken when you want one endpoint for model testing, pricing review, API keys, usage logs, and production integration.

Why It Looks Great

  • 60% of the official GLM 5.2 reference price for input, output, and cache read tokens.
  • OpenAI-compatible API setup through the same OurToken endpoint used by other supported models.
  • Useful for evaluating GLM coding, agent workflows, long-context sessions, and OpenCode-style development tasks.
  • Supplied launch material mentions 1M-context support and GLM Coding Plan availability, while independent benchmark coverage should be reviewed separately.
  • Dashboard logs and usage visibility help teams compare request cost after launch.

Key Features

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

Specifications

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 Features for Developers

Use glm 5.2 api for unified GLM access, glm 5.2 pricing visibility, coding evaluation, long-context planning, and production workflow testing.

Unified Access

Call glm 5.2 api through the OurToken unified endpoint instead of wiring a separate GLM provider integration. Developers can create one API key, use glm-5.2 as the model ID, and keep OpenAI-compatible request patterns across testing and production.

Pricing Visibility

Review glm 5.2 pricing before routing traffic. OurToken lists $0.8400 input, $2.6400 output, and $0.1560 cache read per 1M tokens, with cache write listed at $0 for teams estimating prompt and agent workload costs.

Coding Workflows

Evaluate GLM 5.2 model behavior on repository tasks, coding agents, tool-use loops, and planning-heavy development prompts. Supplied launch material positions the model for long-horizon coding, but teams should confirm quality with their own acceptance tests.

Benchmark Context

Use glm 5.2 benchmark searches as discovery signals, not final procurement proof. User-supplied notes include Pac-Man and coding-plan evaluations, while launch coverage says independent benchmark results may still need third-party verification.

OpenCode Testing

Test opencode glm 5.2 workflows by sending realistic multi-step coding prompts through OurToken and reviewing tool behavior, latency, token usage, and output quality. Keep prompts, model ID, and budget assumptions consistent across comparison runs.

Provider Comparison

Compare hosted OurToken access with searches such as glm 5.2 openrouter when evaluating provider choice. OurToken focuses on API keys, usage logs, pricing visibility, and a unified endpoint rather than separate provider-specific setup.

How to Use glm 5.2 api on OurToken

Create an API key, copy glm-5.2, compare glm 5.2 pricing, call the unified endpoint, and test coding workflows.

Create API Key

Create an OurToken API key from the dashboard and store it in a secure server-side environment variable. This gives your backend access to glm 5.2 api without exposing credentials in browser code, notebooks, or public repositories.

01

Copy Model ID

Use glm-5.2 as the model value in your request body. Keeping the exact GLM 5.2 model ID in configuration helps developers avoid naming mistakes when comparing local tests, staging traffic, and production routes.

02

Call Endpoint

Send chat completion requests to the OurToken unified API endpoint with your API key, model ID, and prompt payload. Existing OpenAI-compatible request patterns can usually be reused after changing the base URL, credential, and model value.

03

Compare Pricing

Compare glm 5.2 pricing before scaling traffic: OurToken lists $0.8400 input, $2.6400 output, and $0.1560 cache read per 1M tokens. Cache write is listed at $0, so separate cached prompts from normal input and output.

04

Test Coding

Run your own glm 5.2 coding plan with repository tasks, one-shot application builds, OpenCode-style agent sessions, and regression prompts. Public anecdotes can inspire test cases, but production routing should depend on your latency, quality, and cost data.

05

Monitor Usage

After launch, review request counts, input tokens, output tokens, cache read tokens, and spend in history logs. This helps teams compare glm 5.2 model performance against actual traffic rather than relying only on benchmark posts or provider listings.

06

glm 5.2 api FAQ

Answers about glm 5.2 api access, glm-5.2 model ID, pricing, benchmark interpretation, OpenCode testing, and OpenRouter comparisons.

01

What is glm 5.2 api?

glm 5.2 api is the GLM 5.2 model route available through OurToken for developers who want hosted access to GLM coding, chat, long-context, and agent-style workflows. Use the glm-5.2 model ID with an OurToken API key and call it through the unified API flow used by other supported models.
02

What is glm 5.2 pricing on OurToken?

glm 5.2 pricing on OurToken is $0.8400 per 1M input tokens and $2.6400 per 1M output tokens. The catalog also lists cache read at $0.1560 per 1M tokens and cache write at $0, with official references of $1.40 input, $4.40 output, and $0.26 cache read.
03

Which model ID should I use for GLM 5.2?

Use glm-5.2 as the exact model value in API requests. Keeping the model ID unchanged across development, staging, and production avoids route mismatches when teams compare GLM 5.2 model behavior, pricing, latency, and coding quality against other providers.
04

Is there an official glm 5.2 benchmark?

User-supplied launch coverage says independent benchmark results were not published at launch, while community tests include one-shot Pac-Man and coding workflow experiments. Treat glm 5.2 benchmark material as useful evaluation input, then run your own tasks before choosing a production default.
05

Can I test opencode glm 5.2 workflows through OurToken?

Yes. You can test opencode glm 5.2 workflows by calling glm-5.2 through OurToken with realistic repository prompts, tool-use tasks, and coding-plan sessions. Compare output quality, latency, token usage, and failure modes against your own acceptance criteria instead of relying only on public anecdotes.
06

How does glm 5.2 openrouter comparison relate to OurToken?

glm 5.2 openrouter searches usually reflect provider comparison intent. OurToken is a hosted API route with model IDs, pricing visibility, usage logs, and a unified endpoint. Compare providers by availability, latency, price, logging needs, and integration effort before migrating production workloads.