PopNowAPI Docs
API balance and billing
Main content

API billing

How API calls spend your PopNow balance in USD, with holds, final charges, quotes, balance, usage and spend caps.

API calls spend your PopNow balance, shown in USD. A new account starts at $0; add funds and review payments in API billing.

  • API-key calls (REST, the compatible endpoints and the developer MCP) and API Playground runs spend that balance.
  • A model costs the same on the API as on popnow.ai for the same settings.
  • Prices are per model and per option — per image, per second of video or audio, per request, or per 1,000 characters of speech. Each model's page lists them.
  • Read and display the existing USD decimal strings: costUsd, expectedChargeUsd, maxChargeUsd, availableUsd, heldUsd, totalUsd and totalSpend. USD decimal strings support up to nine decimal places; preserve that precision for accounting rather than converting through binary floating point. Older integer amount fields may still appear for compatibility; ignore them. Use expectedCostUsd for USD quote confirmation.

One balance

Your PopNow account has one balance. Creating on popnow.ai, in the PopNow app and with PopNow in ChatGPT or Claude spends it, and so do API keys, the developer MCP and the API Playground. The website shows the same balance in credits (1 credit = $0.001).

How one task is charged

hold
settlerelease
Funds are held when the task is accepted, then resolved exactly once: settled against actual usage, or released in full.
  1. Hold. When createTask accepts a task, the highest price it can reach is set aside from your balance (estimatedCostUsd, in USD). Held funds cannot be spent twice, but they are not charged yet.
  2. Settle or release. When the task finishes:
    • succeeded: you pay what it actually used, never more than the USD hold. The rest of the hold returns to your balance.
    • failed or expired: the whole hold is released. You pay nothing.

The task record shows where it stands: while settled is false, costUsd is the USD hold; once settled is true, costUsd is the final USD charge. Keep every digit; do not round API amounts.

Rejected requests are not charged. If an accepted task fails, its USD hold is released to your API balance.

SituationCharged?
createTask rejected (400, 402, 403, 429, 50301 …)No — no task, no hold
Task succeededYes, the actual amount, capped at the hold
Task failed or expiredNo, the hold is released
Your connection dropped after sendingUnknown until you check — resend with the same Idempotency-Key to find the task
Reading tasks, models, balance or usageNever

Ask the price first

POST /api/v1/jobs/quote takes exactly the body you would send to createTask and returns the price without creating anything or holding funds:

curl -X POST "https://api.popnow.ai/api/v1/jobs/quote" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "alibaba/wan-3.0/image-to-video", "input": {"image_url": "https://media.popnow.ai/movie/lighthouse.webp", "resolution": "720p", "duration_seconds": 5}}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "quoteId": "q_…",
    "model": "alibaba/wan-3.0/image-to-video",
    "expectedChargeUsd": "0.45",
    "maxChargeUsd": "0.45",
    "currency": "USD",
    "quantity": "5",
    "unit": "per_second",
    "expiresAt": "2026-10-16T09:25:00Z"
  },
  "request_id": "req_…"
}

maxChargeUsd is the USD maximum that will be held. expectedChargeUsd is the expected USD cost; the two can differ when the final charge depends on the output, such as a clip's real length.

To lock the price you showed, submit the same request with quoteId and expectedCostUsd: quote.maxChargeUsd before the quote expires (five minutes). Keep maxChargeUsd as a USD decimal string, with up to nine decimal places. If the price changes or the quote expires, createTask answers 40901 and nothing is held; quote again and show the new USD amount.

Quote and confirm in USD
const API = 'https://api.popnow.ai/api/v1';
const headers = {
  Authorization: `Bearer ${process.env.POPNOW_API_KEY}`,
  'Content-Type': 'application/json',
};
const body = {
  model: 'alibaba/wan-3.0/image-to-video',
  input: {
    image_url: 'https://media.popnow.ai/movie/lighthouse.webp',
    resolution: '720p',
    duration_seconds: 5,
  },
};
const quoted = await fetch(`${API}/jobs/quote`, {
  method: 'POST', headers, body: JSON.stringify(body),
}).then((r) => r.json());
if (quoted.code !== 200) throw new Error(`${quoted.code} ${quoted.msg}`);
const quote = quoted.data;
console.log(`${quote.expectedChargeUsd} USD estimated; ${quote.maxChargeUsd} USD maximum`);
// After the user confirms this USD maximum, submit before quote.expiresAt.
const created = await fetch(`${API}/jobs/createTask`, {
  method: 'POST',
  headers: { ...headers, 'Idempotency-Key': crypto.randomUUID() },
  body: JSON.stringify({ ...body, quoteId: quote.quoteId, expectedCostUsd: quote.maxChargeUsd }),
}).then((r) => r.json());
if (created.code !== 200) throw new Error(`${created.code} ${created.msg}`);
console.log(created.data.taskId);

Balance

curl "https://api.popnow.ai/api/v1/chat/credit" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

availableUsd is the USD amount new tasks can use, heldUsd is set aside for running tasks, and totalUsd is both together. All three are USD decimal strings. It is the same balance you spend on popnow.ai. The path name is historical; it has nothing to do with chat. When the available balance cannot cover a new task's hold, createTask returns 40201.

Usage

GET /api/v1/usage?from=2026-10-01&to=2026-10-16 returns, for the key you call it with, the number of tasks, how many succeeded and failed, and their settled USD spend — in total (totalSpend), per day and per model (each bucket's spend). Dates are UTC, to is exclusive and the range is at most 92 days. Only settled charges count, so a day's total can still move while late tasks finish. This report is limited to 30 requests per minute; for the whole account, use API billing.

Spend caps

Each key can have a daily, monthly and lifetime USD cap, set in the API console. The existing USD fields are dailySpendCap, monthlySpendCap and totalSpendCap; retain those names and units. A request that would go over a cap returns 40202 and holds nothing. Daily caps reset at 00:00 UTC, monthly caps on the 1st of the month at 00:00 UTC, and a lifetime cap never resets. Keys have no caps unless you add them.

Funding and refunds

Add funds, review payment records and ask billing questions in API billing. Funding methods depend on the payment options currently enabled; check billing for what is available. Top-ups follow the same refund policy as purchases on popnow.ai: within 30 days you can ask for a refund of the part you haven't used. For help with a payment, check billing or contact support.

Failed and expired tasks release their holds automatically. Releasing a task hold is different from refunding a payment. See API balance and refunds.

On this page