← Back to Skills Marketplace
flyfujian

Autoglm Generate Image

by flyfujian · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
30
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install autoglm-generate-image
Description
使用 AutoGLM 文生图接口,根据用户输入的文字描述生成图片。当用户需要生成图片、文字转图片、AI绘图等场景时使用此 skill。 Token 通过本地服务 http://127.0.0.1:53699/get_token 自动获取,无需手动配置环境变量。
README (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)
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install autoglm-generate-image
  3. After installation, invoke the skill by name or use /autoglm-generate-image
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug autoglm-generate-image
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Autoglm Generate Image?

使用 AutoGLM 文生图接口,根据用户输入的文字描述生成图片。当用户需要生成图片、文字转图片、AI绘图等场景时使用此 skill。 Token 通过本地服务 http://127.0.0.1:53699/get_token 自动获取,无需手动配置环境变量。 It is an AI Agent Skill for Claude Code / OpenClaw, with 30 downloads so far.

How do I install Autoglm Generate Image?

Run "/install autoglm-generate-image" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Autoglm Generate Image free?

Yes, Autoglm Generate Image is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Autoglm Generate Image support?

Autoglm Generate Image is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Autoglm Generate Image?

It is built and maintained by flyfujian (@flyfujian); the current version is v1.0.0.

💬 Comments