PopNowAPI 文档

PopNow API 文档

一把 API 密钥,调用图片、视频、音频和对话模型。使用你的 PopNow 余额,以美元结算。

从哪里开始

三步生成第一张图

  1. 创建密钥并充值

    登录 popnow.ai,在 API 控制台创建 sk-popnow- 密钥,再到账单页充值。API 余额以美元计,初始为 $0,用于支付 API 调用、开发者 MCP 和 Playground 的费用。

  2. 发一个请求

    把下面这段粘进终端运行。它让 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"
      }
    }'
  3. 打开结果

    响应里的 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_…"
    }
    A small red fox curled up in a teacup, soft morning light, studio photo
    output.assets[0].url

参考