---
title: "POST /v1/agents"
method: POST
path: "/v1/agents"
---

# POST /v1/agents

`POST /v1/agents`

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 natural language instructions. By natively integrating content generation with layout aesthetics and design conventions, it helps you quickly produce polished, professional-grade materials while lowering design barriers and boosting creative efficiency.

## Headers

- `Accept-Language` 'en-US,en' — Config desired response language for HTTP requests.

## Request body

- union
  - TranslationAgentRequest
    - `agent_id` 'general_translation', required — Agent ID: `general_translation`.
    - `stream` boolean — False for sync calls (default). True for streaming.
    - `messages` object[], required — Session message body.
      - `role` 'user', required — User input role: `user`
      - `content` object[], required — Content list.
        - `type` 'text', required — Supported type: `text`.
        - `text` string, required — User text input.
    - `custom_variables` object
      - `source_lang` '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' — 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
      - `target_lang` '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' — 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 .
      - `glossary` string — Glossary ID.
      - `strategy` 'general' | 'paraphrase' | 'two_step' | 'three_step' | 'reflection' — 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
      - `strategy_config` object — Strategy parameters.
        - `general` object
          - `suggestion` string — Translation suggestions or style requirements (e.g., terminology mapping, style guidelines).
        - `cot` object — Parameters when strategy is `cot`.
          - `reason_lang` 'from' | 'to' — Language for translation reasoning, values: [`from`｜`to`], default: `to`.
  - SpecialEffectsVideosAgentRequest
    - `agent_id` 'vidu_template_agent', required — Agent ID: `vidu_template_agent`.
    - `request_id` string — User-defined unique ID; used to distinguish requests. Auto-generated if omitted.
    - `messages` object[], required — Session message body.
      - `role` 'user', required — User input role: `user`
      - `content` union[], required — Content list.
        - union
          - object
            - `type` 'text', required — Specifies that this content is text.
            - `text` string, required — User text input.
          - object
            - `type` 'image_url', required — Specifies that this content is an image URL.
            - `image_url` string, uri, required — Image URL input.
    - `custom_variables` object — Agent extension parameters.
      - `template` 'french_kiss' | 'bodyshake' | 'sexy_me', required — Effect template: `french_kiss`, `bodyshake`, or `sexy_me`.
  - GlmSlideAgentRequest
    - `agent_id` 'slides_glm_agent', required — Agent ID.
    - `stream` boolean — False for sync calls (default). True for streaming.
    - `conversation_id` string — Conversation Id.
    - `request_id` string — User-defined unique ID; used to distinguish requests. Auto-generated if omitted.
    - `messages` object[], required — Message body.
      - `role` 'user', required — User input role: `user`
      - `content` object[], required — Content list.
        - `type` 'text', required — Specifies that this content is text.
        - `text` string, required — User text input.

## Response `200`

Processing successful

- union
  - TranslationAgentResponse
    - `id` string — Task ID.
    - `agent_id` string — Agent ID.
    - `status` string — Task status.
    - `choices` object[] — Model output content.
      - `index` integer — Result index.
      - `finish_reason` string — Termination reason: `stop` (normal completion), `tool_calls` (model calls), `length` (token limit exceeded), `sensitive` (content flagged), `network_error` (model inference error).
      - `messages` object — Model response message.
        - `role` string — Dialog role (default: `assistant`).
        - `content` object — Inference result
          - `type` string — Result type.
          - `text` string — Result content.
    - `usage` object — Token usage statistics.
      - `prompt_tokens` integer — Input tokens count.
      - `completion_tokens` integer — Output tokens count.
      - `total_tokens` integer — Total tokens count.
      - `total_calls` integer — Total number of calls
  - SpecialEffectsVideosAgentResponse
    - `async_id` string — Asynchronous task ID.
    - `status` string — Status: `pending` (task created), `failed` (task creation failed).
    - `agent_id` string — Agent ID
    - `error` object
      - `code` string — Error code.
      - `message` string — Error message.
  - GlmSlideAgentResponse
    - `id` string — Request ID
    - `conversation_id` string — Conversation ID
    - `agent_id` string — Agent ID
    - `choices` object[] — Agent output.
      - `index` integer — Result index.
      - `finish_reason` string — Reason for model inference termination. Can be ‘stop’, ‘tool_calls’, ‘length’, ‘sensitive’, or ‘network_error’.
      - `message` object[]
        - `role` string — Role: fixed as `assistant`.
        - `phase` string — Current role type: thinking、tool、answer
        - `content` object[] — Content metadata
          - `type` string — Response Content type: text、object
          - `tag_cn` string — CN Tag.
          - `tag_en` string — EN Tag.
          - `text` string — Output string content when type is text
          - `object` object — Output object content when type is object
            - `tool_name` string — Tool name eg: search、insert_page
            - `input` string — Tool input content
            - `output` string — Tool output content, will output html when generate slide
            - `position` number[] — If the tool involves operations on a PPT file, the position field specifies which slides are being manipulated. If the user says, “Insert a slide after the second slide,” then position = [3], and the output is the HTML content of the third slide. If the user says, “Please delete slides 4, 5, and 6,” then position = [4, 5, 6].
    - `error` object
      - `code` string — Error code.
      - `message` string — Error message.

## Other responses

- `default` — The request has failed.

---

[API](https://skmtc.net/z/apis/z-ai-api.md) · [All operations](https://skmtc.net/z/apis/z-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/z/z-ai-api/revisions/62622aa47d10/schema)
