Cheaper Inference
Cheaper Inference
glm-5.2-fast is available for text generation from Z.ai. Its reported context window is 1,000,000 tokens, with up to 128,000 output tokens. Reported inputs: text. The served catalog lists streaming.
/v1/chat/completions
Ready when you are
Marketplace pricing, capped at list, optimized further.
/v1/completions
/v1/messages
/v1/responses
glm-5.2-fast/v1/chat/completions/v1/responses/v1/messagesPOST /v1/chat/completions
curl https://api.cheaperinference.com/v1/chat/completions \ -H "Authorization: Bearer ci_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.2-fast", "messages": [ { "role": "user", "content": "Reply with the single word OK." } ] }'POST /v1/responses
curl https://api.cheaperinference.com/v1/responses \ -H "Authorization: Bearer ci_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": [ { "role": "user", "content": "Reply with the single word OK." } ], "model": "glm-5.2-fast", "store": false }'POST /v1/messages
curl https://api.cheaperinference.com/v1/messages \ -H "Authorization: Bearer ci_live_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.2-fast", "messages": [ { "role": "user", "content": "Reply with the single word OK." } ], "max_tokens": 1024 }'Capability source · checked
$3.25 estimated at displayed rates
1,000,000 ÷ 1,000,000 × $1.82 + 250,000 ÷ 1,000,000 × $5.72
The same billed quantities at the listed reference rates: $5.00.
Uses uncached input at the displayed standard rates, with no extra modalities or tools. Billed output includes any charged reasoning tokens. Actual token counts, price tiers, and marketplace prices can change the total.
Price quote effective .
Python: pip install openai · Node.js: npm install openai. Set CHEAPER_INFERENCE_API_KEY on your server.
import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ["CHEAPER_INFERENCE_API_KEY"], base_url="https://api.cheaperinference.com/v1",)request = { "input": [ { "role": "user", "content": "Reply with the single word OK.", }, ], "model": "glm-5.2-fast", "store": False,}response = client.responses.create(**request)print(response.output_text)import OpenAI from "openai";const client = new OpenAI({ apiKey: process.env.CHEAPER_INFERENCE_API_KEY, baseURL: "https://api.cheaperinference.com/v1",});const response = await client.responses.create({ "input": [ { "role": "user", "content": "Reply with the single word OK." } ], "model": "glm-5.2-fast", "store": false});console.log(response.output_text);For other supported endpoints and their exact parameters, use the request samples and parameter reference on this page. Read the API integration guide.
| Model | Current pricing | Context limit | Image input listed |
|---|---|---|---|
| glm-5.2-fast (this model)Z.ai | $1.82 input / $5.72 output per 1M tokens | 1,000,000 tokens | No |
| glm-5.3-fastZ.ai | $1.365 input / $4.29 output per 1M tokens | 1,048,576 tokens | No |
| glm-5.2Z.ai | $0.9625 input / $3.1625 output per 1M tokens | 1,048,576 tokens | No |
| glm-5.3Z.ai |
/v1/chat/completionsreasoning.excludemax_tokensreasoningresponse_formatstoptemperaturetool_choicetools/v1/messagesmax_tokensthinkingoutput_config.formatstop_sequences/v1/responsesmax_output_tokensreasoningtext.formattemperatureCompare recorded quotes and the hours with the highest observed discounts.
This model’s recorded quotes averaged 28.7% below recorded reference prices across the selected range. Its strongest observed window was 5:00 AM–11:00 AM in UTC.
Average quoted discount
28.7%
Highest discount time
5:00 AM–11:00 AM
Hourly coverage
23/24
Signal quality
Growing
Hover a bar for recorded unit discounts and observation counts.
Source buckets are UTC; labels are converted to UTC.
Last 24 hours
#105
of 295 ranked models
Last 7 days
Unavailable
Activity could not be loaded
Last 30 days
Unavailable
Activity could not be loaded
| $0.77 input / $2.42 output per 1M tokens |
| 1,000,000 tokens |
| No |
temperaturetool_choicetoolstool_choicetools