GLM-5
Provider list prices: no platform markup, pay-as-you-go. These are official list prices. Logged-in customers may see effective prices including workspace discounts on /console/pricing. Effective input at a 70% cache-hit rate:$0.44/M. Automatic prompt caching: repeated prompt prefixes bill at the cache-hit rate shown in the pricing table, no code changes required.
Use GLM-5 in 30 seconds
OpenAI-compatible: swap the base_url, keep your SDK. POST /v1/chat/completions
from openai import OpenAI
client = OpenAI(
base_url="https://synthorai.io/v1",
api_key="sk-syn-...",
)
resp = client.chat.completions.create(
model="glm-5",
messages=[{"role": "user", "content": "Summarize this diff"}],
reasoning_effort="medium",
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://synthorai.io/v1",
apiKey: "sk-syn-...",
});
const resp = await client.chat.completions.create({
model: "glm-5",
messages: [{ role: "user", content: "Summarize this diff" }],
reasoning_effort: "medium",
});
console.log(resp.choices[0].message.content);curl https://synthorai.io/v1/chat/completions \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "medium"
}'package main
import (
"context"
"fmt"
"github.com/openai/openai-go/v3"
"github.com/openai/openai-go/v3/option"
)
func main() {
client := openai.NewClient(
option.WithBaseURL("https://synthorai.io/v1"),
option.WithAPIKey("sk-syn-..."),
)
resp, _ := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
Model: "glm-5",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Summarize this diff"),
},
ReasoningEffort: openai.ReasoningEffortMedium,
})
fmt.Println(resp.Choices[0].Message.Content)
}import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.models.ReasoningEffort;
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl("https://synthorai.io/v1")
.apiKey("sk-syn-...")
.build();
ChatCompletion resp = client.chat().completions().create(
ChatCompletionCreateParams.builder()
.model("glm-5")
.addUserMessage("Summarize this diff")
.reasoningEffort(ReasoningEffort.MEDIUM)
.build());
System.out.println(resp.choices().get(0).message().content().orElse(""));About GLM-5
GLM-5 is Z.AI's new-generation foundation model built for agentic engineering, targeting complex system engineering and long-horizon agent tasks.
- Versus its predecessor, Z.AI scaled parameters from 355B (32B activated) to 744B (40B activated) and pre-training data from 23T to 28.5T tokens, adding sparse attention and the Slime asynchronous reinforcement-learning framework.
- It offers a 200K context window, up to 128K output tokens, thinking modes, function calling, context caching, and open weights, with Z.AI describing open-source state-of-the-art coding and agent performance.
- Synthorai serves GLM-5 through its OpenAI-compatible endpoint, so existing SDKs work unchanged.
Specs & limits
| Max output (vendor spec) | 131,072 |
| Modalities | text → text |
| Parameters | 744B total · 40B active (MoE) |
| Features | tools · structured_output · streaming · reasoning · caching |
| License | MIT ↗ |
| Notable | Flagship for agentic engineering: 744B-param MoE (40B active), pre-trained on 28.5T tokens with DeepSeek Sparse Attention; 200K context / 128K max output. |
| Prompt caching | automatic |
FAQ
Is the GLM-5 API free to try?
Yes: new accounts get 10 trial calls and up to $1 in free credit, no card required. At $1/M input tokens, that credit alone covers roughly 125 requests of ~8K tokens against GLM-5.
What is GLM-5 best at?
Scaled to 744B parameters, 40B activated, plus sparse attention plus asynchronous reinforcement learning and open weights with 200K context window. See the About section for the full picture from the vendor's own release notes.
How much does GLM-5 cost?
GLM-5 costs $1 per million input tokens and $3.2 per million output tokens on Synthorai. That is the provider's list price, with no platform markup. Cached input tokens bill at $0.2/M.
Does GLM-5 support prompt caching?
Yes, automatically: Z.ai-served prompts cache with no code changes. Cached input tokens bill at $0.2/M vs $1/M uncached. Prompt caching guide →
How do I get access to GLM-5?
Point your existing OpenAI SDK at base_url="https://synthorai.io/v1", set model="glm-5", and you're done. One API key covers every model on the gateway.
Is GLM-5 open source?
Yes: the weights are published under the MIT license. Or skip the GPUs: the hosted version here is pay-as-you-go with no infrastructure to run. Running open-weight models →