Billing and usage
Pricing tiers (illustrative)
| Tier | Price | Notes |
|---|---|---|
| Sandbox | Free | ~500 labels, no card |
| Growth | ~$0.04 / consensus label | Production default |
| Scale | ~$0.025 / consensus label | Volume discount |
| Enterprise | Custom | Contract, SLAs |
Exact numbers depend on your contract — the API exposes usage and invoices for reconciliation.
How Costs Are Calculated
Each task's cost is computed from the actual BSV settlement:
task_cost = payout_per_worker × number_of_agreeing_workers
For example, with the default payout of 325 sats/worker and a threshold of 3 (2 agreeing):
- Task cost = 325 × 2 = 650 sats
The dashboard aggregates these real costs across all your tasks.
info
Tasks settled before cost tracking was added will show cost_sats: 0 (unknown),
not a fabricated value.
Sandbox quota
- New registrations receive sandbox tier with
label_quota(default 500 in the reference Gateway). - Each successful task submission decrements quota by 1 (batch by N tasks).
403 when exhausted:
{
"error": "quota exhausted"
}
Usage — GET /v1/billing/usage
Optional query: month=YYYY-MM (defaults to current UTC month).
curl -sS -H "Authorization: Bearer $API_KEY" \
"https://api.asgrefinery.io/v1/billing/usage?month=2026-04"
Example (200):
{
"customer_id": "cust_...",
"month": "2026-04",
"tier": "growth",
"tasks_settled": 1204,
"total_cost_sats": 1204000,
"total_cost_usd_estimate": 8.03,
"worker_payouts_sats": 1100000,
"platform_fee_sats": 104000,
"daily_breakdown": [
{ "date": "2026-04-01", "tasks": 40, "cost_sats": 40000 }
]
}
Python
import os
import requests
r = requests.get(
"https://api.asgrefinery.io/v1/billing/usage",
params={"month": "2026-04"},
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
timeout=30,
)
print(r.json())
Invoices — GET /v1/billing/invoices
curl -sS -H "Authorization: Bearer $API_KEY" \
https://api.asgrefinery.io/v1/billing/invoices
Example (200):
{
"invoices": [
{
"month": "2026-03",
"status": "closed",
"tasks_settled": 980,
"total_cost_sats": 980000,
"total_cost_usd_estimate": 6.53
}
]
}
info
status and invoice PDF delivery depend on your billing integration — the Gateway returns summary rows for dashboard and automation.