Skip to main content
POST
/
images
/
generations
AI图片生成
curl --request POST \
  --url https://api.chatfire.site/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedream-3.0",
  "prompt": "3D魔童哪吒 c4d 搬砖 很开心, 很快乐, 精神抖擞, 背景是数不清的敖丙虚化 视觉冲击力强 大师构图 色彩鲜艳丰富 吸引人 背景用黄金色艺术字写着\"搬砖挣钱\" 冷暖色对比",
  "url": "<string>",
  "n": 1,
  "response_format": "url",
  "size": "1024x1024"
}'
{
  "task_id": "<string>",
  "status": "pending",
  "created_at": 123,
  "model": "seedream-3.0",
  "prompt": "<string>",
  "response_format": "url",
  "images": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "oss_url": "<string>",
      "width": 123,
      "height": 123,
      "format": "png",
      "expires_at": 123
    }
  ],
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}

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

使用的AI模型名称

Available options:
seedream-3.0,
jimeng,
keling,
dall-e-3
Example:

"seedream-3.0"

prompt
string
required

图片生成提示词,支持文生图;结合url参数可实现图生图

Example:

"3D魔童哪吒 c4d 搬砖 很开心, 很快乐, 精神抖擞, 背景是数不清的敖丙虚化 视觉冲击力强 大师构图 色彩鲜艳丰富 吸引人 背景用黄金色艺术字写着\"搬砖挣钱\" 冷暖色对比"

url
string<uri>

参考图片URL,用于图生图功能,与prompt结合使用

n
integer
default:1

生成图片的数量

Required range: 1 <= x <= 4
response_format
enum<string>
default:url

响应格式类型

Available options:
url
size
enum<string>
default:1024x1024

图片尺寸

Available options:
1024x1024,
1024x1792,
1792x1024,
1328x1328

Response

Successful response

task_id
string

任务唯一标识符

status
enum<string>

任务状态

Available options:
pending,
processing,
completed,
failed
created_at
integer

任务创建时间戳

model
enum<string>

使用的AI模型

Available options:
seedream-3.0,
jimeng,
keling,
dall-e-3
prompt
string

原始提示词

response_format
enum<string>

响应格式类型

Available options:
url,
b64_json,
oss_url
images
object[]

生成的图片列表(仅在completed状态时返回)

error
object

错误信息(仅在failed状态时返回)