EvoLink Cheapest Image
Generate images via the EvoLink z-image-turbo API.
API Endpoint
- - Base: INLINECODE0
- Submit: INLINECODE1
- Poll: INLINECODE2
Step 1 — Submit Task
CODEBLOCK0
Optional field: "seed": <INT>
| Parameter | Values |
|---|
| size | 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 1:2, 2:1 |
| nsfw_check |
true /
false (default
false) |
| seed | any integer (optional, for reproducibility) |
Step 2 — Poll for Result
INLINECODE7 — poll every 10 s, up to 72 retries (~12 min).
Wait until status is completed or failed.
Step 3 — Download & Output
Download the URL from results[0]. Auto-detect format from URL (webp/png/jpg). Save as evolink-<TIMESTAMP>.<ext>.
CRITICAL SECURITY: Before passing <OUTPUT_FILE> to shell commands, sanitize it:
- - Strip all shell metacharacters: INLINECODE14
- Ensure valid extension (
.webp, .png, .jpg, .jpeg) - Fallback to
evolink-<timestamp>.webp if empty
Print MEDIA:<absolute_path> for OC auto-attach.
Reference Implementations
| Platform | File |
|---|
| Python (all platforms, zero deps) | INLINECODE21 |
| PowerShell 5.1+ (Windows) |
{baseDir}/references/powershell.md |
| curl + bash (Unix/macOS) |
{baseDir}/references/curl_heredoc.md |
API Key
- -
EVOLINK_API_KEY env var (required) - Get key: https://evolink.ai
Triggers
- - Chinese: "生图:xxx" / "出图:xxx" / "生成图片:xxx"
- English: "generate image: xxx" / "generate a picture: xxx"
Treat the text after the colon as prompt, use default size 1:1, generate immediately.
Notes
- - Print
MEDIA:<path> for OC auto-attach — no extra delivery logic needed. - Image saved locally (format auto-detected from URL). URL expires ~24h but local file persists.
EvoLink 最经济图片生成
通过 EvoLink z-image-turbo API 生成图片。
API 端点
- - 基础地址:https://api.evolink.ai/v1
- 提交任务:POST /images/generations
- 轮询结果:GET /tasks/{id}
第一步 — 提交任务
json
{
model: z-image-turbo,
prompt: <用户提示词>,
size: <尺寸>,
nsfw_check:
}
可选字段:seed: <整数>
| 参数 | 可选值 |
|---|
| size | 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 1:2, 2:1 |
| nsfw_check |
true / false(默认 false) |
| seed | 任意整数(可选,用于结果复现) |
第二步 — 轮询结果
GET /tasks/{id} — 每 10 秒轮询一次,最多重试 72 次(约 12 分钟)。
等待 status 变为 completed 或 failed。
第三步 — 下载与输出
从 results[0] 下载 URL。自动识别 URL 中的格式(webp/png/jpg)。保存为 evolink-<时间戳>.<扩展名>。
关键安全措施: 在将 <输出文件> 传递给 shell 命令前,请进行清理:
- - 去除所有 shell 元字符:tr -cd A-Za-z0-9._-
- 确保有效的扩展名(.webp、.png、.jpg、.jpeg)
- 若为空则回退为 evolink-<时间戳>.webp
输出 MEDIA:<绝对路径> 用于 OC 自动附加。
参考实现
| 平台 | 文件 |
|---|
| Python(全平台,零依赖) | {baseDir}/references/python.md |
| PowerShell 5.1+(Windows) |
{baseDir}/references/powershell.md |
| curl + bash(Unix/macOS) | {baseDir}/references/curl_heredoc.md |
API 密钥
- - EVOLINKAPIKEY 环境变量(必需)
- 获取密钥:https://evolink.ai
触发词
- - 中文:生图:xxx / 出图:xxx / 生成图片:xxx
- 英文:generate image: xxx / generate a picture: xxx
将冒号后的文本视为 prompt,使用默认尺寸 1:1,立即生成。
注意事项
- - 输出 MEDIA:<路径> 用于 OC 自动附加 — 无需额外传递逻辑。
- 图片保存在本地(格式从 URL 自动识别)。URL 约 24 小时过期,但本地文件持久保存。