88API88API
使用指南AI 应用API 文档帮助支持
图像(Image)

Seedream 5.0 Pro 图像生成 API

支持能力

Seedream 5.0 Pro 支持文生图和图生图,使用 OpenAI Images API 兼容格式。 模型代码为 doubao-seedream-5-0-pro。

接口与鉴权

接口基地址:https://api.88api.ai

Authorization: Bearer $API_KEY
Content-Type: application/json
场景请求方法端点
文生图POST/v1/images/generations
公网参考图编辑POST/v1/images/generations
本地图片编辑POST/v1/images/edits

文生图

curl https://api.88api.ai/v1/images/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-pro",
    "prompt": "一只穿着红色唐装的小柴犬,国潮插画风格,喜庆温馨",
    "n": 1,
    "size": "1K",
    "quality": "1K",
    "response_format": "url"
  }'

图生图

公网参考图

单张参考图使用 image,多张参考图使用 images。参考图必须是公网 HTTP(S) URL, 两者合计最多 14 张。

curl https://api.88api.ai/v1/images/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedream-5-0-pro",
    "prompt": "保留人物主体和构图,将服装改成蓝色户外夹克",
    "image": "https://example.com/reference.jpg",
    "size": "2K",
    "quality": "2K",
    "response_format": "url"
  }'

多张参考图示例:

{
  "model": "doubao-seedream-5-0-pro",
  "prompt": "融合参考图中的主体和色彩",
  "images": [
    "https://example.com/reference-1.jpg",
    "https://example.com/reference-2.jpg"
  ],
  "size": "2K",
  "quality": "2K"
}

本地图片

本地图片使用 multipart 请求,每次上传一张:

curl https://api.88api.ai/v1/images/edits \
  -H "Authorization: Bearer $API_KEY" \
  -F "model=doubao-seedream-5-0-pro" \
  -F "prompt=把背景改成浅色摄影棚" \
  -F "image=@reference.png" \
  -F "size=2K" \
  -F "quality=2K" \
  -F "response_format=url"

请求参数

参数类型必填默认值说明
modelstring是—doubao-seedream-5-0-pro
promptstring是—文生图描述或图生图编辑指令
ninteger否11 到 4
sizestring否—1K 或 2K
qualitystring否—1K 或 2K
response_formatstring否urlurl 或 b64_json
imagestring / file否—单张公网参考图 URL,或编辑端点中的上传文件
imagesarray[string]否—公网参考图 URL 数组,最多 14 张

响应格式

{
  "created": 1760000000,
  "data": [
    {
      "url": "https://..."
    }
  ],
  "model": "doubao-seedream-5-0-pro"
}

response_format 为 url 时读取 data[].url;为 b64_json 时读取 data[].b64_json。