← Back to Skills Marketplace
enihsago

Image Gen Cheap

by enihsago · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
120
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install image-gen-cheap
Description
低成本图片生成与编辑。使用老张 API,最低 $0.01/张。支持文生图、图片编辑。触发词:生成图片、画图、AI 作图、文生图、图片编辑。
README (SKILL.md)

Image Gen Cheap - 低成本图片生成

快速开始

1. 获取 API Token

访问 https://api.laozhang.ai/register/?aff_code=lfa0 注册,在控制台获取 token。新注册自动获得 $0.5 开发测试额度。

保存 token:

echo "sk-your-token" > ~/.laozhang_api_token

2. 文生图

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

# 指定比例(2:3竖版/3:2横版/1:1正方形)
python scripts/generate_image.py "夕阳下的海滩" --ratio 3:2

# 保存到指定路径
python scripts/generate_image.py "可爱的小狗" --output dog.png

# 使用其他模型
python scripts/generate_image.py "未来城市" --model gpt-4o-image

3. 图片编辑

# 基础编辑
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" "将两张图片融合"

模型与价格

文生图模型

模型 模型ID 价格 返回格式
Sora Image sora_image $0.01/张 URL
GPT-4o Image gpt-4o-image $0.01/张 URL
Nano Banana gemini-2.5-flash-image $0.025/张 base64
Nano Banana2 gemini-3.1-flash-image-preview $0.03/张 base64
Nano Banana Pro gemini-3-pro-image-preview $0.05/张 base64

图片编辑模型

模型 模型ID 价格 返回格式
GPT-4o Image gpt-4o-image $0.01/张 URL
Sora Image sora_image $0.01/张 URL
Nano Banana gemini-2.5-flash-image $0.025/张 base64

推荐:默认使用 sora_image(文生图)和 gpt-4o-image(图片编辑),都是 $0.01/张且返回 URL。

预设风格

  • 卡通 - 迪士尼卡通风格
  • 油画 - 古典油画风格
  • 水墨 - 中国水墨画风格
  • 赛博朋克 - 霓虹灯光效果
  • 素描 - 铅笔素描风格
  • 水彩 - 水彩画风格

参数说明

generate_image.py

--model, -m    使用的模型(默认: sora_image)
--ratio, -r    图片比例:2:3/3:2/1:1(仅 sora_image 支持)
--output, -o   保存图片到指定路径
--token, -t    指定 API token
--verbose, -v  显示详细信息
--json         输出完整 API 响应
--no-save      不保存图片(仅显示URL)

edit_image.py

--model, -m    使用的模型(默认: gpt-4o-image)
--style, -s    预设风格(卡通/油画/水墨/赛博朋克/素描/水彩)
--output, -o   保存图片到指定路径
--token, -t    指定 API token
--verbose, -v  显示详细信息
--json         输出完整 API 响应
--no-save      不保存图片(仅显示URL)

依赖

pip install requests

注意事项

  1. 返回 URL 的模型(sora_image / gpt-4o-image)可直接发送到飞书等平台
  2. 返回 base64 的模型会自动解码保存到本地
  3. 建议控制在 10 请求/分钟以内
Usage Guidance
This skill appears to do what it claims (cheap image gen/edit via LaoZhang). Before installing or running it: 1) Verify the LaoZhang service (https://api.laozhang.ai) is trustworthy for your data — prompts and image URLs are sent to that third party. 2) Be aware the scripts read a local token file (~/.laozhang_api_token) or accept --token; the skill manifest does not declare this credential — consider storing tokens securely and not reusing high‑privilege keys. 3) The scripts download images from arbitrary URLs you provide — avoid passing internal or sensitive endpoints to prevent unintended network access (SSRF risk). 4) Check billing/pricing and the affiliate link in the README (aff_code) if you care about referral behavior. 5) If you want stronger guarantees, request the author add an explicit primary credential field to the manifest, support reading a token from a secure env var or secret store, and document exactly what is transmitted to the LaoZhang API. If you trust the LaoZhang provider and accept the token/storage model, this skill is coherent and usable.
Capability Analysis
Type: OpenClaw Skill Name: image-gen-cheap Version: 1.0.1 The skill provides a legitimate interface for image generation and editing via the third-party 'LaoZhang API'. The included Python scripts (generate_image.py and edit_image.py) are well-implemented, using standard libraries like requests and argparse to interact with the API. They include proper filename sanitization to prevent path traversal and store API tokens in a dedicated file (~/.laozhang_api_token) as is common for CLI tools. While the documentation (SKILL.md, README.md) includes an affiliate registration link, there is no evidence of malicious intent, data exfiltration, or unauthorized execution.
Capability Assessment
Purpose & Capability
Name/description (low-cost image generation/editing via LaoZhang) matches the included scripts and SKILL.md. The scripts call the LaoZhang endpoint (api.laozhang.ai) and implement text->image and image-edit functionality as described. Minor manifest mismatch: skill.json/version and registry version differ (1.0.0 vs 1.0.1) but this is cosmetic.
Instruction Scope
SKILL.md and README instruct the user to store an API token in ~/.laozhang_api_token or pass it via --token; the scripts read that file. The scripts make outbound network requests to the LaoZhang API and will also download user-supplied image URLs. This behavior is expected for an image-edit/ generation skill, but it means running the skill will transmit prompts and (potentially) image URLs to a third party and fetch arbitrary URLs provided by user input (possible SSRF if untrusted inputs are used).
Install Mechanism
There is no automated install spec; this is essentially instruction + small Python scripts. The only dependency is 'requests' (documented). No remote archives or executable installs are pulled automatically.
Credentials
The registry metadata lists no required credentials, but the runtime instructions and both scripts require an API token (either via --token or the file ~/.laozhang_api_token). The skill therefore needs a secret (LaoZhang API token) even though no primary credential is declared in the manifest. Storing the token in a plaintext file in the home directory (as suggested) is functional but has confidentiality implications — the skill will read that file if present.
Persistence & Privilege
Skill does not request always:true, does not modify other skills or system configuration, and does not create persistent system services. It runs as CLI scripts and only writes files under the current working directory (generated-images) unless a different path is provided.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install image-gen-cheap
  3. After installation, invoke the skill by name or use /image-gen-cheap
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- 新用户注册后将自动获得 $0.5 开发测试额度(在快速开始部分新增说明)。 - 其余内容无变化。
v1.0.0
Initial release. Low-cost image generation via LaoZhang API (/bin/zsh.01/img). Supports text-to-image and image editing.
Metadata
Slug image-gen-cheap
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Image Gen Cheap?

低成本图片生成与编辑。使用老张 API,最低 $0.01/张。支持文生图、图片编辑。触发词:生成图片、画图、AI 作图、文生图、图片编辑。 It is an AI Agent Skill for Claude Code / OpenClaw, with 120 downloads so far.

How do I install Image Gen Cheap?

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

Is Image Gen Cheap free?

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

Which platforms does Image Gen Cheap support?

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

Who created Image Gen Cheap?

It is built and maintained by enihsago (@enihsago); the current version is v1.0.1.

💬 Comments