Skip to content

Seedream5.0 Flash 文生图 ​

接口 ​

POST /images/generations

完整 URL: https://modelfold.ai/v1/images/generations

鉴权:所有请求都需要 Authorization: Bearer <API_KEY> 请求头。

模型参数直接放在 JSON 请求体中,不要套 input。请求等待生成完成后返回 data[].url;支持的媒体模型也可使用 异步创建、轮询及回调。示例素材地址须替换为自己的公开可访问文件。计费及错误说明见 API 网关。

生成任务的输入参数

请求参数 ​

请求体 (application/json) ​

参数类型必填说明
modelstring是用于生成的模型名称。必填字段。
- 此端点必须使用 seedream/5-pro-text-to-image 默认值:"seedream/5-flash-text-to-image"。 可选值:seedream/5-flash-text-to-image。 示例:seedream/5-flash-text-to-image。
promptstring是本站网关要求传入 prompt,最长 2000 字。文本提示词,4–5000 字符。 minLength: 4. maxLength: 2000. 示例:A full-process cafe design tool for entrepreneurs and designers. It covers core needs including store layout, functional zoning, decoration style, equipment selection, and customer group adaptation, supporting integrated planning of "commercial attributes + aesthetic design." Suitable as a promotional image for a cafe design SaaS product, with a 16:9 aspect ratio.。
aspect_ratiostring是必填。图像的宽高比,决定其视觉形态。 可选值:1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 2:3 / 3:2 / 21:9。 示例:1:1。
sizestring否输出图片的分辨率档位 默认值:"1K"。 可选值:1K / 1.5K / 2K。 示例:1K。
output_formatstring否输出图像格式,请显式传入。 可选值:png / jpeg。 示例:png。
nsfw_checkerboolean否默认 false。为 false 时不额外进行内容过滤,结果由模型直接返回。

请求示例 ​

bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "seedream/5-flash-text-to-image",
  "prompt": "A full-process cafe design tool for entrepreneurs and designers. It covers core needs including store layout, functional zoning, decoration style, equipment selection, and customer group adaptation, supporting integrated planning of \"commercial attributes + aesthetic design.\" Suitable as a promotional image for a cafe design SaaS product, with a 16:9 aspect ratio.",
  "aspect_ratio": "1:1",
  "size": "1K"
}'
json
{
  "model": "seedream/5-flash-text-to-image",
  "prompt": "A full-process cafe design tool for entrepreneurs and designers. It covers core needs including store layout, functional zoning, decoration style, equipment selection, and customer group adaptation, supporting integrated planning of \"commercial attributes + aesthetic design.\" Suitable as a promotional image for a cafe design SaaS product, with a 16:9 aspect ratio.",
  "aspect_ratio": "1:1",
  "size": "1K"
}

响应 ​

200 — 生成完成。usage 返回实际计费明细;结果地址仅作结构示例。 ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.png"
    }
  ],
  "usage": {}
}

ModelFold — 一个 API,接入所有主流 AI 模型。