AIAPIAIAPI API

Seedream v5.0 Pro Edit

Model ID bytedance/seedream-v5.0-pro/edit

概览

支持 1 至 10 张参考图片及可选透明 PNG 输出的图像编辑模型。

ByteDance · image-to-image

接口

POST /v1/images/generations/async

认证

Authorization: Bearer <AIAPIAIAPI_API_KEY>

请求体

参数类型必填可空默认值约束说明
modelstring是否-values: bytedance/seedream-v5.0-pro/edit用于路由请求的模型 ID。
promptstring是否--正向提示词,建议少于 600 个英文单词。
imagesarray是否-min_items: 1; max_count: 10; accepts: URL, Base64 data URL1 至 10 张参考图片,支持 JPEG、PNG、WEBP、BMP、TIFF、GIF、HEIC、HEIF;供应商对第一张参考图免费,其余另行收费。
sizestring否否`2048x2048`values: 2048x2048, 2368x1776, 1776x2368, 2816x1584, 1584x2816, 2496x1664, 1664x2496, 3136x1344, 1024x1024, 1536x1536, 1776x1328, 1328x1776, 2048x1152, 1152x2048从支持的预设中选择输出尺寸;供应商对不超过 261 万像素的输出按 1.5K 档收费,更大的尺寸按 2K 档收费。
thinkingstring否否`enabled`values: enabled, disabled启用或禁用提示词优化阶段的深度思考。
prompt_optimization_modestring否否`standard`values: standard, fast提示词优化模式,fast 可降低延迟;两种模式的供应商价格相同。
output_formatstring否否`jpeg`values: jpeg, png输出文件格式。
backgroundstring否否`opaque`values: opaque, transparent透明输出要求 output_format=png,并且恰好提供一张带 alpha 通道的 PNG 来源图片;输入图片格式和 alpha 通道由供应商校验。

model

类型:string · 必填:是 · 可空:否

用于路由请求的模型 ID。

prompt

类型:string · 必填:是 · 可空:否

正向提示词,建议少于 600 个英文单词。

images

类型:array · 必填:是 · 可空:否

1 至 10 张参考图片,支持 JPEG、PNG、WEBP、BMP、TIFF、GIF、HEIC、HEIF;供应商对第一张参考图免费,其余另行收费。

size

类型:string · 必填:否 · 可空:否

从支持的预设中选择输出尺寸;供应商对不超过 261 万像素的输出按 1.5K 档收费,更大的尺寸按 2K 档收费。

thinking

类型:string · 必填:否 · 可空:否

启用或禁用提示词优化阶段的深度思考。

prompt_optimization_mode

类型:string · 必填:否 · 可空:否

提示词优化模式,fast 可降低延迟;两种模式的供应商价格相同。

output_format

类型:string · 必填:否 · 可空:否

输出文件格式。

background

类型:string · 必填:否 · 可空:否

透明输出要求 output_format=png,并且恰好提供一张带 alpha 通道的 PNG 来源图片;输入图片格式和 alpha 通道由供应商校验。

请求示例

curl --request POST \
  --url https://aiapiaiapi.com/v1/images/generations/async \
  --header 'Authorization: Bearer $AIAPIAIAPI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
      "model": "bytedance/seedream-v5.0-pro/edit",
      "prompt": "A cinematic camera movement through a forest",
      "images": ["https://example.com/reference.jpg"]
    }'

JSON

{
  "model": "bytedance/seedream-v5.0-pro/edit",
  "prompt": "A cinematic camera movement through a forest",
  "images": ["https://example.com/reference.jpg"]
}

响应

{
  "code": "success",
  "message": "",
  "data": { "task_id": "image_01K2ABC123" }
}

任务状态

使用创建响应中的 task_id 查询:

GET /v1/images/generations/async/{task_id}

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "image_01K2ABC123",
    "status": "SUCCESS",
    "progress": "100%",
    "outputs": ["https://cdn.example.com/images/image_01K2ABC123.png"],
    "start_time": 1786960805,
    "finish_time": 1786960900,
    "submit_time": 1786960800,
    "fail_reason": ""
  }
}

错误响应

参数校验错误返回 HTTP 400,并包含稳定的错误代码。

{
  "code": "unsupported_parameter",
  "message": "The parameter is not supported by this model.",
  "data": null
}

文档索引

获取完整文档索引:

https://aiapiaiapi.com/llms.txt

使用该文件发现所有可用的 API 文档。