Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API 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.
openapi: 3.2.0
info:
title: Phoenix Labs Connect 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: Connect
paths:
/oauth/register:
post:
operationId: oauthRegister
summary: Register an OAuth client (RFC 7591)
tags:
- Connect
description: Dynamic Client Registration for MCP apps. Public clients (token_endpoint_auth_method none) with PKCE are the norm. Clients may instead use a Client ID Metadata Document URL as their client_id.
requestBody:
content:
application/json:
schema:
type: object
required:
- redirect_uris
properties:
client_name:
type: string
redirect_uris:
type: array
items:
type: string
token_endpoint_auth_method:
type: string
enum:
- none
- client_secret_post
- client_secret_basic
responses:
'201':
description: The registered client (client_id, and client_secret for confidential clients).
'400':
description: invalid_redirect_uri or invalid_client_metadata.
/oauth/client:
get:
operationId: oauthClient
summary: Check a client and redirect_uri (used by the consent page)
tags:
- Connect
parameters:
- name: client_id
in: query
required: true
schema:
type: string
- name: redirect_uri
in: query
required: true
schema:
type: string
responses:
'200':
description: The client's name and the redirect host to show the user.
content:
application/json:
schema:
type: object
'400':
description: Unknown client or unregistered redirect_uri.
/oauth/authorize:
post:
operationId: oauthApprove
summary: Approve a connection (the consent page, with the wallet key)
tags:
- Connect
security:
- walletKey: []
description: Called by https://phoenixlabs.space/connect (the authorization endpoint) when the owner clicks Allow. Wallet key only. Returns where to send the browser, with the code.
responses:
'200':
description: 'redirect: the client''s redirect_uri with code, state and iss.'
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'
/oauth/token:
post:
operationId: oauthToken
summary: Exchange a code, or refresh (OAuth 2.1)
tags:
- Connect
description: grant_type authorization_code (with code_verifier, PKCE S256) or refresh_token (rotated on every use). Access tokens last 24 hours.
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
grant_type:
type: string
code:
type: string
redirect_uri:
type: string
code_verifier:
type: string
refresh_token:
type: string
client_id:
type: string
resource:
type: string
responses:
'200':
description: access_token, token_type Bearer, expires_in, refresh_token, scope.
content:
application/json:
schema:
type: object
'400':
description: invalid_grant, invalid_target or unsupported_grant_type.
'401':
description: invalid_client.
/oauth/revoke:
post:
operationId: oauthRevoke
summary: Disconnect (RFC 7009)
tags:
- Connect
description: Revoking any token of a connection revokes the whole connection (its agent key).
responses:
'200':
description: Always 200.
content:
application/json:
schema:
type: object
components:
schemas:
Error:
type: object
properties:
detail:
type: string
needs_topup:
type: boolean
over_limit:
type: boolean
refused:
type: string
description: Content-rule refusal code.
securitySchemes:
walletKey:
type: http
scheme: bearer
description: A wallet key (pmk_…) or an agent key (pak_…).
externalDocs:
url: https://phoenixlabs.space/developers