docs: make English the default docs language and fix link paths

This commit is contained in:
zhayujie
2026-05-31 17:52:22 +08:00
parent 126649f70f
commit 7bf4ef3d05
231 changed files with 8999 additions and 8974 deletions

View File

@@ -1,30 +1,30 @@
---
title: image-generation - 图像生成
description: 文生图 / 图生图 / 多图融合,支持多家厂商自动路由与回退
title: image-generation
description: Text-to-image / image-to-image / multi-image fusion with automatic multi-provider routing and fallback
---
通用的图像生成与编辑技能,支持 OpenAIGeminiSeedream火山方舟、Qwen百炼、MiniMax、LinkAI 共六家厂商。配好任意一家的 Key 即可使用,配多家可享受自动回退。
A general-purpose image generation and editing skill supporting six providers: OpenAI, Gemini, Seedream (Volcengine Ark), Qwen (DashScope), MiniMax, and LinkAI. Configure any one provider's key to start using it; configure multiple to enable automatic fallback.
## 支持的模型
## Supported Models
| 厂商 | 模型 / 别名 | 特点 |
| Provider | Models / Aliases | Notes |
| --- | --- | --- |
| OpenAI | `gpt-image-2``gpt-image-1` | 通用文生图,高质量,支持 `quality` 控制画质 |
| Gemini Nano Banana | `nano-banana-2``nano-banana-pro``nano-banana` | 对应 `gemini-3.1-flash``gemini-3-pro``gemini-2.5-flash` 的图像版本 |
| Seedream(火山方舟) | `seedream-5.0-lite``seedream-4.5` | 原生 2K4K最多 14 张图融合 |
| Qwen(百炼) | `qwen-image-2.0``qwen-image-2.0-pro` | 擅长中文排版和图文融合 |
| MiniMax | `image-01` | 简单快速 |
| LinkAI | 任意模型 | 统一网关,作为兜底 |
| OpenAI | `gpt-image-2`, `gpt-image-1` | General-purpose, high quality, supports `quality` parameter |
| Gemini Nano Banana | `nano-banana-2`, `nano-banana-pro`, `nano-banana` | Corresponds to the image variants of `gemini-3.1-flash`, `gemini-3-pro`, `gemini-2.5-flash` |
| Seedream (Volcengine Ark) | `seedream-5.0-lite`, `seedream-4.5` | Native 2K4K, up to 14 reference images for fusion |
| Qwen (DashScope) | `qwen-image-2.0`, `qwen-image-2.0-pro` | Strong with Chinese text rendering and text-image layouts |
| MiniMax | `image-01` | Fast and simple |
| LinkAI | Any model | Universal gateway, used as fallback |
## 模型选择
## Model Selection
默认走「自动路由 + 失败回退」:
By default, "auto routing + automatic fallback" is used:
1. `OpenAI → Gemini → Seedream → Qwen → MiniMax → LinkAI` 顺序选第一个已配置的厂商
2. 遇到 401、模型未开通、网络异常等错误时自动切到下一家
3. 用户在对话里指定模型时(如「用 seedream 画一只猫」),对应厂商会被提到最前优先尝试
1. Pick the first configured provider in the order `OpenAI → Gemini → Seedream → Qwen → MiniMax → LinkAI`
2. On errors such as 401, model not enabled, or network issues, automatically switch to the next provider
3. If the user specifies a model in the conversation (e.g. "use seedream to draw a cat"), the corresponding provider is promoted to the front
如需固定使用某个模型:
To pin a specific model:
```json
{
@@ -36,63 +36,63 @@ description: 文生图 / 图生图 / 多图融合,支持多家厂商自动路
}
```
## 配置 API Key
## Configuring API Keys
<Tip>
推荐通过 [Web 控制台](/channels/web) 的「模型管理」页面配置,配好的对话模型 Key 会被图像生成技能自动复用,无需重复配置。也可手动编辑配置文件或在对话中通过 `env_config` 工具临时设置。
It is recommended to configure providers from the "Model Management" page in the [Web console](/channels/web). Chat model keys configured there are automatically reused by the image generation skill — no need to set them twice. You can also edit the configuration file manually or temporarily set keys in a conversation using the `env_config` tool.
</Tip>
凭证统一复用主模型厂商的 Key
Credentials are shared with the main model providers:
| 字段 | 对应厂商 |
| Field | Provider |
| --- | --- |
| `openai_api_key` | OpenAI |
| `gemini_api_key` | Gemini |
| `ark_api_key` | 火山方舟(Seedream |
| `dashscope_api_key` | 阿里百炼(Qwen |
| `ark_api_key` | Volcengine Ark (Seedream) |
| `dashscope_api_key` | Alibaba DashScope (Qwen) |
| `minimax_api_key` | MiniMax |
| `linkai_api_key` | LinkAI |
## 开启和关闭
## Enabling and Disabling
技能会根据 API Key 自动调整状态:
The skill automatically adjusts its status based on API keys:
- **已配置 Key**Agent 收到画图请求时直接调用
- **未配置 Key**技能仍会出现在上下文中标记为「需要配置」Agent 会引导用户去配 Key
- **Key configured**: the Agent calls the skill directly when it receives a drawing request
- **Key not configured**: the skill still appears in context (marked as "needs configuration") — the Agent will guide the user to set up a key
如需手动控制:
To control it manually:
```text
/skill disable image-generation # 关闭
/skill enable image-generation # 重新开启
/skill disable image-generation # Disable
/skill enable image-generation # Re-enable
```
终端等价命令:`cow skill disable image-generation` / `cow skill enable image-generation`
Equivalent terminal commands: `cow skill disable image-generation` / `cow skill enable image-generation`.
## 参数
## Parameters
| 参数 | 类型 | 必填 | 默认 | 说明 |
| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `prompt` | string | | — | 图像描述 |
| `image_url` | string / list | | null | 编辑用的输入图,本地路径或 URL传列表为多图融合 |
| `quality` | string | | auto | `low` / `medium` / `high`,仅部分厂商支持 |
| `size` | string | | auto | `512` / `1K` / `2K` / `3K` / `4K`,或像素值如 `1024x1024` |
| `aspect_ratio` | string | | null | `1:1` / `3:2` / `2:3` / `16:9` / `9:16` / `21:9`Gemini 还支持 `1:4` / `4:1` / `1:8` / `8:1` |
| `prompt` | string | Yes | — | Image description |
| `image_url` | string / list | No | null | Input image for editing — local path or URL; pass a list for multi-image fusion |
| `quality` | string | No | auto | `low` / `medium` / `high`, supported only by some providers |
| `size` | string | No | auto | `512` / `1K` / `2K` / `3K` / `4K`, or pixel value like `1024x1024` |
| `aspect_ratio` | string | No | null | `1:1` / `3:2` / `2:3` / `16:9` / `9:16` / `21:9`; Gemini also supports `1:4` / `4:1` / `1:8` / `8:1` |
<Warning>
**质量越高、分辨率越大,耗时和成本越高。** 日常对话用默认(`auto`)或 `quality=low` + `size=1K` 即可,约 20 秒出图;做海报或明确要高清时再上 `high` + `2K/4K`,可能需要 15 分钟。
**Higher quality and larger size cost more and take longer.** For everyday conversations, use the defaults (`auto`) or `quality=low` + `size=1K` — about 20 seconds per image. For posters or when high resolution is explicitly requested, use `quality=high` + `size=2K/4K` — may take 15 minutes.
</Warning>
## 常见用法
## Common Use Cases
- **文生图**:根据描述生成插画、海报、图标、头像、分镜图等
- **图生图**:在已有图片上改风格、换元素、加装饰、加文字等
- **多图融合**:把多张参考图合成一张(换装、角色合影等)
- **Text-to-image**: generate illustrations, posters, icons, avatars, storyboards, etc. from a description
- **Image-to-image**: change styles, swap elements, add decorations or text on an existing image
- **Multi-image fusion**: combine multiple reference images into one (outfit swaps, character group photos, etc.)
<Note>
- bash 超时建议设 600 秒:单厂商 HTTP 超时 300 秒,脚本可能依次尝试多家
- 输入图片自动压缩到 4MB 以内、最长边不超过 4096px
- Gemini / Seedream / Qwen / MiniMax 不支持 `quality` 参数
- Seedream 默认出 2K 图;`seedream-5.0-lite` 支持到 3K`seedream-4.5` 支持到 4K
- Bash timeout should be set to 600 seconds: each provider has a 300-second HTTP timeout, and the script may try multiple providers sequentially
- Input images are automatically compressed to ≤ 4 MB with the longest edge ≤ 4096 px
- Gemini / Seedream / Qwen / MiniMax do not support the `quality` parameter
- Seedream defaults to 2K; `seedream-5.0-lite` supports up to 3K; `seedream-4.5` supports up to 4K
</Note>