PopNow API 文档
用你自己的代码生成图片、视频和音频
一个 API 密钥、一套 REST 接口,型号和积分与 popnow.ai 网站完全相同。提交一个任务,拿回生成的文件。
三步生成第一张图
创建密钥
登录 popnow.ai,在 API 控制台创建一个密钥。密钥以 sk-popnow- 开头,直接使用你账户里已有的积分。
发一个请求
把下面这段粘进终端运行。它让 Z-Image 生成一张图,花费 2 积分($0.02),最多等 60 秒直接拿到结果。
POST /api/v1/jobs/createTask?wait=60 export POPNOW_API_KEY="sk-popnow-..." # your key from the API console curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \ -H "Authorization: Bearer $POPNOW_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "model": "alibaba/z-image-turbo/text-to-image", "input": { "prompt": "A small red fox curled up in a teacup, soft morning light, studio photo" } }'打开结果
响应里的 output.assets[0].url 就是这张图的签名链接。视频这类耗时更长的任务会先返回 taskId,之后用 recordInfo 查询,或者等 Webhook 通知。
200 OK { "code": 200, "msg": "success", "data": { "taskId": "job_01JH8Z4Q5W2N7R3K9M6P1C0VXD", "model": "alibaba/z-image-turbo/text-to-image", "state": "succeeded", "output": { "assets": [ { "url": "https://…signed-link…", "expiresAt": "2026-10-16T09:20:00Z", "mime": "image/png", "width": 1024, "height": 1024 } ] }, "credits": 2, "cost": "0.02", "settled": true }, "request_id": "req_…" }