Phoenix Labs Balance API
The Balance API from Phoenix Labs — 5 operation(s) for balance.
The Balance API from Phoenix Labs — 5 operation(s) for balance.
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/phoenixlabs-space:phoenixlabs-space-balance-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: Phoenix Labs Balance API
version: 1.0.0
summary: Restore old video in the cloud, and turn still images into video clips with sound.
description: 'Prices are real US dollars. Motion clips and balance-paid restores spend the Phoenix balance behind the key in `Authorization: Bearer`: the owner''s wallet key (pmk_…) or an agent key (pak_…) the owner made with a spending limit. Restores can instead be paid per job through a Lemon Squeezy checkout link, with no key. Files go straight to storage: create the job, PUT the file to `upload_url` with `upload_headers`, then start it. AI agents can use the same operations as MCP tools at https://api.phoenixlabs.space/mcp. Guide: https://phoenixlabs.space/developers'
contact:
email: support@phoenixlabs.space
url: https://phoenixlabs.space/developers
termsOfService: https://phoenixlabs.space/terms
servers:
- url: https://api.phoenixlabs.space
tags:
- name: Balance
paths:
/wallet:
post:
operationId: createWallet
summary: Make a new, empty balance and its wallet key
tags:
- Balance
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
responses:
'200':
description: key (pmk_…, shown once) and the wallet.
content:
application/json:
schema:
type: object
get:
operationId: getBalance
summary: The balance this key can spend
tags:
- Balance
security:
- walletKey: []
responses:
'200':
description: The wallet.
content:
application/json:
schema:
type: object
properties:
wallet:
$ref: '#/components/schemas/Wallet'
'400':
description: Bad input. `detail` says what to fix.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or unrecognised key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/wallet/topup:
post:
operationId: topUp
summary: Checkout link to add money to the balance
tags:
- Balance
security:
- walletKey: []
requestBody:
content:
application/json:
schema:
type: object
required:
- amount_cents
properties:
amount_cents:
type: integer
minimum: 500
maximum: 20000
email:
type: string
responses:
'200':
description: checkout_url for the person paying.
content:
application/json:
schema:
type: object
'400':
description: Bad input. `detail` says what to fix.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or unrecognised key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/wallet/topup/crypto:
post:
operationId: topUpWithUsdc
summary: Add to the balance with USDC on Base (x402 v2)
tags:
- Balance
security:
- walletKey: []
description: 'x402 v2 over HTTP. Without a PAYMENT-SIGNATURE header the answer is 402 with the payment terms in the PAYMENT-REQUIRED header (base64 JSON; also in the body as payment_required): exact scheme, USDC on Base (eip155:8453), paid to Phoenix Labs. Sign the EIP-3009 transfer and repeat the request with the base64 PaymentPayload in PAYMENT-SIGNATURE. A facilitator settles it (no gas needed from the payer), the transfer is confirmed on-chain, and the balance is credited 1 USDC = $1. The receipt comes back in PAYMENT-RESPONSE. $1 to $200. Refunds of unused USDC balance go back to the paying address in USDC.'
parameters:
- name: PAYMENT-SIGNATURE
in: header
required: false
schema:
type: string
description: base64 JSON x402 PaymentPayload
requestBody:
content:
application/json:
schema:
type: object
required:
- amount_cents
properties:
amount_cents:
type: integer
minimum: 100
maximum: 20000
responses:
'200':
description: Paid and credited.
content:
application/json:
schema:
type: object
properties:
credited_cents:
type: integer
transaction:
type: string
explorer:
type: string
wallet:
$ref: '#/components/schemas/Wallet'
'202':
description: Paid; waiting for the chain to confirm. The balance is credited when it does.
'402':
description: Payment required (terms in PAYMENT-REQUIRED), or the payment was refused. Nothing was taken.
'503':
description: USDC payments aren't switched on.
/wallet/keys:
get:
operationId: listAgentKeys
summary: Agent keys on this balance (wallet key only)
tags:
- Balance
security:
- walletKey: []
responses:
'200':
description: The keys, without their secrets.
content:
application/json:
schema:
type: object
'400':
description: Bad input. `detail` says what to fix.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or unrecognised key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
operationId: createAgentKey
summary: Make an agent key with a spending limit (wallet key only)
tags:
- Balance
security:
- walletKey: []
requestBody:
content:
application/json:
schema:
type: object
required:
- limit_cents
properties:
label:
type: string
limit_cents:
type: integer
minimum: 1
maximum: 100000
responses:
'200':
description: key (pak_…, shown once) and its details.
content:
application/json:
schema:
type: object
'400':
description: Bad input. `detail` says what to fix.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or unrecognised key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/wallet/keys/{id}/revoke:
post:
operationId: revokeAgentKey
summary: Revoke an agent key (wallet key only)
tags:
- Balance
security:
- walletKey: []
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: The key, revoked.
content:
application/json:
schema:
type: object
'400':
description: Bad input. `detail` says what to fix.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or unrecognised key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'402':
description: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Wallet:
type: object
properties:
wallet_id:
type: string
balance_cents:
type: integer
spendable_cents:
type: integer
paused:
type: boolean
email:
type: string
description: Only shown to the wallet key.
agent_key:
$ref: '#/components/schemas/AgentKey'
Error:
type: object
properties:
detail:
type: string
needs_topup:
type: boolean
over_limit:
type: boolean
refused:
type: string
description: Content-rule refusal code.
AgentKey:
type: object
properties:
id:
type: string
label:
type: string
limit_cents:
type: integer
spent_cents:
type: integer
remaining_cents:
type: integer
created_at:
type: string
last_used_at:
type:
- string
- 'null'
revoked:
type: boolean
securitySchemes:
walletKey:
type: http
scheme: bearer
description: A wallet key (pmk_…) or an agent key (pak_…).
externalDocs:
url: https://phoenixlabs.space/developers