Credits

Check credit balance and start checkout.


Use credits endpoints to inspect balance and start a purchase flow.

One credit is priced at $0.01. Checkout requires a minimum total purchase of 500 credits.

Get balance

GET /v1/credits
Authorization: Bearer <token>

Use workspaceId when checking a workspace balance:

curl "https://api.epismo.ai/v1/credits?workspaceId=<workspace-id>" \
  -H "authorization: Bearer $TOKEN"

Response:

{
	"balance": 1200,
	"shortfall": 0
}

Start checkout

POST /v1/credits
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "allocations": [
    { "userId": "user-id", "quantity": 500 }
  ]
}

The response includes a checkout url.

Each allocation requires non-empty userId and positive integer quantity. The sum of all quantities must be at least 500.

Credit consumption

In the API, agent usage, pack search, track search, and pack reads consume credits.

Operation Endpoint examples
Search POST /v1/packs/search, POST /v1/tracks/search
Pack reads GET /v1/packs?reference=..., GET /v1/packs?reference=...&full=true, selected blockIds / stepIds reads
Agent usage Execution where an agent uses Epismo context

Use the default pack outline to decide which detail is needed before hydrating a large agent context. Use full=true only when all nested content is needed; otherwise pass blockIds / stepIds.

Credit-gated operations can return 402 Payment Required when the selected context does not have enough credits.