- glm/glm-5-2
glm/glm-5.2
- context · $0.8400 / M input tokens · $2.6400 / M output tokens
GLM 5.2 OurToken पर GLM model route है, उन developers के लिए जो hosted API access, coding workflows, long-context tasks, pricing और production assistant workloads evaluate कर रहे हैं।
मूल्य निर्धारण
उपयोग के अनुसार भुगतान
कोई अग्रिम लागत नहीं, केवल उतने के लिए भुगतान करें जितना आप उपयोग करते हैं
API उपयोग
API Access Guide
कोड उदाहरण
इस मॉडल के लिए OurToken API endpoint का उपयोग करें। नीचे दिए गए उदाहरण direct HTTP requests और मॉडल परिवार के लिए recommended endpoint का उपयोग करते हैं।
curl https://api.ourtoken.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "glm-5.2",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 256
}'Chat Completions API संदर्भ
OpenAI Chat Completions-संगत endpoint के साथ chat response बनाएँ। SDK Base URL के रूप में https://api.ourtoken.ai/v1 और endpoint के रूप में POST /chat/completions का उपयोग करें।
Authorization
| Content-Type | application/json |
| Authorization | Bearer YOUR_API_KEY |
Request Body
| फ़ील्ड | प्रकार | आवश्यक | विवरण |
|---|---|---|---|
| model | string | आवश्यक | कॉल करने के लिए Model ID। |
| messages | array<object> | आवश्यक | model को भेजे गए conversation messages। |
| max_tokens | integer | वैकल्पिक | output tokens की अधिकतम संख्या। |
| temperature | number | वैकल्पिक | Sampling temperature। |
| top_p | number | वैकल्पिक | Nucleus sampling parameter। |
| stream | boolean | वैकल्पिक | क्या streaming response लौटाना है। |
| stream_options | object | वैकल्पिक | streaming responses के लिए अतिरिक्त options। |
| tools | array<object> | वैकल्पिक | model के लिए उपलब्ध tools। |
| tool_choice | string | object | वैकल्पिक | model tools कैसे चुनता है, इसे नियंत्रित करता है। |
| response_format | object | वैकल्पिक | structured output को नियंत्रित करता है, जैसे JSON object responses। |
Response Body
| फ़ील्ड | प्रकार | आवश्यक | विवरण |
|---|---|---|---|
| id | string | आवश्यक | unique chat completion identifier। |
| object | "chat.completion" | आवश्यक | Chat Completions API द्वारा लौटाया गया object type। |
| created | integer | आवश्यक | response बनाए जाने का Unix timestamp। |
| model | string | आवश्यक | वह model जिसने response बनाया। |
| choices | array<object> | आवश्यक | model द्वारा लौटाए गए candidate responses। |
| choices[].message.role | string | आवश्यक | लौटाए गए chat message की role। |
| choices[].message.content | string | वैकल्पिक | लौटाए गए chat message में text content। |
| choices[].finish_reason | string | वैकल्पिक | generation रुकने का कारण। |
| usage | object | वैकल्पिक | chat completion के लिए token usage information। |
| usage.prompt_tokens | integer | वैकल्पिक | Input token count। |
| usage.completion_tokens | integer | वैकल्पिक | Output token count। |
| usage.total_tokens | integer | वैकल्पिक | Total token count। |
| usage.prompt_tokens_details | object | वैकल्पिक | input token usage का breakdown। |
| usage.prompt_tokens_details.cached_tokens | integer | वैकल्पिक | cache से served tokens। |
मॉडल परिचय
GLM glm-5.2
GLM 5.2 OurToken पर GLM model route है, उन developers के लिए जो hosted API access, coding workflows, long-context tasks, pricing और production assistant workloads evaluate कर रहे हैं।
Supplied launch material के अनुसार GLM 5.2, GLM 5.1 line पर build करता है और coding capability, long-horizon work तथा 1M-context evaluation पर focused है। जब आपको model testing, pricing review, API keys, usage logs और production integration के लिए एक endpoint चाहिए हो, तब OurToken के माध्यम से glm 5.2 api उपयोग करें।
यह बेहतरीन क्यों है
- Input, output और cache read tokens के लिए official GLM 5.2 reference price का 60%।
- अन्य supported models द्वारा उपयोग किए जाने वाले उसी OurToken endpoint के माध्यम से OpenAI-compatible API setup।
- GLM coding, agent workflows, long-context sessions और OpenCode-style development tasks evaluate करने के लिए उपयोगी।
- Supplied launch material 1M-context support और GLM Coding Plan availability बताता है, जबकि independent benchmark coverage अलग से review की जानी चाहिए।
- Dashboard logs और usage visibility launch के बाद request cost compare करने में teams की मदद करते हैं।
मुख्य विशेषताएँ
- Model ID: glm-5.2
- Input price: OurToken पर $0.8400 per 1M tokens
- Output price: OurToken पर $2.6400 per 1M tokens
- Cache read price: OurToken पर $0.1560 per 1M tokens
- Cache write price: OurToken पर $0 per 1M tokens
- Provider: GLM
विशिष्टताएँ
Developers के लिए glm 5.2 api Features
Unified GLM access, glm 5.2 pricing visibility, coding evaluation, long-context planning और production workflow testing के लिए glm 5.2 api उपयोग करें।
Unified Access
Separate GLM provider integration बनाने के बजाय OurToken unified endpoint के माध्यम से glm 5.2 api call करें। Developers एक API key create कर सकते हैं, glm-5.2 को model ID के रूप में उपयोग कर सकते हैं, और testing तथा production में OpenAI-compatible request patterns रख सकते हैं।
Pricing Visibility
Traffic route करने से पहले glm 5.2 pricing review करें। OurToken $0.8400 input, $2.6400 output और $0.1560 cache read per 1M tokens list करता है, cache write $0 है, जिससे prompt और agent workload costs estimate किए जा सकते हैं।
Coding Workflows
Repository tasks, coding agents, tool-use loops और planning-heavy development prompts पर GLM 5.2 model behavior evaluate करें। Supplied launch material model को long-horizon coding के लिए position करता है, लेकिन teams को quality अपने acceptance tests से confirm करनी चाहिए।
Benchmark Context
glm 5.2 benchmark searches को discovery signals के रूप में उपयोग करें, final procurement proof के रूप में नहीं। User-supplied notes में Pac-Man और coding-plan evaluations हैं, जबकि launch coverage कहती है कि independent benchmark results को third-party verification की जरूरत हो सकती है।
OpenCode Testing
OurToken के माध्यम से realistic multi-step coding prompts भेजकर opencode glm 5.2 workflows test करें और tool behavior, latency, token usage तथा output quality review करें। Comparison runs में prompts, model ID और budget assumptions consistent रखें।
Provider Comparison
Provider choice evaluate करते समय hosted OurToken access की तुलना glm 5.2 openrouter जैसी searches से करें। OurToken API keys, usage logs, pricing visibility और unified endpoint पर focused है, separate provider-specific setup पर नहीं।
OurToken पर glm 5.2 api कैसे उपयोग करें
API key बनाएं, glm-5.2 copy करें, glm 5.2 pricing compare करें, unified endpoint call करें और coding workflows test करें।
Create API Key
Dashboard से OurToken API key create करें और उसे secure server-side environment variable में store करें। इससे आपका backend glm 5.2 api access कर सकता है, credentials को browser code, notebooks या public repositories में expose किए बिना।
01Copy Model ID
Request body में model value के रूप में glm-5.2 उपयोग करें। Exact GLM 5.2 model ID को configuration में रखने से local tests, staging traffic और production routes compare करते समय naming mistakes से बचा जा सकता है।
02Call Endpoint
अपनी API key, model ID और prompt payload के साथ OurToken unified API endpoint पर chat completions requests भेजें। Base URL, credential और model value बदलने के बाद existing OpenAI-compatible request patterns आमतौर पर reuse किए जा सकते हैं।
03Compare Pricing
Traffic scale करने से पहले glm 5.2 pricing compare करें: OurToken $0.8400 input, $2.6400 output और $0.1560 cache read per 1M tokens list करता है। Cache write $0 listed है, इसलिए cached prompts को normal input और output से अलग रखें।
04Test Coding
Repository tasks, one-shot application builds, OpenCode-style agent sessions और regression prompts के साथ अपना glm 5.2 coding plan चलाएं। Public anecdotes test cases inspire कर सकते हैं, लेकिन production routing आपके latency, quality और cost data पर depend करना चाहिए।
05Monitor Usage
Launch के बाद history logs में request counts, input tokens, output tokens, cache read tokens और spend review करें। इससे teams GLM 5.2 model performance को benchmark posts या provider listings के बजाय actual traffic से compare कर सकती हैं।
06glm 5.2 api FAQ
glm 5.2 api access, glm-5.2 model ID, pricing, benchmark interpretation, OpenCode testing और OpenRouter comparisons के उत्तर।