Zhipu AI · Capability

Z.AI API

Z.AI API. 13 operations. Lead operation: Generate Image (Async). Self-contained Naftiko capability covering one Zhipu Ai business surface.

Run with Naftiko Zhipu Ai

What You Can Do

GET
Get — This endpoint is used to query the result of an asynchronous request.
/v1/paas/v4/async-result/{id}
POST
Post — Generate Image (Async)
/v1/paas/v4/async/images/generations
POST
Post — Speech to Text
/v1/paas/v4/audio/transcriptions
POST
Post — Create a chat completion model that generates AI replies for given conversation messages. It supports multimodal inputs (text, images, audio, video, file), offers configurable parameters (like temperature, max tokens, tool use), and support
/v1/paas/v4/chat/completions
POST
Post — This API is designed for uploading auxiliary files (such as glossaries, terminology lists) to support the translation service. It allows users to upload reference materials that can enhance translation accuracy and consistency.
/v1/paas/v4/files
POST
Post — Generate Image
/v1/paas/v4/images/generations
POST
Post — Layout Parsing
/v1/paas/v4/layout-parsing
POST
Post — Text Tokenizer
/v1/paas/v4/tokenizer
POST
Post — CogVideoX is a video generation large model developed by Z.AI, equipped with powerful video generation capabilities. Simply inputting text or images allows for effortless video creation.
/v1/paas/v4/videos/generations
POST
Post — The [Web Search](/guides/tools/web-search) is a specialized search engine for large language models. Building upon traditional search engine capabilities like web crawling and ranking, it enhances intent recognition to return results better
/v1/paas/v4/web-search
POST
Post — 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 autom
/v1/v1/agents
POST
Post — This endpoint is used to query the result of an asynchronous request.
/v1/v1/agents/async-result
POST
Post — This endpoint is used to query the agent conversation history.Only support slides_glm_agent
/v1/v1/agents/conversation

MCP Tools

this-endpoint-is-used-query

This endpoint is used to query the result of an asynchronous request.

read-only idempotent
generate-image-async

Generate Image (Async)

speech-text

Speech to Text

create-chat-completion-model-that

Create a chat completion model that generates AI replies for given conversation messages. It supports multimodal inputs (text, images, audio, video, file), offers configurable parameters (like temperature, max tokens, tool use), and support

this-api-is-designed-uploading

This API is designed for uploading auxiliary files (such as glossaries, terminology lists) to support the translation service. It allows users to upload reference materials that can enhance translation accuracy and consistency.

generate-image

Generate Image

layout-parsing

Layout Parsing

text-tokenizer

Text Tokenizer

cogvideox-is-video-generation-large

CogVideoX is a video generation large model developed by Z.AI, equipped with powerful video generation capabilities. Simply inputting text or images allows for effortless video creation.

web-search-guides-tools-web

The [Web Search](/guides/tools/web-search) is a specialized search engine for large language models. Building upon traditional search engine capabilities like web crawling and ranking, it enhances intent recognition to return results better

read-only
general-translation-general-translation-api

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 autom

this-endpoint-is-used-query-2

This endpoint is used to query the result of an asynchronous request.

read-only
this-endpoint-is-used-query-3

This endpoint is used to query the agent conversation history.Only support slides_glm_agent

read-only

Capability Spec

zhipu-ai-general.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Z.AI API
  description: 'Z.AI API. 13 operations. Lead operation: Generate Image (Async). Self-contained Naftiko capability covering
    one Zhipu Ai business surface.'
  tags:
  - Zhipu Ai
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ZHIPU_AI_API_KEY: ZHIPU_AI_API_KEY
capability:
  consumes:
  - type: http
    namespace: zhipu-ai-general
    baseUri: https://api.z.ai/api
    description: Z.AI API business capability. Self-contained, no shared references.
    resources:
    - name: paas-v4-async-result-id
      path: /paas/v4/async-result/{id}
      operations:
      - name: get
        method: GET
        description: This endpoint is used to query the result of an asynchronous request.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    - name: paas-v4-async-images-generations
      path: /paas/v4/async/images/generations
      operations:
      - name: post
        method: POST
        description: Generate Image (Async)
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-audio-transcriptions
      path: /paas/v4/audio/transcriptions
      operations:
      - name: post
        method: POST
        description: Speech to Text
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-chat-completions
      path: /paas/v4/chat/completions
      operations:
      - name: post
        method: POST
        description: Create a chat completion model that generates AI replies for given conversation messages. It supports
          multimodal inputs (text, images, audio, video, file), offers configurable parameters (like temperature, max tokens,
          tool use), and support
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-files
      path: /paas/v4/files
      operations:
      - name: post
        method: POST
        description: This API is designed for uploading auxiliary files (such as glossaries, terminology lists) to support
          the translation service. It allows users to upload reference materials that can enhance translation accuracy and
          consistency.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-images-generations
      path: /paas/v4/images/generations
      operations:
      - name: post
        method: POST
        description: Generate Image
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-layout_parsing
      path: /paas/v4/layout_parsing
      operations:
      - name: post
        method: POST
        description: Layout Parsing
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-tokenizer
      path: /paas/v4/tokenizer
      operations:
      - name: post
        method: POST
        description: Text Tokenizer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-videos-generations
      path: /paas/v4/videos/generations
      operations:
      - name: post
        method: POST
        description: CogVideoX is a video generation large model developed by Z.AI, equipped with powerful video generation
          capabilities. Simply inputting text or images allows for effortless video creation.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: paas-v4-web_search
      path: /paas/v4/web_search
      operations:
      - name: post
        method: POST
        description: The [Web Search](/guides/tools/web-search) is a specialized search engine for large language models.
          Building upon traditional search engine capabilities like web crawling and ranking, it enhances intent recognition
          to return results better
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-agents
      path: /v1/agents
      operations:
      - name: post
        method: POST
        description: '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 autom'
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-agents-async-result
      path: /v1/agents/async-result
      operations:
      - name: post
        method: POST
        description: This endpoint is used to query the result of an asynchronous request.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-agents-conversation
      path: /v1/agents/conversation
      operations:
      - name: post
        method: POST
        description: This endpoint is used to query the agent conversation history.Only support slides_glm_agent
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.ZHIPU_AI_API_KEY}}'
  exposes:
  - type: rest
    namespace: zhipu-ai-general-rest
    port: 8080
    description: REST adapter for Z.AI API. One Spectral-compliant resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/paas/v4/async-result/{id}
      name: paas-v4-async-result-id
      description: REST surface for paas-v4-async-result-id.
      operations:
      - method: GET
        name: get
        description: This endpoint is used to query the result of an asynchronous request.
        call: zhipu-ai-general.get
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/async/images/generations
      name: paas-v4-async-images-generations
      description: REST surface for paas-v4-async-images-generations.
      operations:
      - method: POST
        name: post
        description: Generate Image (Async)
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/audio/transcriptions
      name: paas-v4-audio-transcriptions
      description: REST surface for paas-v4-audio-transcriptions.
      operations:
      - method: POST
        name: post
        description: Speech to Text
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/chat/completions
      name: paas-v4-chat-completions
      description: REST surface for paas-v4-chat-completions.
      operations:
      - method: POST
        name: post
        description: Create a chat completion model that generates AI replies for given conversation messages. It supports
          multimodal inputs (text, images, audio, video, file), offers configurable parameters (like temperature, max tokens,
          tool use), and support
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/files
      name: paas-v4-files
      description: REST surface for paas-v4-files.
      operations:
      - method: POST
        name: post
        description: This API is designed for uploading auxiliary files (such as glossaries, terminology lists) to support
          the translation service. It allows users to upload reference materials that can enhance translation accuracy and
          consistency.
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/images/generations
      name: paas-v4-images-generations
      description: REST surface for paas-v4-images-generations.
      operations:
      - method: POST
        name: post
        description: Generate Image
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/layout-parsing
      name: paas-v4-layout-parsing
      description: REST surface for paas-v4-layout_parsing.
      operations:
      - method: POST
        name: post
        description: Layout Parsing
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/tokenizer
      name: paas-v4-tokenizer
      description: REST surface for paas-v4-tokenizer.
      operations:
      - method: POST
        name: post
        description: Text Tokenizer
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/videos/generations
      name: paas-v4-videos-generations
      description: REST surface for paas-v4-videos-generations.
      operations:
      - method: POST
        name: post
        description: CogVideoX is a video generation large model developed by Z.AI, equipped with powerful video generation
          capabilities. Simply inputting text or images allows for effortless video creation.
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/paas/v4/web-search
      name: paas-v4-web-search
      description: REST surface for paas-v4-web_search.
      operations:
      - method: POST
        name: post
        description: The [Web Search](/guides/tools/web-search) is a specialized search engine for large language models.
          Building upon traditional search engine capabilities like web crawling and ranking, it enhances intent recognition
          to return results better
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/agents
      name: v1-agents
      description: REST surface for v1-agents.
      operations:
      - method: POST
        name: post
        description: '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 autom'
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/agents/async-result
      name: v1-agents-async-result
      description: REST surface for v1-agents-async-result.
      operations:
      - method: POST
        name: post
        description: This endpoint is used to query the result of an asynchronous request.
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/agents/conversation
      name: v1-agents-conversation
      description: REST surface for v1-agents-conversation.
      operations:
      - method: POST
        name: post
        description: This endpoint is used to query the agent conversation history.Only support slides_glm_agent
        call: zhipu-ai-general.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: zhipu-ai-general-mcp
    port: 9090
    transport: http
    description: MCP adapter for Z.AI API. One tool per consumed operation, routed inline through this capability's consumes
      block.
    tools:
    - name: this-endpoint-is-used-query
      description: This endpoint is used to query the result of an asynchronous request.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: zhipu-ai-general.get
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: generate-image-async
      description: Generate Image (Async)
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: speech-text
      description: Speech to Text
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-chat-completion-model-that
      description: Create a chat completion model that generates AI replies for given conversation messages. It supports multimodal
        inputs (text, images, audio, video, file), offers configurable parameters (like temperature, max tokens, tool use),
        and support
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: this-api-is-designed-uploading
      description: This API is designed for uploading auxiliary files (such as glossaries, terminology lists) to support the
        translation service. It allows users to upload reference materials that can enhance translation accuracy and consistency.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: generate-image
      description: Generate Image
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: layout-parsing
      description: Layout Parsing
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: text-tokenizer
      description: Text Tokenizer
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: cogvideox-is-video-generation-large
      description: CogVideoX is a video generation large model developed by Z.AI, equipped with powerful video generation
        capabilities. Simply inputting text or images allows for effortless video creation.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: web-search-guides-tools-web
      description: The [Web Search](/guides/tools/web-search) is a specialized search engine for large language models. Building
        upon traditional search engine capabilities like web crawling and ranking, it enhances intent recognition to return
        results better
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: general-translation-general-translation-api
      description: '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 autom'
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: this-endpoint-is-used-query-2
      description: This endpoint is used to query the result of an asynchronous request.
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: this-endpoint-is-used-query-3
      description: This endpoint is used to query the agent conversation history.Only support slides_glm_agent
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: zhipu-ai-general.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.