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 |
tracks.search |
2 credits |
packs.get |
1 credit |
tracks.get |
1 credit |
tracks.apply |
1 credit |
packs.update/delete/like |
1 credit |
tracks.create/update/delete |
1 credit |
aliases.* |
1 credit |
credits.balance/checkout |
1 credit |
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.
Credit-gated operations can return 402 Payment Required when the selected context does not have enough credits.