图片生成与编辑

使用文字或参考图片创建图像,以 URL 或 Base64 获取结果。

更新于 2026 年 10 月 7 日查看 Markdown ↗

构建请求

选择模型后,参数与请求示例会同步更新。

GPT Image 2

gpt-image-2
参数范围与说明
qualitylow / auto → 1K; medium → 2K; high → 4K
n1
sizeWIDTHxHEIGHT;宽高为 8 的倍数,且满足对应档位像素上限。
image[]编辑接口上传 1–4 张图片。
调整参数只生成代码,不会提交请求或扣费。
POST /v1/images/generations
curl --fail-with-body 'https://noveadream.com/v1/images/generations' \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $REQUEST_ID" \
  -d '{
  "model": "gpt-image-2",
  "prompt": "A ceramic teapot on a sunlit table",
  "aspect_ratio": "1:1",
  "quality": "medium",
  "n": 1,
  "response_format": "url"
}'

GPT Image 2.5 SFW

gpt-image-2.5-sunburst
参数范围与说明
qualitylow / auto → 1K
n1
size宽高为 16 的倍数;总像素 655360–1048576,宽高比不超过 3:1,单边不超过 3840。
image[]编辑接口上传 1–4 张图片。
调整参数只生成代码,不会提交请求或扣费。
POST /v1/images/generations
curl --fail-with-body 'https://noveadream.com/v1/images/generations' \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $REQUEST_ID" \
  -d '{
  "model": "gpt-image-2.5-sunburst",
  "prompt": "A ceramic teapot on a sunlit table",
  "aspect_ratio": "1:1",
  "quality": "low",
  "n": 1,
  "response_format": "url"
}'

Seedream 5.0 Pro

seedream-5.0-pro
参数范围与说明
qualitylow / auto → 1K; medium → 2K
aspect_ratio1:1 / 16:9 / 9:16 / 4:3 / 3:4
n1
image_urls / image[]1–10 张;smart 比例仅限提供参考图时使用。
调整参数只生成代码,不会提交请求或扣费。
POST /v1/images/generations
curl --fail-with-body 'https://noveadream.com/v1/images/generations' \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $REQUEST_ID" \
  -d '{
  "model": "seedream-5.0-pro",
  "prompt": "A ceramic teapot on a sunlit table",
  "aspect_ratio": "1:1",
  "quality": "low",
  "n": 1,
  "response_format": "url"
}'

Qwen Edit 2511

qwen-edit-2511
参数范围与说明
modereference
image_urls / image[]必填,1–2 张图片。
resolution固定 720p,不使用 quality 切换。
n1
调整参数只生成代码,不会提交请求或扣费。
POST /v1/images/generations
curl --fail-with-body 'https://noveadream.com/v1/images/generations' \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $REQUEST_ID" \
  -d '{
  "model": "qwen-edit-2511",
  "prompt": "Change the background to a quiet garden",
  "mode": "reference",
  "aspect_ratio": "1:1",
  "image_urls": [
    "https://example.com/reference.png"
  ],
  "n": 1,
  "response_format": "url"
}'

NovelAI V4.5

nai-v4.5
查看完整接入说明 →
参数范围与说明
n1–4
aspect_ratio按比例映射为服务端预设尺寸。
image[]编辑时只接受 1 张图片。
quality不适用;精细参数见 NovelAI 文档。
调整参数只生成代码,不会提交请求或扣费。
POST /v1/images/generations
curl --fail-with-body 'https://noveadream.com/v1/images/generations' \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $REQUEST_ID" \
  -d '{
  "model": "nai-v4.5",
  "prompt": "watercolor, a quiet garden",
  "aspect_ratio": "1:1",
  "n": 1,
  "response_format": "url"
}'

NovelAI V5

nai-v5
查看完整接入说明 →
参数范围与说明
modelnai-diffusion-5-full
actiongenerate / img2img / infill
parameters.steps1–50
parameters.n_samples1–4
parameters.v4_prompt.caption.char_captions最多 32 个,推荐自动位置。
调整参数只生成代码,不会提交请求或扣费。
POST /ai/generate-image
curl --fail-with-body 'https://noveadream.com/ai/generate-image' \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $REQUEST_ID" \
  -d '{
  "model": "nai-diffusion-5-full",
  "input": "watercolor, a quiet garden",
  "action": "generate",
  "parameters": {
    "width": 1024,
    "height": 1024,
    "steps": 23,
    "n_samples": 1,
    "scale": 5,
    "seed": 42,
    "negative_prompt": ""
  }
}'

Nano Banana 2

nano-banana-2-sfw
查看完整接入说明 →
参数范围与说明
接口仅网页工作台,暂未开放公共 API。
resolution1K / 2K / 4K
aspect_ratiosmart / 1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 5:4 / 4:5 / 16:9 / 9:16 / 21:9
参考图最多 14 张账号内图片。
生成数量1

通用参数

字段说明
model必填,使用当前 Key 可用的模型 ID。
prompt必填,描述目标画面。
n生成数量,首次接入建议使用 1。
size / quality尺寸和质量取值随模型变化,不能跨模型照搬。
response_formaturl | b64_json
image_urls部分模型支持的公网参考图 URL 数组。

上传参考图编辑

POST /v1/images/edits
curl --fail-with-body https://noveadream.com/v1/images/edits \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H "Idempotency-Key: $REQUEST_ID" \
  -F "model=gpt-image-2" \
  -F "prompt=Change the background to a quiet garden" \
  -F "image[]=@reference.png"

multipart 上传让客户端设置 Content-Type 边界,不要手动指定 application/json。多个文件可重复使用 image[]。

读取结果

JSON · 示例
{
  "created": 1791300000,
  "data": [{ "url": "https://example.com/result.png" }]
}

选择 b64_json 时读取 data[].b64_json。结果链接应及时下载保存,不要作为永久存储地址。