Laozhangapi Image

v1.1.1

使用老张 API 生成和编辑图片,最低 $0.01/张。支持文生图、图片编辑、多图融合、多种比例。触发词:生成图片、画图、AI作图、文生图、图片编辑、换背景、风格转换、Sora生图。

0· 20·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk97277ybzxp66f1bh48q8k99bn8406tf

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

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
高质量/4Kgemini-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 请求/分钟

Files

5 total
Select a file
Select a file to preview.

Comments

Loading comments…