PopNow API 文件
一把 API 金鑰,呼叫圖片、影片、音訊和對話模型。使用你的 PopNow 餘額,以美元結算。
從哪裡開始
三個步驟生成第一張圖
建立金鑰並儲值
登入 popnow.ai,在 API 控制台建立 sk-popnow- 金鑰,再到帳單頁儲值。API 餘額以美元計,初始為 $0,用於支付 API 呼叫、開發者 MCP 和 Playground 的費用。
送出一個請求
把下面這段貼到終端機執行。它請 Z-Image 生成一張圖,費用為 $0.01 美元,最多等待 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 } ] }, "costUsd": "0.01", "settled": true }, "request_id": "req_…" }
output.assets[0].url

