1. Conduid
  2. AI
  3. Z.ai2api
MCP server · AI

Z.ai2api

将 Z.ai Chat 代理为 OpenAI/Anthropic Compatible 格式,支持多模型列表映射、免令牌、智能处理思考链、图片上传等功能;Z.ai ZtoApi z2api ZaitoApi zai X-Signature 签名 GLM 4.5 v 4.6

72Good

Scored 4 months ago · breakdown

About Z.ai2api

Z.ai2api is an MCP server published by hmjz100 in the AI category: 将 Z.ai Chat 代理为 OpenAI/Anthropic Compatible 格式,支持多模型列表映射、免令牌、智能处理思考链、图片上传等功能;Z.ai ZtoApi z2api ZaitoApi zai X-Signature 签名 GLM 4.5 v 4.6. It has been installed 0 times through Conduid.

The repository has 126 stars and 41 forks, with the last commit 10 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx z-ai2api

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Z.ai2api

Powered by Claude · Grounded in docs

I know everything about Z.ai2api. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

[!IMPORTANT] 正式版更新稍迟,如急需使用,建议切换到 Canary 分支

功能

  • 支持根据官网 /api/models 生成模型列表,并自动选择合适的模型名称。
  • (登录后)支持上传图片,使用 GLM 识图系列模型。
  • 支持智能识别思考链,完美转换多种格式。

要求

.env

环境

使用 .env 文件进行配置。

BASE

  • 上游 API 基础域名
  • 默认值:https://chat.z.ai

PORT

  • 服务端口
  • 默认值:8080

MODEL

  • 备选模型,在未传入模型时调用
  • 默认值:GLM-4.5

TOKEN

  • 访问令牌
  • 如果启用了 ANONYMOUS_MODE 可不填

ANONYMOUS_MODE

  • 访客模式,启用后将获取随机令牌
  • 默认值:true
  • 访客模式下不支持上传文件调用视觉模型

THINK_TAGS_MODE

  • 思考链格式化模式
  • 默认值:reasoning
  • 可选 reasoning think strip details,效果如下
    • "reasoning"
      • reasoning_content: 嗯,用户……
      • content: 你好!
    • "think"
      • content: <think>\n\n嗯,用户……\n\n</think>\n\n你好!
    • "strip"
      • content: > 嗯,用户……\n\n你好!
    • "details"
      • content: <details type="reasoning" open><div>\n\n嗯,用户……\n\n</div><summary>Thought for 1 seconds</summary></details>\n\n你好!

DEBUG_MODE

  • 显示调试信息,启用后将显示一些调试信息
  • 默认值:false

使用

git clone https://github.com/hmjz100/Z.ai2api.git
cd Z.ai2api
pip install -r requirements.txt
python app.py

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Z.ai2api

How do I install Z.ai2api?

Run npx z-ai2api, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Z.ai2api safe to use with an AI agent?

Its trust score is 72 out of 100 (good). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Z.ai2api still maintained?

The last commit was 10 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.