Zhipu GLM Series Text Models

Copy success!
Add to Compare

Overview

GLM-5.3 is Zhipu AI’s most powerful model for programming capabilities to date, demonstrating a 50% improvement over GLM-5.2 in internal subjective evaluations. In terms of cybersecurity, GLM-5.3 performs on par with Mythos 5 in tasks such as white-box code review and vulnerability discovery, showcasing its strong potential for cybersecurity defense scenarios.

Input

Text

Output

Text

Features

Prefix Completion

Enable Partial Mode when calling the Qwen API to make the model continue strictly from your provided prefix text.View docs

Function Calling

Use function calling to connect large language models with external tools and systems.View docs

Cache

Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docs

Structured Outputs

Structured Outputs help ensure the model returns a JSON string in the expected format.View docs

Batches

Asynchronously process requests in batches to reduce costs.View docs

Web Search

Enable web search so the model can answer with real-time retrieved data.View docs

Fine-tuning

Train models on sample data to better adapt them to specific tasks.View docs

Pricing

  • Input
    $1.4Per 1M tokens
  • Output
    $4.4Per 1M tokens
  • Input(Implicit Cache)
    $0.26Per 1M tokens

Rate Limits & Context

  • Max Input
    1M
  • Max Output
    131K
  • Max Input (Thinking)
    1M
  • Max Output (Thinking)
    131K
  • Context
    1M
  • Max Reasoning
    131K
  • TPMTokens Per Minute
    3M
  • RPMRequests Per Minute
    200

API Reference

Call API
Copy success!
123456789101112131415161718192021222324
from openai import OpenAI
import os

client = OpenAI(
    # If the environment variable is not set, replace it with your Model Studio API key: api_key="sk-xxx"
    api_key="sk-xxx",  
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)

completion = client.chat.completions.create(
    model="ZHIPU/GLM-5.3",
    messages=[{"role": "user", "content": "Who are you?"}],
    extra_body={"enable_thinking": True, "reasoning_effort": "max"},
    stream=True,
)

for chunk in completion:
    if not chunk.choices:
        continue
    delta = chunk.choices[0].delta
    if hasattr(delta, "reasoning_content") and delta.reasoning_content:
        print(delta.reasoning_content, end="", flush=True)
    if hasattr(delta, "content") and delta.content:
        print(delta.content, end="", flush=True)