同步方式生成图片。
| 参数名 | 必填 | 说明 | 示例 |
|---|---|---|---|
| Authorization | 是 | 鉴权 Token。格式:Bearer SENSEAUDIO_API_KEY | Bearer sk-123456… |
| Content-Type | 是 | 内容类型。固定为 application/json | application/json |
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| model | string | 是 | 模型,目前支持senseaudio-image-1.0-260319/doubao-seedream-5-0-260128 |
| prompt | string | 是 | 提示词,不超过 2000 码位 |
| reference | string | 否 | 参考图,需要传入图片的 URL,可以使用 Data URI 传入数据 |
| seed | int | 否 | 生成图片时使用的种子 |
| size | string | 否 | 生成图片的尺寸,不传入参考图时此项必填,可选值见下表 |
| 模型 | 可选尺寸 |
|---|---|
| senseaudio-image-1.0-260319 | 1328x1328 1664x928 928x1664 1472x1140 1140x1472 1584x1056 1056x1584 |
| doubao-seedream-5-0-260128 | 2048x2048 2304x1728 1728x2304 2848x1600 1600x2848 2496x1664 1664x2496 3136x1344 3072x3072 3456x2592 2592x3456 4096x2304 2304x4096 2496x3744 3744x2496 4704x2016 |
| 参数名 | 类型 | 描述 |
|---|---|---|
| url | string | 生成图片的 URL |
{
"url": "https://example.com/image.png"
}curl -X POST "https://api.senseaudio.cn/v1/image/sync" \
-H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "灯塔与花海",
"model": "senseaudio-image-1.0-260319",
"size": "1328x1328"
}'