Skip to Content
Billing

Billing

Computalot uses account credits. When you submit a job, Computalot places a bounded hold against your balance for the initial attempt and the requested max_retries budget. After the job reaches a terminal state, the hold settles to actual ledger usage. Infrastructure requeues do not consume the configured retry budget. API keys and wallet sessions see the same billing truth. For rates and worked cost examples, see Pricing.

How it works

  1. Submit a job — Computalot estimates the cost and places a hold
  2. Job runs — your balance stays reserved
  3. Job completes — the hold settles to the actual cost

If your account cannot cover the estimated hold, Computalot rejects the job before it starts.

The billing truth is on GET /api/v1/account/balance, GET /api/v1/account/holds, GET /api/v1/account/ledger, and GET /api/v1/account/quotes.

Checking your balance

curl -sS -H "Authorization: Bearer $TOKEN" \ https://computalot.com/api/v1/account/balance

The response returns:

FieldDescription
ledger_balance_usdTotal credits minus settled charges
held_usdCurrently reserved for active jobs
available_usdSpendable balance (ledger minus holds)

Use GET /api/v1/account/holds to inspect active reservations, GET /api/v1/account/ledger for settled credits/debits, and GET /api/v1/account/quotes for open funding or shortfall quotes.

Funding with x402 or MPP

The programmatic funding rail speaks two HTTP-402 payment protocols over the same quotes: x402 and MPP (Machine Payments Protocol). Both settle the same EIP-3009 USDC authorization. Use the protocol that your wallet tooling supports. No subscription or credit card is necessary.

# 1. Request a top-up quote curl -sS "$BASE_URL/api/v1/account/quotes/topup" \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"amount_usd": 5.0}' # 2. Response: 402 Payment Required, advertising both protocols: # - x402: PAYMENT-REQUIRED header + payment_required in the body # - MPP: WWW-Authenticate: Payment header + decoded challenge in the body's mpp block

Pay over x402 — sign payment_required.accepts[0]. Then settle with the base64 payment payload in PAYMENT-SIGNATURE (bearer auth required):

curl -sS "$BASE_URL/api/v1/account/quotes/<quote_id>/pay/x402" \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "PAYMENT-SIGNATURE: <x402 payment payload>"

Pay over MPP — sign the same EIP-3009 authorization for the decoded challenge request. Wrap it as an MPP credential ({challenge, payload: {type: "authorization", ...}, source}). Then resubmit with the Payment authorization scheme. No bearer token is necessary:

curl -sS "$BASE_URL/api/v1/account/quotes/<quote_id>/pay/x402" \ -X POST \ -H "Authorization: Payment <base64url MPP credential>" # success returns a base64url JSON Payment-Receipt response header

Settlements are replay-safe on both carriers. A repeat of a settled payment returns 200 with replay: true and does not double-credit.

One rule applies to every 402 Payment Required: the response attaches a ready-to-pay shortfall quote. Fund the account (pay that quote or top up). Then retry the same request unchanged. This rule applies to both POST /api/v1/jobs and POST /api/v1/projects/:name/init. Do not modify the payload first. The original request was fine.

What’s charged

  • Job execution — charged against credits, based on resource usage and runtime
  • Project init — free. It requires at least $5 of available balance
  • Artifact storage — no usage charge in v1. Retained local and R2 bytes count against the default 100 GiB account quota until deletion

Artifact lifetime is not a fixed seven-day window. Active producing-job and job-input references block deletion. When every reference is terminal, owner deletion releases quota immediately. Computalot collects namespaced backing data after the default 24-hour grace period.

Endpoints

MethodPathDescription
GET/api/v1/account/balanceCurrent balance and holds
GET/api/v1/account/ledgerTransaction history
GET/api/v1/account/holdsActive holds
GET/api/v1/account/quotesFunding and shortfall quotes
GET/api/v1/account/quotes/:idOne quote, including its x402 requirements and MPP challenge
POST/api/v1/account/quotes/topupRequest a top-up quote (also settles MPP credentials)
POST/api/v1/account/quotes/:id/pay/x402Settle a quote — x402 PAYMENT-SIGNATURE or MPP Authorization: Payment
Last updated on