REST API Endpoints Reference
Complete reference for user-facing management endpoints. For AI model calls (chat, images, audio), see the Integration Playbook.
OAuth2 Client Management
Register, list, update, and delete OAuth2 client applications. All endpoints require authentication.
/api/v1/oauth2/clientsAuth: Bearer token (user)
Register a new OAuth2 client. The client secret is only shown once in the response.
POST /api/v1/oauth2/clients
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"clientName": "My App", // required, 3-255 chars
"redirectUris": ["myapp://auth/callback"], // redirect URIs
"requestedScopes": ["api:access", "profile:read"],
"requireConsent": true, // default: true
"accessTokenTtlSeconds": 3600, // default: 3600
"refreshTokenTtlSeconds": 2592000 // default: 30 days
}
// Response 201:
{
"success": true,
"data": {
"id": 1,
"clientId": "abc123",
"clientSecret": "secret_shown_once",
"clientName": "My App",
"clientType": "PUBLIC",
"redirectUris": ["myapp://auth/callback"],
"scopes": ["api:access", "profile:read"],
"accessTokenTtlSeconds": 3600,
"requirePkce": true,
"requireConsent": true,
"isActive": true,
"createdAt": "2024-01-15T10:00:00",
"updatedAt": "2024-01-15T10:00:00"
}
}/api/v1/oauth2/clientsAuth: Bearer token (user)
List all OAuth2 clients owned by the current user.
GET /api/v1/oauth2/clients
Authorization: Bearer ACCESS_TOKEN
// Response: { "success": true, "data": [OAuth2ClientDto, ...] }/api/v1/oauth2/clients/{id}Auth: Bearer token (owner)
Get details of a specific client. Only accessible by the owner.
/api/v1/oauth2/clients/{id}Auth: Bearer token (owner)
Update an OAuth2 client. Same body as POST.
/api/v1/oauth2/clients/{id}Auth: Bearer token (owner)
Delete a client and all its associated authorizations.
/api/v1/oauth2/clients/{id}/deactivateAuth: Bearer token (owner)
Soft-delete (deactivate) a client without removing data.
/api/v1/oauth2/clients/{clientId}/usageAuth: Bearer token (owner)
Get usage stats for a client. Defaults to last 30 days.
GET /api/v1/oauth2/clients/{clientId}/usage?startDate=2024-01-01&endDate=2024-01-31
Authorization: Bearer ACCESS_TOKEN
// Query params (optional): startDate, endDate (ISO date format)OAuth2 Consents
Manage which third-party apps have access to your account.
/api/v1/oauth2/consentsAuth: Bearer token (user)
List all apps the current user has authorized.
/api/v1/oauth2/consents/{clientId}Auth: Bearer token (user)
Revoke access for a specific app. Deletes consent and invalidates tokens.
/api/v1/oauth2/consents/countAuth: Bearer token (user)
Get count of authorized apps.
GET /api/v1/oauth2/consents/count
Authorization: Bearer ACCESS_TOKEN
// Response: { "success": true, "data": 3 }Payments
Add funds to your account via Stripe checkout.
/api/v1/payment/create-checkout-sessionAuth: Bearer token (user)
Create a Stripe checkout session to add funds.
POST /api/v1/payment/create-checkout-session
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"amount": 10.00 // required, minimum $0.50
}
// Response:
{
"success": true,
"data": {
"sessionId": "cs_live_abc123",
"checkoutUrl": "https://checkout.stripe.com/..."
}
}/api/v1/payment/verify-and-captureAuth: Bearer token (user)
Verify and capture payment after Stripe redirect.
POST /api/v1/payment/verify-and-capture?session_id=cs_live_abc123
Authorization: Bearer ACCESS_TOKENGift Cards
/api/v1/giftcard/redeemAuth: Bearer token (user)
Redeem a gift card to add funds to your balance.
POST /api/v1/giftcard/redeem
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"code": "GIFT-XXXX-XXXX" // required
}
// Response:
{
"success": true,
"data": {
"success": true,
"message": "Gift card redeemed successfully",
"amountAdded": 5.00,
"newBalance": 15.00
}
}Spaces
User workspaces for hosting AI-generated apps with public profiles.
/api/v1/spaces/handleAuth: Bearer token (user)
Set your space handle (username).
PUT /api/v1/spaces/handle
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"handle": "my-space" // 3-40 chars, pattern: ^[a-z0-9][a-z0-9_-]{1,38}[a-z0-9]$
}/api/v1/spaces/handle/check?handle={handle}Auth: Public
Check if a handle is available.
GET /api/v1/spaces/handle/check?handle=my-space
// Response: { "success": true, "data": { "available": true } }/api/v1/spaces/{handle}Auth: Public
Get a space profile with published apps. Returns profile info, apps list, and isOwner flag.
/api/v1/spaces/me/appsAuth: Bearer token (user)
Get all space apps for the current user (including unpublished).
/api/v1/spaces/generateAuth: Bearer token (user)
Generate a new AI app from a prompt.
POST /api/v1/spaces/generate
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"prompt": "Create a color palette generator tool", // 10-2000 chars
"models": ["gpt-4o-mini"] // optional
}/api/v1/spaces/{slug}/editAuth: Bearer token (owner)
Edit an existing space app with a new prompt.
PUT /api/v1/spaces/{slug}/edit
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"prompt": "Add dark mode support" // 5-2000 chars
}/api/v1/spaces/{slug}Auth: Bearer token (owner)
Delete a space app by slug.
For AI model endpoints (chat, images, audio, embeddings), see the Integration Playbook.
Using Claude Code, Cursor, or another AI agent?
Drop the AI Pass skill into your agent and skip the manual setup. Works with Claude Code, Codex, Cursor, OpenCode, and 38+ other agents.
npx skills add aipass-one/skillTwo skills available: aipass-api (personal use) and aipass-oauth-app (for app builders).
Stuck? We're happy to help on Discord
Active Discord community with the AI Pass team. Get unblocked on integration, ask about models, share what you're building.
Join AI Pass Discord