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-5-0-260128",
  "prompt": "生成女孩和奶牛玩偶在游乐园开心地坐过山车的图片",
  "size": "2048x2048",
  "watermark": false,
  "seed": 123,
  "logo_info": {
    "add_logo": true,
    "position": 123,
    "language": 123,
    "opacity": 123
  },
  "tools": [
    {
      "type": "web_search"
    }
  ]
}
'
{
  "model": "doubao-seedream-5-0-260128",
  "created": 1775029815,
  "data": [
    {
      "url": "https://ark-content-generation-v2-cn-beijing.example.com/image.png",
      "size": "2048x2048"
    }
  ],
  "usage": {
    "generated_images": 1,
    "output_tokens": 16384,
    "total_tokens": 16384
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.anyfast.com.cn/llms.txt

Use this file to discover all available pages before exploring further.

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-5-0-260128
Example:

"doubao-seedream-5-0-260128"

prompt
string
required

图片生成提示词。

Example:

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

size
enum<string>

输出图片尺寸。

Available options:
2048x2048,
1728x2304,
2304x1728,
2848x1600,
1600x2848,
2496x1664,
1664x2496,
3136x1344,
3072x3072,
2592x3456,
3456x2592,
4096x2304,
2304x4096,
2496x3744,
3744x2496,
4704x2016
Example:

"2048x2048"

watermark
boolean
default:false

是否添加水印。

seed
integer

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

logo_info
object

自定义 Logo 水印配置。

tools
object[]

模型可使用的工具,当前支持联网搜索。

Response

图片生成成功

model
string

使用的模型。

Example:

"doubao-seedream-5-0-260128"

created
integer

创建时间戳(Unix 秒)。

Example:

1775029815

data
object[]

生成的图片列表。

usage
object

Token 用量。