Skip to main content
POST
/
v1
/
images
/
generations
创建文生图任务
curl --request POST \
  --url https://www.anyfast.com.cn/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "doubao-seedream-4-5-251128",
  "prompt": "生成女孩和奶牛玩偶在游乐园开心地坐过山车的图片",
  "size": "1024x1024",
  "watermark": false,
  "seed": 123,
  "logo_info": {
    "add_logo": true,
    "position": 123,
    "language": 123,
    "opacity": 123
  }
}
'
{
  "id": "gen-abc123",
  "model": "doubao-seedream-4-5-251128",
  "status": "processing",
  "created_at": 1773130665
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID

Available options:
doubao-seedream-4-5-251128
Example:

"doubao-seedream-4-5-251128"

prompt
string
required

图片生成提示词。

Example:

"生成女孩和奶牛玩偶在游乐园开心地坐过山车的图片"

size
string

输出图片尺寸,支持的值因模型而异。

Example:

"1024x1024"

watermark
boolean
default:false

是否添加水印。

seed
integer

随机种子,用于复现结果。

logo_info
object

自定义 Logo 水印配置。

Response

任务已创建

id
string
Example:

"gen-abc123"

model
string
Example:

"doubao-seedream-4-5-251128"

status
string
Example:

"processing"

created_at
integer
Example:

1773130665