跳转到主要内容
POST
/
generate
/
k
/
seedream-v4
SeeDream V4 图片生成
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/seedream-v4 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "image_resolution": "1K",
  "image_size": "square_hd",
  "max_images": 1,
  "prompt": "Draw the following system of binary linear equations and the corresponding solution steps on the blackboard: 5x + 2y = 26; 2x -y = 5.",
  "seed": 42
}'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
高质量图片生成模型,支持 1K/2K/4K 多种分辨率和多种画幅比例。

Authorizations

Authorization
string
header
required

请使用您的 API Token 进行认证

Body

application/json

Task parameters

prompt
string
required

提示词(必填,最大5000字符)- 图片生成的文本提示

Maximum length: 5000
Example:

"Draw the following system of binary linear equations and the corresponding solution steps on the blackboard: 5x + 2y = 26; 2x -y = 5."

image_resolution
enum<string>
default:1K

图片分辨率(可选,默认 1K)- 最终图片分辨率(像素级别)

可用选项:
1K,
2K,
4K
Example:

"1K"

image_size
enum<string>
default:square_hd

图片尺寸(可选,默认 square_hd)- 生成图片的尺寸

可用选项:
square,
square_hd,
portrait_4_3,
portrait_3_2,
portrait_16_9,
landscape_4_3,
landscape_3_2,
landscape_16_9,
landscape_21_9
Example:

"square_hd"

max_images
integer
default:1

最大图片数(可选,范围 1-6,默认1)- 单次运行生成的最大图片数量

Required range: 1 <= x <= 6
Example:

1

seed
integer

随机种子(可选)- 用于可复现性的随机种子

Example:

42

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"