基礎文生圖 / 圖生圖, 支援最多 3 張參考圖
seedream-4-0-250828文生圖。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
model | string | 是 | 影像模型 ID, 如 `imagen-4.0-fast` / `imagen-4.0-standard` / `imagen-4.0-ultra` / `imagen-3.0-generate-002` |
prompt | string | 是 | 文本描述, 支援中英文 |
n | integer | 否 | 生成圖片數量 |
size | string | 否 | 影像尺寸 可選: 1024x1024 / 1792x1024 / 1024x1792 / 1536x1536 |
quality | string | 否 | 品質檔位 (部分模型支援) 可選: standard / hd |
response_format | string | 否 | 可選: url / b64_json |
curl https://api.router.ai/v1/images/generations \
-H "Authorization: Bearer sk-你的令牌" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-0-250828",
"prompt": "雪山日出,长焦压缩,胶片颗粒",
"size": "1024x1024"
}'使用參考圖和編輯指令生成修改後的圖片;支援 JSON 或檔案上傳。
必填參數: model, prompt, image
可用參數: model, prompt, image, images, image_url, n, response_format, stream, size, sequential_image_generation, sequential_image_generation_options
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
model | string | 是 | 必填,精確使用 seedream-4-0-250828。 |
prompt | string | 是 | 編輯指令,1~32000 字元;請直接說明需要修改的內容。 |
image | string | object | array | 是 | 必填參考圖。可用 HTTPS 地址、圖片 data URL、{"url":"..."}、{"image_url":"..."} 或上述元素陣列。1~14 張;與 images、image_url 三選一。 |
images | array | 否 | image 的可選別名;元素為地址、圖片 data URL 或含 url/image_url 的物件。不能同時傳 image。 |
image_url | string | object | array | 否 | image 的可選別名;不能與 image、images 同時傳入。 |
n | integer | 否 | 可選,預設 1,必須為正整數。多圖數量須在本型號支援範圍內。 |
response_format | string | 否 | 可選,url 或 b64_json。具體支援和返回形式以本型號為準。 |
stream | boolean | 否 | 僅支援省略或 false;本編輯入口不提供流式響應。 |
size | string | object | 否 | 可選輸出尺寸。沿用本型號圖片生成介面的格式及檔位;此處不擴充套件型號支援範圍。 |
sequential_image_generation | string | 否 | 可選,auto 或 disabled;顯式 disabled 不能與 n>1 同用。 |
sequential_image_generation_options | object | 否 | 可選順序多圖設定;啟用 auto 後生效。 |
curl https://api.router.ai/v1/images/edits \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4-0-250828",
"prompt": "将示例陶瓷杯改为蓝色,保留背景。",
"image": "https://example.invalid/reference.png",
"n": 1
}'