翻篇收录说明
翻篇网页快照

Agent Chat - Overview - Z.AI DEVELOPER DOCUMENT

https://docs.z.ai/api-reference/agents/agent

最近抓取:2026-12-03 17:54:02(北京时间)

最近内容变化:2026-12-03 17:54:02(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

General Translation: General Translation API provides large model-based multilingual translation services, including general translation, paraphrase translation, two-step translation, and three-pass translation strategies. It supports automatic language detection, glossary customization, translation suggestions, and streaming output. Users only need to call the Translation API, input the text to be processed, specify the source language (auto-detection supported) and target language to receive high-quality translation results. Popular Special Effects Videos: Popular special effects videos are intelligent templates launched based on trending features from pan-entertainment platforms, designed to precisely adapt to short video creative production needs. Currently, three effect templates are available: French Kiss, Body Shake Dance, and Sexy Me. After selecting a template, users only need to upload an image and enter corresponding prompts to generate a special effects video. GLM Slide/Poster Agent: An intelligent creation agent built for working people and creators. It goes beyond traditional engineering-style assembly tools—supporting one-click generation of slides or posters from na

正文摘录

cURLcURLcurl --request POST \ --url https://api.z.ai/api/v1/agents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "agent_id": "general_translation", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "<string>" } ] } ], "stream": true, "custom_variables": { "glossary": "<string>", "strategy_config": { "general": { "suggestion": "<string>" }, "cot": {} } } } '200General Translation{ "id": "<string>", "agent_id": "<string>", "choices": [ { "index": 123, "finish_reason": "<string>", "messages": [ { "role": "<string>", "content": { "text": "<string>", "type": "<string>" } } ] } ], "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "total_calls": 123 } }POST/v1/agentsTry itcURLcURLcurl --request POST \ --url https://api.z.ai/api/v1/agents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "agent_id": "general_translation", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "<string>" } ] } ], "stream": true, "custom_variables": { "glossary": "<string>", "strategy_config": { "general": { "suggestion": "<string>" }, "cot": {} } } } '200General Translation{ "id": "<string>", "agent_id": "<string>", "choices": [ { "index": 123, "finish_reason": "<string>", "messages": [ { "role": "<string>", "content": { "text": "<string>", "type": "<string>" } } ] } ], "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123, "total_calls": 123 } }AuthorizationsAuthorizationstringheaderrequiredUse the following format for authentication: Bearer HeadersAccept-Languageenum<string>default:en-US,enConfig desired response language for HTTP requests.Available options: en-US,en Example:"en-US,en"Bodyapplication/jsonGeneral TranslationPopular Special Effects VideosGLM Slide/Posteragent_idenum<string>requiredAgent ID: general_translation.Available options: general_translation messagesobject[]requiredSession message body.Hide child attributesmessages.roleenum<string>default:userrequiredUser input role: userAvailable options: user Example:"user"messages.contentobject[]requiredContent list.Hide child attributesmessages.content.typeenum<string>default:textrequiredSupported type: text.Available options: text messages.content.textstringrequiredUser text input.streambooleanFalse for sync calls (default). True for streaming.custom_variablesobjectHide child attributescustom_variables.source_langenum<string>Supported language codes (default: auto): auto: Auto Detect zh-CN: Simplified Chinese zh-TW: Traditional Chinese wyw: Classical Chinese yue: Cantonese en: English ja: Japanese ko: Korean fr: French de: German es: Spanish ru: Russian pt: Portuguese it: Italian ar: Arabic hi: Hindi bg: Bulgarian cs: Czech da: Danish el: Greek et: Estonian fi: Finnish hu: Hungarian id: Indonesian lt: Lithuanian lv: Latvian nl: Dutch no: Norwegian Bokmål pl: Polish ro: Romanian sk: Slovak sl: Slovenian sv: Swedish th: Thai tr: Turkish uk: Ukrainian vi: Vietnamese my: Burmese ms: Malay Pinyin: Pinyin IPA: International Phonetic Alphabet Available options: auto, zh-CN, zh-TW, wyw, yue, en, ja, ko, fr, de, es, ru, pt, it, ar, hi, bg, cs, da, el, et, fi, hu, id, lt, lv, nl, no, pl, ro, sk, sl, sv, th, tr, uk, vi, my, ms, Pinyin, IPA custom_variables.target_langenum<string>Target language code (default: zh-CN): zh-CN: Simplified Chinese zh-TW: Traditional Chinese wyw: Classical Chinese yue: Cantonese en: English en-GB: English (British) en-US: English (American) ja: Japanese ko: Korean fr: French de: German es: Spanish ru: Russian pt: Portuguese it: Italian ar: Arabic hi: Hindi bg: Bulgarian cs: Czech da: Danish el: Greek et: Estonian fi: Finnish hu: Hungarian id: Indonesian lt: Lithuanian lv: Latvian nl: Dutch no: Norwegian Bokmål pl: Polish ro: Romanian sk: Slovak sl: Slovenian sv: Swedish th: Thai tr: Turkish uk: Ukrainian vi: Vietnamese my: Burmese ms: Malay Pinyin: Pinyin IPA: International Phonetic Alphabet . Available options: zh-CN, zh-TW, wyw, yue, en, en-GB, en-US, ja, ko, fr, de, es, ru, pt, it, ar, hi, bg, cs, da, el, et, fi, hu, id, lt, lv, nl, no, pl, ro, sk, sl, sv, th, tr, uk, vi, my, ms, Pinyin, IPA custom_variables.glossarystringGlossary ID.custom_variables.strategyenum<string>Translation strategy (default: general),Optional: general: General Translation paraphrase: Paraphrase Translation two_step: Two-Step Translation three_step: Three-Stage Translation reflection: Reflection Translation; cot: COT Translation Available options: general, paraphrase, two_step, three_step, reflection custom_variables.strategy_configobjectStrategy parameters.Hide child attributescustom_variables.strategy_config.generalobjectHide child attributescustom_variables.strategy_config.general.suggestionstringTranslation suggestions or style requirements (e.g., terminology mapping, style guidelines).custom_variables.strategy_config.cotobjectParameters when strategy is cot.Hide child attributescustom_variables.strategy_config.cot.reason_langenum<string>Language for translation reasoning, values: [from|to], default: to.Available options: from, to Response200application/jsonProcessing successfulGeneral TranslationPopular Special Effects VideosGLM Slide/PosteridstringTask ID.agent_idstringAgent ID.statusstringTask status.choicesobject[]Model output content.Hide child attributeschoices.indexintegerResult index.choices.finish_reasonstringTermination reason: stop (normal completion), tool_calls (model calls), length (token limit exceeded), sensitive (content flagged), network_error (model inference error).choices.messagesobjectModel response message.Hide child attributeschoices.messages.rolestringDialog role (default: assistant).choices.messages.contentobjectInference resultHide child attributeschoices.messages.content.typestringResult type.choices.messages.content.textstringResult content.usageobjectToken usage statistics.Hide child attributesusage.prompt_tokensintegerInput tokens count.usage.completion_tokensintegerOutput tokens count.usage.total_tokensintegerTotal tokens count.usage.total_callsintegerTotal number of callsWas this page helpful?YesNo