POST /v1/images/generations(与文生图相同端点,额外传入 image 参数)https://moyunapi.comAuthorization: Bearer sk-xxximage 参数支持两种格式:data:image/<格式>;base64,<编码>,如 data:image/png;base64,iVBOR...| 要求 | 说明 |
|---|---|
| 图片格式 | jpeg、png、webp、bmp、tiff、gif、heic、heif |
| 宽高比范围 | [1/16, 16] |
| 宽高长度 | > 14px |
| 文件大小 | ≤ 30MB |
| 总像素 | ≤ 6000×6000 (36MP) |
image 参数需通过 extra_body 传递。response_format 为 url 时,URL 有效期 24 小时。curl --location 'https://moyunapi.com/v1/images/generations' \
--header 'Accept;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "Doubao-Seedream-5.0-lite",
"prompt": "将这张照片转换为水彩画风格,保持人物姿态不变,色彩柔和梦幻",
"image": "https://cdn.example.com/reference-photo.jpg",
"size": "2K",
"response_format": "url",
"output_format": "png",
"watermark": false
}'{
"model": "Doubao-Seedream-5.0-lite",
"created": 1757321139,
"data": [
{
"url": "https://files.moyunapi.com/seedream/i2i_001.png",
"size": "2048x2048"
}
],
"usage": {
"generated_images": 1,
"output_tokens": 16384,
"total_tokens": 16384
}
}