Skip to contentSkip to content

Embedded self-service API

Clients use the short-lived Bearer token returned by token exchange with /api/v1/apps/{app}/users/me/* under a fixed Application. Never let a client submit an arbitrary user ID, and never use an AppClient secret for these requests.

CapabilityMethod and path
Current entitlementsGET /api/v1/apps/{app}/users/me/entitlements
BalanceGET /api/v1/apps/{app}/users/me/wallet
TransactionsGET /api/v1/apps/{app}/users/me/transactions
UsageGET /api/v1/apps/{app}/users/me/usage
OrdersGET/POST /api/v1/apps/{app}/users/me/orders
Personal statementsGET /api/v1/apps/{app}/users/me/statements
Support tickets/api/v1/apps/{app}/users/me/support/tickets*

When creating an order, reuse one UUID Idempotency-Key for the same business operation. A returned payment intent is not proof of payment; use the subsequently queried order status as the final result.

Cursors are opaque. Return next_cursor unchanged as cursor and obey has_more. Money, Credits, balances, and rates are decimal strings; preserve server precision for display and use a decimal library for calculations.

With the same short-lived Bearer token, the data API can expose authorized endpoints such as /v1/chat/completions, /v1/balance, and /v1/usage. Available capabilities follow current entitlements and /v1/models.