← Models / Zhipu AI

GLM-5-Code

Coding-specialized variant of GLM-5.

Data updated 2026-03-30
coding OpenAI-compatible Function calling Released 2026-02

Pricing

Type USD / 1M tokens
Input $1.2
Output $5
Cached Input $0.3

vs Western Models

GLM-5-Code vs GPT-5.2 ($1.75/$14)
31% cheaper input 64% cheaper output
GLM-5-Code vs Claude Sonnet 4.6 ($3/$15)
60% cheaper input 67% cheaper output
GLM-5-Code vs Gemini 2.5 Pro ($1.25/$10)
4% cheaper input 50% cheaper output

IDE Setup

Cursor

base_url: https://open.bigmodel.cn/api/paas/v4
model: glm-5-code

Cline

base_url: https://open.bigmodel.cn/api/paas/v4
model: glm-5-code

Strengths

  • + coding-optimized
  • + agentic coding

Watch Out For

  • ! content censorship
  • ! premium pricing

International Access

Direct access: Yes
Latency from US: 200-400ms
Registration: account
Payment: credit card

Frequently Asked Questions

How much does GLM-5-Code cost?

GLM-5-Code costs $1.2 per million input tokens and $5 per million output tokens (USD). Cached input is $0.3/M.

Can I use GLM-5-Code from outside China?

Yes. GLM-5-Code is directly accessible internationally. Registration requires account. Payment via credit card.

Is GLM-5-Code compatible with the OpenAI API?

Yes. GLM-5-Code uses an OpenAI-compatible API. You can use any OpenAI SDK by changing the base URL to open.bigmodel.cn.

How do I use GLM-5-Code in Cursor or Cline?

Set the base URL to https://open.bigmodel.cn/api/paas/v4 and the model name to glm-5-code. Both Cursor and Cline support OpenAI-compatible providers.

Related Articles & Guides

More from Zhipu AI

Ready to try GLM-5-Code?

Get your API key from the official platform.

Go to Zhipu AI →