PopNow AI Account API
The Account API from PopNow AI — 2 operation(s) for account.
The Account API from PopNow AI — 2 operation(s) for account.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/popnow-ai:popnow-ai-account-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Popnow Ai Account API
version: 1.0.0
description: 'Operations tagged Account across 2 of this provider''s published API definitions: openapi.yaml, popnow-ai-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.popnow.ai
description: Production
security:
- bearerAuth: []
tags:
- name: Account
paths:
/api/v1/usage:
get:
tags:
- Account
operationId: getUsage
summary: Get usage for the authenticated API key
description: 'Scope is this API key: tasks created by other keys on the same account, and generations started directly in the web console (which use no API key), are not included. For an account-wide view, use the console''s usage page.
Hidden historical tasks of this key are included. Other keys and
workspaces cannot be selected. Unknown or repeated query parameters
are rejected.
Dates form a UTC half-open interval [from,to), up to 92 days.
The default to is tomorrow in UTC; omitted from is seven days before to.
Calls are attributed to task creation time. Spend sums only settled
actual charges for those tasks, never pending holds. Late settlement
can change a previous day''s spend. These are task usage totals, not
a statement of cash movements or remaining API-key budget.
An additional account-wide token bucket allows a burst of 30 requests
and replenishes 30 tokens per minute, shared by all keys on the account.
Observe Retry-After on 429. This reporting limit fails closed when its
limiter is unavailable. Queries have a five-second server budget;
a timeout returns 503 and suggests retrying a shorter date range.'
parameters:
- name: from
in: query
schema:
type: string
format: date
description: Inclusive UTC date in YYYY-MM-DD format.
- name: to
in: query
schema:
type: string
format: date
description: Exclusive UTC date in YYYY-MM-DD format.
responses:
'200':
description: Current-key usage with exact USD decimal strings and sparse daily/model buckets.
headers:
Cache-Control:
schema:
type: string
const: no-store
X-RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
content:
application/json:
schema:
$ref: '#/components/schemas/APIKeyUsageEnvelope'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
'503':
$ref: '#/components/responses/Unavailable'
servers:
- url: https://api.popnow.ai
description: Production
/api/v1/chat/credit:
get:
tags:
- Account
operationId: getCreditBalance
summary: Get net balance, promotional grants, and approved credit
responses:
'200':
description: Net available, held, and total balances plus funding sources in USD decimal strings. Unused credit is separate from wallet funds; model-scoped grants may not pay for every request.
content:
application/json:
schema:
$ref: '#/components/schemas/BalanceEnvelope'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'500':
$ref: '#/components/responses/ServerError'
servers:
- url: https://api.popnow.ai
description: Production
components:
headers:
RateLimitLimit:
description: Capacity of the active account-level rate-limit window.
schema:
type: integer
RateLimitRemaining:
description: Remaining requests in the active window.
schema:
type: integer
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
minimum: 1
schemas:
Balance:
type: object
required:
- available
- held
- total
- availableCredits
- heldCredits
- totalCredits
- availableUsd
- heldUsd
- totalUsd
properties:
funding:
$ref: '#/components/schemas/FundingOverview'
available:
$ref: '#/components/schemas/USDString'
held:
$ref: '#/components/schemas/USDString'
total:
$ref: '#/components/schemas/USDString'
availableCredits:
type: integer
format: int64
description: Legacy display projection of available USD, truncated toward zero at 1 credit = $0.001. Use availableUsd for the exact API wallet balance.
deprecated: true
heldCredits:
type: integer
format: int64
minimum: 0
description: Legacy display projection at 1 credit = $0.001. Integer values round upward; use the USD fields for exact amounts and reconciliation.
deprecated: true
totalCredits:
type: integer
format: int64
description: Legacy sum of availableCredits and heldCredits; not an exact USD balance. Use totalUsd.
deprecated: true
availableUsd:
type: string
pattern: ^-?[0-9]+(\.[0-9]{1,9})?$
description: 'Exact USD in the independent API wallet. Legacy alias: available.'
heldUsd:
type: string
pattern: ^-?[0-9]+(\.[0-9]{1,9})?$
description: 'Exact USD in the independent API wallet. Legacy alias: held.'
totalUsd:
type: string
pattern: ^-?[0-9]+(\.[0-9]{1,9})?$
description: 'Exact USD in the independent API wallet. Legacy alias: total.'
FundingGrantItem:
type: object
required:
- id
- name
- amountUsd
- availableUsd
- heldUsd
- spentUsd
- status
- startsAt
- modelSlugs
- customerMemo
- createdAt
properties:
id:
type: string
name:
type: string
amountUsd:
type: string
availableUsd:
type: string
heldUsd:
type: string
spentUsd:
type: string
status:
type: string
startsAt:
type: string
format: date-time
expiresAt:
type:
- string
- 'null'
format: date-time
modelSlugs:
type: array
items:
type: string
description: Empty means all models.
customerMemo:
type: string
createdAt:
type: string
format: date-time
USDString:
type: string
pattern: ^-?[0-9]+(?:\.[0-9]+)?$
description: Decimal USD amount encoded as a string to avoid binary floating-point loss.
APIKeyUsageResponse:
type: object
additionalProperties: false
required:
- from
- to
- currency
- totalCalls
- totalSpend
- days
- models
- totalCredits
properties:
from:
type: string
format: date
to:
type: string
format: date
currency:
type: string
const: USD
totalCalls:
type: integer
format: int64
minimum: 0
totalSpend:
$ref: '#/components/schemas/USDString'
totalCredits:
type: integer
format: int64
minimum: 0
description: Legacy display projection at 1 credit = $0.001. Integer values round upward; use the USD fields for exact amounts and reconciliation.
deprecated: true
days:
type: array
items:
$ref: '#/components/schemas/UsageDayItem'
models:
type: array
items:
$ref: '#/components/schemas/UsageModelItem'
APIKeyUsageEnvelope:
allOf:
- $ref: '#/components/schemas/EnvelopeBase'
- type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/APIKeyUsageResponse'
ErrorEnvelope:
allOf:
- $ref: '#/components/schemas/EnvelopeBase'
- type: object
properties:
code:
type: integer
enum:
- 400
- 40003
- 40004
- 401
- 40201
- 40202
- 403
- 40301
- 40302
- 40303
- 40310
- 404
- 409
- 40901
- 413
- 429
- 500
- 503
- 50301
- 50302
description: 'Business code. `40003`: an uploaded file''s actual size, media type or signature does not match its upload ticket (file commit). `40004`: the request is valid but no deployment can serve this exact parameter combination; change the named parameter and retry. `503`: a dependency is temporarily unavailable (for example a list or usage query timed out, or inline image storage failed); honour `Retry-After` when present. `50301`: the model has no usable deployment or effective price right now. `50302`: a synchronous generation (streaming) failed upstream and the charge was refunded. Retry with a **new** `Idempotency-Key` — the original key replays the same failure, so a transport-level retry that keeps the key can never succeed. `40301`: this key is not allowed to call this model — check the key''s model restrictions in the Console. `40302`: the caller''s address is not in this key''s IP allow-list. `40303`: the request comes from a region this service is not offered in; the message deliberately does not state how that is determined, and neither does this description. `40310`: the account has not verified its email address yet, so it cannot run models. Open the verification link that was emailed at sign-up, or send a new one from the Console; the key starts working as soon as the address is verified, with no change on your side.'
msg:
type: string
description: Human-readable explanation, English unless `Accept-Language` or the account's API error language selects another supported language. Never parse it; branch on `code`.
data:
type: object
description: 'Present only when the failure carries a machine-readable reason; otherwise absent. `code`, the HTTP status and `msg` are the same with or without it. `asset_library_locked` (400): the asset library opens after the first top-up. `asset_library_full` (400): the allowance is full. `asset_file_too_large` (400): the file is above the plan''s per-file limit. `asset_daily_limit` (429): the daily number of new assets is reached; honour `Retry-After`. `asset_storage_full` (503): storage is full across the platform. `asset_permission_denied` (403): the caller''s team role does not allow this change. `asset_workspace_forbidden` (403): this key or workspace cannot reach that library. `adult_content`, `minor_safety` and `image_rejected` (400): the content safety gate declined the prompt or an input image before anything was charged. New values may be added; treat unknown values like an absent reason.'
required:
- reason
properties:
reason:
type: string
enum:
- asset_library_locked
- asset_library_full
- asset_file_too_large
- asset_daily_limit
- asset_storage_full
- asset_permission_denied
- asset_workspace_forbidden
- asset_entity_name_taken
- unknown_model
- unknown_task
- insufficient_credits
- adult_content
- minor_safety
- image_rejected
- signup_paused
- agent_quota
- agent_rate
- agent_turns
- agent_skill_invalid
- agent_skill_turns
- price_changed
- agent_project_budget
- web_fetch
- team_role_cannot_spend
- team_allowance_reached
- team_wallet_empty
- team_limit_reached
- skill_quota
- skill_rate_needs_install
- handoff_invalid
- age_restricted
- apple_reauth_required
- pending
- other_account
- revoked
- invalid
- budget_exceeded
- mfa_required
- model_unavailable
- model_retired
UsageModelItem:
type: object
additionalProperties: false
required:
- model
- calls
- succeeded
- failed
- spend
- credits
properties:
model:
type: string
description: Model call name, `<publisher>/<model>/<task>`.
calls:
type: integer
format: int64
minimum: 0
succeeded:
type: integer
format: int64
minimum: 0
failed:
type: integer
format: int64
minimum: 0
spend:
$ref: '#/components/schemas/USDString'
credits:
type: integer
format: int64
minimum: 0
description: Legacy display projection at 1 credit = $0.001. Integer values round upward; use the USD fields for exact amounts and reconciliation.
deprecated: true
EnvelopeBase:
type: object
required:
- code
- msg
- request_id
properties:
code:
type: integer
msg:
type: string
request_id:
type: string
description: Correlation identifier. Include it in support requests.
BalanceEnvelope:
allOf:
- $ref: '#/components/schemas/EnvelopeBase'
- type: object
required:
- data
properties:
code:
type: integer
const: 200
msg:
type: string
const: success
data:
$ref: '#/components/schemas/Balance'
UsageDayItem:
type: object
additionalProperties: false
required:
- day
- calls
- succeeded
- failed
- spend
- credits
properties:
day:
type: string
format: date
calls:
type: integer
format: int64
minimum: 0
succeeded:
type: integer
format: int64
minimum: 0
failed:
type: integer
format: int64
minimum: 0
spend:
$ref: '#/components/schemas/USDString'
credits:
type: integer
format: int64
minimum: 0
description: Legacy display projection at 1 credit = $0.001. Integer values round upward; use the USD fields for exact amounts and reconciliation.
deprecated: true
FundingOverview:
type: object
required:
- balanceUsd
- heldUsd
- prepaidAvailableUsd
- grantAvailableUsd
- cashShortfallUsd
- credit
- grants
- grantsHasMore
properties:
balanceUsd:
type: string
description: Net wallet available balance; may be negative for approved credit consumption or external payment recovery.
heldUsd:
type: string
prepaidAvailableUsd:
type: string
description: Unrestricted prepaid or legacy available funds.
grantAvailableUsd:
type: string
description: Active available grants; model applicability is checked at task admission.
cashShortfallUsd:
type: string
description: External payment recovery shortfall that cannot be covered by grants or credit.
credit:
$ref: '#/components/schemas/CreditFacilityItem'
grants:
type: array
items:
$ref: '#/components/schemas/FundingGrantItem'
grantsHasMore:
type: boolean
CreditFacilityItem:
type: object
required:
- enabled
- limitUsd
- availableUsd
- usedUsd
- heldUsd
- status
- version
properties:
enabled:
type: boolean
limitUsd:
type: string
description: Approved ceiling, not wallet funds.
availableUsd:
type: string
usedUsd:
type: string
description: Outstanding settled principal.
heldUsd:
type: string
description: Credit reserved for accepted tasks.
expiresAt:
type:
- string
- 'null'
format: date-time
status:
type: string
version:
type: integer
format: int64
responses:
ServerError:
description: Internal failure. Details are not exposed; report `request_id` to support.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
BadRequest:
description: Invalid JSON, query, callback URL, model input, or media declaration. Invalid callBackUrl values return code 400 and msg "Invalid callback URL" with request_id. Submitted hosts, IP addresses, and DNS diagnostics are not echoed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
RateLimited:
description: Account-level request limit exceeded.
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimit'
X-RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemaining'
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
Unauthorized:
description: Missing, malformed, expired, revoked, or otherwise invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
Forbidden:
description: Account, model, API-key, IP, or region authorization failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
Unavailable:
description: 'HTTP 503 carries one of three business codes. `50301`: no usable deployment or effective customer price exists for the selected model. `503`: a dependency is temporarily unavailable; retry after the `Retry-After` header when it is present. `50302`: a synchronous generation failed upstream and the charge was refunded. Nothing was charged, but send the retry with a **new** `Idempotency-Key`: reusing the original one replays the recorded failure instead of generating again.'
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: sk-popnow-<48 lowercase hex characters>
description: 'Send `Authorization: Bearer sk-popnow-...`. Create keys in the developer console at https://popnow.ai/api/console and keep them server-side.'
x-refined-from:
- openapi.yaml
- popnow-ai-openapi.yml