← 返回 Skills 市场
flyfujian

Autoglm Generate Image

作者 flyfujian · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
30
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install autoglm-generate-image
功能描述
使用 AutoGLM 文生图接口,根据用户输入的文字描述生成图片。当用户需要生成图片、文字转图片、AI绘图等场景时使用此 skill。 Token 通过本地服务 http://127.0.0.1:53699/get_token 自动获取,无需手动配置环境变量。
使用说明 (SKILL.md)

AutoGLM Generate Image Skill

根据用户输入的文字描述,调用 AutoGLM 文生图 API 生成图片并返回图片链接。


API

项目 内容
地址 https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/generate-image
方式 POST
请求体 {"text": "\x3C图片描述文字>"}

脚本启动时会先向本地服务发起 HTTP GET 请求获取 token:

项目 内容
地址 http://127.0.0.1:53699/get_token
方式 GET
返回 Bearer xxx(直接作为 Authorization 头使用)

若返回值不含 Bearer 前缀,脚本会自动补全。

签名 Headers(每次动态生成):

  • X-Auth-Appid: 100003
  • X-Auth-TimeStamp: 当前秒级 Unix 时间戳
  • X-Auth-Sign: MD5(100003 + "&" + timestamp + "&" + 38d2391985e2369a5fb8227d8e6cd5e5)

执行脚本

使用同目录下的 generate-image.py

python generate-image.py "澳洲龙虾"

返回结果处理

响应结构

{
  "code": 0,
  "msg": "SUCCESS",
  "data": {
    "image_url": "https://..."
  }
}

输出要求

  1. 从响应中提取 data.image_url
  2. 以 Markdown 图片格式展示给用户:
![生成图片](image_url)
安全使用建议
Install this only if you trust the AutoGLM service and the local token provider on port 53699. Treat image prompts as data sent to an external service, and avoid including secrets, private customer data, or proprietary text unless that is acceptable for your use case.
能力评估
Purpose & Capability
The capability is coherent with the stated text-to-image purpose: the script reads a user-provided prompt, gets an authorization token from a documented localhost endpoint, calls the documented AutoGLM image-generation API, and prints the response.
Instruction Scope
Runtime instructions are narrow and user-directed: run the provided Python script with an image description and display the returned image URL. No role changes, prompt-injection instructions, unrelated automation, or broad local access were found.
Install Mechanism
The artifact consists of SKILL.md and a single Python script using standard-library modules only; metadata and static scan show no dependency install hooks or unusual installation behavior.
Credentials
Network access to AutoGLM and local access to http://127.0.0.1:53699/get_token are proportionate to the documented integration, but users should understand that prompts leave the local environment and an auth token is used.
Persistence & Privilege
No persistence, background worker, privilege escalation, file indexing, destructive action, or credential storage was found. The bearer token is fetched at execution time and sent as an Authorization header to the image API.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install autoglm-generate-image
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /autoglm-generate-image 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of autoglm-generate-image: - Generate images based on user text prompts using the AutoGLM API. - Automatically fetches API token from a local service; no manual configuration required. - Utilizes dynamic signature headers for secure API requests. - Returns the generated image as a Markdown image link for easy display.
元数据
Slug autoglm-generate-image
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Autoglm Generate Image 是什么?

使用 AutoGLM 文生图接口,根据用户输入的文字描述生成图片。当用户需要生成图片、文字转图片、AI绘图等场景时使用此 skill。 Token 通过本地服务 http://127.0.0.1:53699/get_token 自动获取,无需手动配置环境变量。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 30 次。

如何安装 Autoglm Generate Image?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install autoglm-generate-image」即可一键安装,无需额外配置。

Autoglm Generate Image 是免费的吗?

是的,Autoglm Generate Image 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Autoglm Generate Image 支持哪些平台?

Autoglm Generate Image 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Autoglm Generate Image?

由 flyfujian(@flyfujian)开发并维护,当前版本 v1.0.0。

💬 留言讨论