跳转到主要内容
POST
/
v1
/
tasks
Imagen 4.0
curl --request POST \
  --url https://www.qingbo.dev/v1/tasks \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "action": "<string>",
  "prompt": "<string>",
  "n": 123,
  "seed": 123,
  "aspect_ratio": "<string>",
  "resolution": "<string>",
  "callback_url": "<string>",
  "callback_events": [
    "<string>"
  ]
}
'
import requests

url = "https://www.qingbo.dev/v1/tasks"

payload = {
"model": "<string>",
"action": "<string>",
"prompt": "<string>",
"n": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"callback_url": "<string>",
"callback_events": ["<string>"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
action: '<string>',
prompt: '<string>',
n: 123,
seed: 123,
aspect_ratio: '<string>',
resolution: '<string>',
callback_url: '<string>',
callback_events: ['<string>']
})
};

fetch('https://www.qingbo.dev/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://www.qingbo.dev/v1/tasks"

payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"callback_events\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://www.qingbo.dev/v1/tasks")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"callback_events\": [\n \"<string>\"\n ]\n}")
.asString();
{
  "task_id": "task-wave1775285160b950328499",
  "model": "imagen-4.0",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}
该模型暂未开放(维护中) — 因模型服务不稳定,imagen-4.0 当前未对外提供,提交请求会被拒绝。以下文档保留作能力参考,恢复开放时间另行通知。
Google DeepMind 出品的 Imagen 4.0 文生图模型 — 原生 2K 输出,写实级光影与材质,中英文字渲染准确率高。适合海报主视觉、营销主图、艺术插画等对画面质感与文字渲染要求高的场景。 按张计费,统一 2K 输出。

定价

模型单价(每张)
imagen-4.0$0.0425

调用示例

curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "imagen-4.0",
    "prompt": "山顶日出,云海翻涌,远处雪峰泛起金光,写实摄影风格"
  }'
curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "imagen-4.0",
    "prompt": "电影海报,主标题大字 \"STARFALL\",副标题 \"Coming 2026\",星空背景,极简留白",
    "aspect_ratio": "9:16",
    "n": 2
  }'
curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "imagen-4.0",
    "prompt": "现代极简办公空间,落地窗洒入晨光,绿植点缀,杂志摄影风格",
    "aspect_ratio": "16:9",
    "seed": 42
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "imagen-4.0",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}
提交后用 GET /v1/tasks/{task_id} 轮询状态,详见 任务系统

可用模型

模型 ID说明
imagen-4.0Google DeepMind 旗舰文生图,原生 2K,写实质感,中英文字准确

通用参数

model
string
必填
可用模型 列表中选一个
action
string
默认值:"generate"
操作类型,Imagen 4.0 仅支持:
  • generate — 文生图(默认)
prompt
string
必填
图像描述文本,支持中英文。Imagen 4.0 对场景细节、光影与文字渲染表现尤佳
n
integer
默认值:"1"
生成数量(单次返回多张)
seed
integer
默认值:"-1"
随机种子,-1 为随机;固定值可复现相似结果
aspect_ratio
string
默认值:"1:1"
画面宽高比,可选值:
  • 1:1 — 正方形
  • 4:3 / 3:4 — 横/竖版标准
  • 16:9 / 9:16 — 横/竖版宽屏
resolution
string
输出分辨率,Imagen 4.0 默认原生 2K,无独立分辨率档位,留空即可
callback_url
string
Webhook 回调地址,任务终态时调用。详见 回调机制
callback_events
string[]
需要回调的事件类型,默认全部终态事件

资源限制

项目限制
支持 actiongenerate(纯文生图)
输出分辨率原生 2K(固定,无档位选择)
宽高比1:1 / 4:3 / 3:4 / 16:9 / 9:16 共 5 种
输出文件JPG,链接 24 小时有效

相关文档