← 返回 Skills 市场
enihsago

Laozhangapi Image

作者 enihsago · GitHub ↗ · v1.1.1 · MIT-0
cross-platform ✓ 安全检测通过
140
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install laozhangapi-image
功能描述
使用老张 API 生成和编辑图片,最低 $0.01/张。支持文生图、图片编辑、多图融合、多种比例。触发词:生成图片、画图、AI作图、文生图、图片编辑、换背景、风格转换、Sora生图。
使用说明 (SKILL.md)

老张 API 图片生成

低成本高质量图片生成与编辑。

快速开始

1. 配置 Token

echo "sk-xxx" > ~/.laozhang_api_token

访问 老张 API 注册获取 token。新注册自动获得 $0.5 测试额度。

2. 文生图

# 默认模型(sora_image,$0.01/张,返回URL)
python scripts/generate_image.py "一只可爱的猫咪在花园里"

# 指定比例(仅 sora_image 支持)
python scripts/generate_image.py "夕阳海滩" --ratio 3:2

# 保存到本地
python scripts/generate_image.py "可爱小狗" --output dog.png

3. 图片编辑

# 基础编辑(默认 gpt-4o-image,$0.01/张)
python scripts/edit_image.py "https://example.com/cat.jpg" "把毛色改成彩虹色"

# 预设风格
python scripts/edit_image.py "https://example.com/photo.jpg" --style 卡通

# 多图融合
python scripts/edit_image.py "https://a.jpg,https://b.jpg" "融合两张图"

模型选择

用途 推荐模型 价格 返回
文生图(默认) sora_image $0.01/张 URL
图片编辑(默认) gpt-4o-image $0.01/张 URL
高质量/4K gemini-3-pro-image-preview $0.05/张 base64
性价比 gemini-2.5-flash-image $0.025/张 base64

详细模型对比见 references/models.md

预设风格

卡通、油画、水墨、赛博朋克、素描、水彩

参数

generate_image.py

--model, -m    模型选择(默认: sora_image)
--ratio, -r    比例:2:3/3:2/1:1(仅 sora_image)
--output, -o   保存路径
--no-save      不保存,仅显示URL

edit_image.py

--model, -m    模型选择(默认: gpt-4o-image)
--style, -s    预设风格
--output, -o   保存路径
--no-save      不保存,仅显示URL

常见示例

examples/usage.md

注意

  • URL 返回的模型可直接发送到飞书
  • base64 返回的模型会自动保存到本地
  • 建议控制在 10 请求/分钟
安全使用建议
This skill appears coherent and implements a straightforward client for laozhang.ai. Before installing, verify you trust the API provider (https://api.laozhang.ai and its registration link). Be aware it expects a token stored at ~/.laozhang_api_token (or passed with --token); avoid placing highly privileged secrets there and consider setting file permissions (chmod 600). The scripts will make outbound requests to the API and to any image URLs you pass or that the API returns, and will save files to ~/Pictures/laozhang by default. Ensure the requests package is installed. If you are unsure about the provider, review the two Python scripts (they are short and readable) and consider using a throwaway API token or revoking the token if you no longer trust the service.
功能分析
Type: OpenClaw Skill Name: laozhangapi-image Version: 1.1.1 The skill bundle provides a legitimate interface for the 'Laozhang API' to generate and edit images. The scripts (scripts/generate_image.py and scripts/edit_image.py) handle API authentication via a local token file (~/.laozhang_api_token) and save resulting images to a local directory, which is consistent with the stated purpose. There is no evidence of data exfiltration, malicious execution, or harmful prompt injection; the affiliate link in SKILL.md is a standard commercial practice and not a security risk.
能力评估
Purpose & Capability
Name/description match the included scripts and SKILL.md: both scripts call https://api.laozhang.ai/v1/chat/completions to generate or edit images. Required credentials (a user API token) are used only for that API, which is proportional to the stated purpose.
Instruction Scope
SKILL.md instructs the user to store a token in ~/.laozhang_api_token and to run the provided scripts; the scripts read only that token (or accept --token), call the laozhang API, download returned image URLs or decode base64, and save images to ~/Pictures/laozhang by default. The scripts also perform requests.get on any image URLs supplied or returned (expected for image fetching) — be aware this results in outbound network requests to arbitrary URLs you provide or that the API returns.
Install Mechanism
No install spec — instruction-only with small helper scripts. The only dependency is the requests Python package (the scripts exit with a clear message if missing). No third-party downloads, installers, or unusual install locations are used.
Credentials
No environment variables are declared, and no unrelated secrets are requested. The skill relies on a token stored in ~/.laozhang_api_token (or --token). That file-based token is appropriate for the API, but the metadata did not declare this file requirement explicitly — not malicious, but worth noting.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system-wide settings, and simply reads a token file and writes image files under the user's home Pictures directory. This level of access is proportional to its function.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install laozhangapi-image
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /laozhangapi-image 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
默认模型改为 gemini-3.1-flash-image-preview
v1.1.0
重构 skill 结构:精简 SKILL.md,添加 references/ 和 examples/,修复脚本 bug
v1.0.0
laozhangapi-image 1.0.0 初始版本发布。 - 支持通过老张 API 生成和编辑图片,涵盖多种主流文生图和图片编辑模型(如 Sora Image、Nano Banana2、Nano Banana Pro 等)。 - 实现了文生图、图片编辑、多图融合、多种图片比例选择等多功能用法。 - 提供便捷的命令行脚本(generate_image.py、edit_image.py),并支持详细参数配置与多种输出格式(URL/base64)。 - 附带预设图片风格选项(如卡通、油画、水墨、赛博朋克等)。 - 提供详细的模型参数、计费说明与快速上手指南。
元数据
Slug laozhangapi-image
版本 1.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Laozhangapi Image 是什么?

使用老张 API 生成和编辑图片,最低 $0.01/张。支持文生图、图片编辑、多图融合、多种比例。触发词:生成图片、画图、AI作图、文生图、图片编辑、换背景、风格转换、Sora生图。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 140 次。

如何安装 Laozhangapi Image?

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

Laozhangapi Image 是免费的吗?

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

Laozhangapi Image 支持哪些平台?

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

谁开发了 Laozhangapi Image?

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

💬 留言讨论