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 $EPISMO_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

Credits are consumed after a credit-gated request succeeds. Validation failures are not charged.

Operation Cost
packs.create 5 credits
packs.search 5 credits
suggestions.create 5 credits
aliases.upsert 5 credits
tracks.search 2 credits
suggestions.search 2 credits
aliases.list 2 credits
packs.get 1 credit
tracks.get 1 credit
tracks.apply 1 credit
packs.update/delete/like 1 credit
packs.run 1 credit
tracks.create/update/delete 1 credit
logs.list 1 credit
suggestions.get/update/resolve 1 credit
aliases.get/delete 1 credit
logs.create/delete free

A GET /v1/packs read costs the same 1 credit whether you request the outline, selected blockIds / stepIds, or full=true. Write endpoints are charged as standard calls. Failed validation and unsuccessful requests do not consume credits. Checking balance and starting checkout (GET / POST /v1/credits) do not consume credits. Appending or deleting a log also does not consume credits — logging is meant to be cheap enough that agents append liberally.

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