Back to Models

GLM 5.2 APIActive

glm-5.2

No description available

By:GLMInput Type:Output Type:

AI Code With channel availability

The same model is billed by channel discount. Copy a channel code to set your preference.

ChannelCache Hit RateContext
GLM官方渠道25% off
73.0%¥6/ M tokens¥21/ M tokensRead:¥1.5/ M tokensWrite:¥0/ M tokens200K0.0s

Related Models

More models from GLM

Compare models from other providers

GLM 5.2 API: price, model ID, and how to call it

Call GLM 5.2 through AI Code With. Use model ID glm-5.2 with 200K context. list price about ¥8.00 / ¥28.00 per 1M tokens before channel discounts. About ¥0.8100 for 100,000 input / 10,000 output tokens at the cheapest live channel.

Model IDglm-5.2
ProtocolsOpenAI Chat Completions
Context200K
Max output65.54K

Next: Get API key · See integration guides · All model prices · All model prices

Cost calculator

Estimate at the cheapest live channel: ¥6.00 / ¥21.00 per 1M tokens, cache read ¥1.50, cache write ¥0.0000. Billed usage follows your prepaid balance.

Estimated cost¥0.8100

cURL example

Set model to glm-5.2. The page slug is only the URL, not the API parameter.

curl https://api.aicodewith.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AICODEWITH_API_KEY" \
  -d '{
    "model": "glm-5.2",
    "messages": [
      { "role": "user", "content": "What is the meaning of life?" }
    ]
  }'

FAQ

What is the GLM 5.2 model ID?

Send model "glm-5.2" in the API request. The page path /glm-5.2 is only the URL, not the model parameter.

How do I call the GLM 5.2 API?

Use one AI Code With API key against https://api.aicodewith.ai/v1/chat/completions, and set model to glm-5.2. Supported protocols: OpenAI Chat Completions. See See integration guides.

How is GLM 5.2 priced?

GLM 5.2 is list price about ¥8.00 / ¥28.00 per 1M tokens before channel discounts. The public page shows available channel discounts; billed usage follows your prepaid balance and the live channel. About ¥0.8100 for 100,000 input / 10,000 output tokens at the cheapest live channel.

How long is the GLM 5.2 context window?

GLM 5.2 has about 200K input context and up to 65.54K output tokens. Treat that as capacity, not a reason to fill every request.