🎉 每个积分包首次购买都有免费生成好礼 —— 最高 20 个 Lite 视频 + 20 张 Lite 图片 + 10 个 Medium 视频 + 10 张 Pro 图片 + 2 个 Pro 视频。

立即开始

图像生成

POST /v1/images/generations 创建图像任务并立即返回。轮询共享任务端点以获取结果。

shell
curl -sS -X POST https://api.dreamutopia.net/v1/images/generations \
  -H "Authorization: Bearer $DREAMUTOPIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pro",
    "prompt": "a red fox in fresh snow, cinematic lighting",
    "resolution": "2k",
    "aspect_ratio": "16:9"
  }'
response 202
{ "id": "3f2b…", "type": "image", "status": "queued", "created_at": "2026-10-24T12:00:00Z" }

字段

  • model

    价值观
    lite, pro
  • prompt

    价值观
    必填,不能为空,最多 8,000 个字符
  • resolution

    价值观
    2k、4k;lite 仅接受 2k
  • aspect_ratio

    价值观
    1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, adaptive
  • reference_images

    价值观
    上传 ID 或 DreamUtopia URL;lite 为 0–3,pro 为 0–14

adaptive 至少需要一张参考图像。文生图请省略 reference_images。resolution 默认为 2k,aspect_ratio 默认为 1:1,因此 model + prompt 即为有效请求。

混合参考

单张参考图是图生图;两张及以上是多参考混合。请先上传每个文件,并按顺序传入 id。

shell
-d '{
    "model": "pro",
    "prompt": "combine the two products on one studio table",
    "resolution": "2k",
    "aspect_ratio": "adaptive",
    "reference_images": ["<upload_id>", "<upload_id>"]
  }'

成本

图像额度按档位固定收取。实时值位于 GET /v1/models 中的 image[].credits 下。额度在创建任务时扣除,若任务失败则退还。

© 2026 DreamUtopia。保留所有权利。