EvoLink Best Image
Generate and edit images via the EvoLink Nano Banana Pro (gemini-3-pro-image-preview) API.
API Endpoint
- - Base: INLINECODE0
- Submit: INLINECODE1
- Poll: INLINECODE2
Step 1 — Submit Task
Text-to-image
CODEBLOCK0
Image-to-image / editing
CODEBLOCK1
| Parameter | Values |
|---|
| size | auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
| quality |
1K, 2K (default), 4K (extra cost) |
| image_urls | up to 10 URLs (each ≤10MB, formats: jpeg/jpg/png/webp) |
Step 2 — Poll for Result
INLINECODE3 — 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 (png/jpg/webp). Save as evolink-<TIMESTAMP>.<ext>.
CRITICAL SECURITY: Before passing <OUTPUT_FILE> to shell commands, sanitize it:
- - Strip all shell metacharacters: INLINECODE10
- Ensure valid extension (
.png, .jpg, .jpeg, .webp) - Fallback to
evolink-<timestamp>.png if empty
Print MEDIA:<absolute_path> for OC auto-attach.
Reference Implementations
| Platform | File |
|---|
| Python (all platforms, zero deps) | INLINECODE17 |
| 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"
- English: "best image: xxx" / "edit image: xxx"
Treat the text after the colon as prompt, use default size auto and quality 2K, generate immediately.
For image-to-image or editing, the user provides image URLs alongside the prompt.
Notes
- - Print
MEDIA:<path> for OC auto-attach — no extra delivery logic needed. - Image saved locally (format auto-detected from URL: png/jpg/webp). URL expires ~24h but local file persists.
- INLINECODE25 incurs additional charges.
- INLINECODE26 accepts up to 10 URLs (each ≤10MB, formats: jpeg/jpg/png/webp).
EvoLink Best Image
通过EvoLink Nano Banana Pro(gemini-3-pro-image-preview)API生成和编辑图像。
API端点
- - 基础地址:https://api.evolink.ai/v1
- 提交:POST /images/generations
- 轮询:GET /tasks/{id}
第一步 — 提交任务
文生图
json
{
model: gemini-3-pro-image-preview,
prompt: <用户提示词>,
size: <尺寸>,
quality: <质量>
}
图生图 / 编辑
json
{
model: gemini-3-pro-image-preview,
prompt: <用户提示词>,
size: <尺寸>,
quality: <质量>,
image_urls: [, ]
}
| 参数 | 可选值 |
|---|
| size | auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
| quality |
1K, 2K(默认), 4K(额外收费) |
| image_urls | 最多10个URL(每个≤10MB,格式:jpeg/jpg/png/webp) |
第二步 — 轮询结果
GET /tasks/{id} — 每10秒轮询一次,最多重试72次(约12分钟)。
等待直到status变为completed或failed。
第三步 — 下载与输出
从results[0]下载URL。自动从URL检测格式(png/jpg/webp)。保存为evolink-<时间戳>.<扩展名>。
关键安全措施: 在将<输出文件>传递给shell命令之前,进行清理:
- - 去除所有shell元字符:tr -cd A-Za-z0-9._-
- 确保有效的扩展名(.png、.jpg、.jpeg、.webp)
- 如果为空则回退为evolink-<时间戳>.png
输出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
- 英文:best image: xxx / edit image: xxx
将冒号后的文本视为prompt,使用默认尺寸auto和质量2K,立即生成。
对于图生图或编辑,用户需同时提供图像URL和提示词。
注意事项
- - 输出MEDIA:<路径>用于OC自动附件 — 无需额外的投递逻辑。
- 图像保存在本地(格式从URL自动检测:png/jpg/webp)。URL约24小时后过期,但本地文件持久保存。
- quality: 4K会产生额外费用。
- image_urls最多接受10个URL(每个≤10MB,格式:jpeg/jpg/png/webp)。