sablenetwork
Documentation — all sections

Cost & metering

Every inference is metered. Pricing is published per model, the exact cost of each call rides along in its signed receipt, and your account totals roll up in GET /v1/usage — all in metadata, none of it touching prompt or completion content.

Per-model pricing

GET /v1/models advertises two price fields per model, both in USD per 1M tokens:

curl https://api.buildsable.com/v1/models \
-H "Authorization: Bearer $SABLE_API_KEY"

# {
#   "data": [
#     {
#       "id": "sable-llama-3.3-70b",
#       "prompt_usd_per_mtok": 0.12,
#       "completion_usd_per_mtok": 0.30,
#       ...
#     }
#   ]
# }

Per-request cost

Each call's metered cost is reported as cost_micro_usdmillionths of a dollar — inside the signed receipt. A cost of 270 means $0.000270. Using micro-USD keeps every figure an exact integer, with no floating-point rounding between the gateway and your books. The cost is prompt_tokens × prompt_usd_per_mtok + completion_tokens × completion_usd_per_mtok (the per-Mtok price is also the per-token micro-USD rate), so at the prices above 1,000 prompt + 500 completion tokens cost 1000×0.12 + 500×0.30 = 270.

{
  "model": "sable-llama-3.3-70b",
  "prompt_tokens": 1000,
  "completion_tokens": 500,
  "total_tokens": 1500,
  "cost_micro_usd": 270,
  "logging": "metadata-only"
}

Because the cost lives in a signed receipt, it's tamper-evident: the same secp256k1 signature that proves the inference happened also proves what it cost. See Verifiable receipts.

Token counts come straight from the upstream's usage block. On the rare streamed response where an upstream omits it, Sable estimates the counts locally so the call still meters instead of recording zero — an approximation, and only ever a fallback when there's no upstream count to use.

Account totals

GET /v1/usage aggregates spend across your account. The response carries total_cost_micro_usd for the period, and each request entry includes its own cost_micro_usd, so you can reconcile line by line.

import requests

usage = requests.get(
  "https://api.buildsable.com/v1/usage",
  headers={"Authorization": f"Bearer {SABLE_SESSION_TOKEN}"},
).json()

dollars = usage["total_cost_micro_usd"] / 1_000_000
print(f"Spend this period: ${dollars:.6f}")

/v1/usage is session-gated — it uses the dashboard bearer session (sess_…), not an sk-sable_… key. To cap what a single key can spend, set a spend_limit_usd when you mint it; see API key controls.