DeepInfra raises $107M Series B to scale the inference cloud — read the announcement

GLM Model Family

GLM is Z.ai's family of open-weight large language models, built for coding, agentic tool use, and long-context reasoning. The lineup ranges from the flagship GLM-5.3 to the faster, lower-cost GLM-5.3-Flash, all served on DeepInfra through an OpenAI-compatible API with pay-per-token pricing.

Featured Model: zai-org/GLM-5.3

GLM-5.3 is a large-scale reasoning model from Z.ai, built for complex software engineering and long-horizon agent tasks. It supports text input and output with a 1M-token context window, and improves on GLM-5.2 in coding and in the balance between performance and token efficiency.

Price per 1M input tokens

$0.5625

$0.90

38% off

Price per 1M cached input tokens

$0.125

$0.20


Price per 1M output tokens

$2.50

$4.00


Release Date

08/28/2026


Context Size

1,048,576


Quantization

fp4


# Assume openai>=1.0.0
import os

from openai import OpenAI

# Create an OpenAI client with your deepinfra token and endpoint
openai = OpenAI(
    api_key=os.environ["DEEPINFRA_API_KEY"],
    base_url="https://api.deepinfra.com/v1/openai",
)

chat_completion = openai.chat.completions.create(
    model="zai-org/GLM-5.3",
    messages=[{"role": "user", "content": "Hello"}],
)

print(chat_completion.choices[0].message.content)
print(chat_completion.usage.prompt_tokens, chat_completion.usage.completion_tokens)

# Hello! It's nice to meet you. Is there something I can help you with, or would you like to chat?
# 11 25
copy

Featured Model: zai-org/GLM-5.3-Flash

GLM-5.3-Flash is a native multimodal model from Z.ai. It is suited for efficient coding and long-horizon agent tasks. Its hybrid sparse and linear attention architecture maintains accurate long-context behavior while reducing compute overhead.

Price per 1M input tokens

$0.15


Price per 1M cached input tokens

$0.03


Price per 1M output tokens

$0.50


Release Date

09/2/2026


Context Size

1,048,576


Quantization

fp4


# Assume openai>=1.0.0
import os

from openai import OpenAI

# Create an OpenAI client with your deepinfra token and endpoint
openai = OpenAI(
    api_key=os.environ["DEEPINFRA_API_KEY"],
    base_url="https://api.deepinfra.com/v1/openai",
)

chat_completion = openai.chat.completions.create(
    model="zai-org/GLM-5.3-Flash",
    messages=[{"role": "user", "content": "Hello"}],
)

print(chat_completion.choices[0].message.content)
print(chat_completion.usage.prompt_tokens, chat_completion.usage.completion_tokens)

# Hello! It's nice to meet you. Is there something I can help you with, or would you like to chat?
# 11 25
copy

Featured Model: zai-org/GLM-5.2

GLM-5.2 is Z-AI's latest flagship model for long-horizon tasks. It marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a solid 1M-token context.

Price per 1M input tokens

$0.5625

$0.75

25% off

Price per 1M cached input tokens

$0.105

$0.14


Price per 1M output tokens

$1.80

$2.40


Release Date

06/16/2026


Context Size

1,048,576


Quantization

fp4


# Assume openai>=1.0.0
import os

from openai import OpenAI

# Create an OpenAI client with your deepinfra token and endpoint
openai = OpenAI(
    api_key=os.environ["DEEPINFRA_API_KEY"],
    base_url="https://api.deepinfra.com/v1/openai",
)

chat_completion = openai.chat.completions.create(
    model="zai-org/GLM-5.2",
    messages=[{"role": "user", "content": "Hello"}],
)

print(chat_completion.choices[0].message.content)
print(chat_completion.usage.prompt_tokens, chat_completion.usage.completion_tokens)

# Hello! It's nice to meet you. Is there something I can help you with, or would you like to chat?
# 11 25
copy

Available GLM Models

GLM model family by Z.ai

ModelContext$ per 1M input tokens$ per 1M output tokens
Actions
GLM-5.338% off
1024k$0.90 / $0.20 cached$0.5625 / $0.125 cached$4.00$2.50
1024k$0.15 / $0.03 cached$0.50
GLM-5.225% off
1024k$0.75 / $0.14 cached$0.5625 / $0.105 cached$2.40$1.80
198k$0.40 / $0.08 cached$1.75
198k$0.50 / $0.10 cached$2.00

FAQ

How do I integrate GLM models into my application?

You can integrate GLM models seamlessly using DeepInfra’s OpenAI-compatible API. Just replace your existing base URL with DeepInfra’s endpoint and use your DeepInfra API key—no infrastructure setup required. DeepInfra also supports integration through libraries like openai, litellm, and other SDKs, making it easy to switch or scale your workloads instantly.

What are the pricing details for using GLM models on DeepInfra?

Pricing is usage-based:
  • Input Tokens: between $0.15 and $0.90 per million
  • Output Tokens: between $0.50 and $4.00 per million
Prices vary slightly by model. There are no upfront fees, and you only pay for what you use.

How do I get started using GLM on DeepInfra?

Sign in with GitHub at deepinfra.com
  • Get your API key
  • Test models directly from the browser, cURL, or SDKs
  • Review pricing on your usage dashboard
Within minutes, you can deploy apps using GLM models—without any infrastructure setup.