Updated Apr 27, 2026
reference

Wallet #

GET /wallet: current balance, spendable funds, and freeze status.

The wallet endpoint is the cheapest authenticated call in the API. Use it as a smoke test for credentials, as a low-balance alarm, and as a freeze check before submitting jobs.

GET /wallet

Returns the wallet for the account that owns the API key used to authenticate the request.

MethodPathAuthReturns
GET/api/v1/walletHTTP Basic200 OK + WalletStatusResponse
bash
curl -u "$DD_KEY:$DD_SECRET" \
  https://api.datadistillers.com/api/v1/wallet

Response:

json
{
  "balance":      125.40,
  "spendable":    119.85,
  "is_frozen":    false,
  "frozen_reason": null
}
FieldTypeMeaning
balancenumberTotal credits deposited and not yet finalised as spend.
spendablenumberbalance minus held funds for in-flight jobs. The amount available to start new jobs.
is_frozenbooleanIf true, new jobs are rejected with 402.
frozen_reasonstring | nullHuman-readable cause when is_frozen. Common values: payment_failed, manual_freeze, compliance_review.

Use as a credentials smoke test

GET /wallet is the cheapest authenticated endpoint in the API. Pair it with a CI check or deploy hook to fail fast on broken credentials:

bash
HTTP=$(curl -s -o /dev/null -w '%{http_code}' \
  -u "$DD_KEY:$DD_SECRET" \
  https://api.datadistillers.com/api/v1/wallet)

case "$HTTP" in
  200) echo "✓ DataDistillers credentials valid";;
  401) echo "✗ DataDistillers credentials INVALID"; exit 1;;
  *)   echo "✗ DataDistillers API returned $HTTP"; exit 1;;
esac

Run this immediately after deploys, after rotating secrets, and from a periodic synthetic monitor.

Low-balance alerting

A 5-minute cron that pages on low spendable balance:

py
import os, requests

THRESHOLD = 50.00

w = requests.get(
    'https://api.datadistillers.com/api/v1/wallet',
    auth=(os.environ['DD_KEY'], os.environ['DD_SECRET']),
).json()

if w['is_frozen']:
    page(f"DD wallet frozen: {w['frozen_reason']}")
elif w['spendable'] < THRESHOLD:
    warn(f"DD spendable balance low: ${w['spendable']:.2f}")

For a billing dashboard, pair the wallet endpoint with GET /usage to show "balance now" alongside "spend over the last 30 days."

Spendable vs balance

The gap between balance and spendable is the sum of holds for in-flight jobs. Holds are estimates; actual cost is usually less. After all in-flight jobs settle, spendable rises back toward balance (less the actually-spent portion).

A persistent gap that never closes usually means jobs are stuck in running for unreasonable durations; page on it the same way you would unrecovered queue depth in your own services.

Errors

StatusCause
401Auth credentials missing or invalid.
429Rate limited.
Esc
↑↓Navigate↵OpenEscClose