Billing
Estimate before you spend
Price any operation in advance, and read your full resolved rate card.
Every chargeable surface can be priced before you commit. Two endpoints cover it: estimate answers "what would this cost me", rates returns everything you'd ever be charged, resolved for your account.
Estimate an operation
curl -X POST "$API_BASE/v1/billing/estimate" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{ "operation": "adapter_training.specialize", "units": 1 }'from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.billing.post_billing_estimate(json={"operation": "adapter_training.specialize", "units": 1})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.billing.postBillingEstimate({
json: { operation: "adapter_training.specialize", units: 1 },
});
{
"data": {
"operation": "adapter_training.specialize",
"units": 1.0,
"cost_credits": 500.0,
"cost_per_unit": 500.0,
"breakdown": [
{ "layer": "system_default", "value": 500.0 }
]
}
}Request body
| Field | Meaning |
|---|---|
operation required | A dotted path naming a billable operation — the same strings that appear as transaction reasons and in the rate card. |
units optional | Multiplies the per-unit rate. Defaults to 1. Units are runs for trainings, requests for inference, GB for ingestion overage, and so on. |
breakdown lists every layer that shaped your price. If your plan tier
or your account has a negotiated override, it appears as an extra row:
"breakdown": [
{ "layer": "system_default", "value": 500.0 },
{ "layer": "org_override", "org_id": "org_31bd77e0", "override": { "multiplier": 0.8 }, "value": 400.0 }
]Common operations to estimate:
| Operation | Prices |
|---|---|
adapter_training.adapt / .specialize / .forge | A training run at each intensity |
inference.predictfm_ttsi | One inference request |
discovery.run, discovery.tournament, discovery.scenario | Goal operations |
byom.upload_per_mb, byom.validate | BYOM upload, per MB |
ingestion.streaming_per_thousand | Streaming overage, per 1k events |
Errors
| Status | Why | Example message |
|---|---|---|
400 | No operation in the body | "'operation' is required" |
400 | units isn't a number | "'units' must be numeric" |
404 | The operation doesn't exist in the pricing catalog | "Operation 'inference.gpt' not …" |
401 | Missing or invalid token | "Unauthorized" |
Your rate card
Every billable operation with the system default and the price you actually pay, plus your monthly allowances and overage policy:
curl "$API_BASE/v1/billing/rates" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID"from predictai import PredictAI
client = PredictAI(token="pa_live_…", workspace_id="ws_…")
data = client.billing.get_billing_rates()
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…", workspaceId: "ws_…" });
const data = await client.billing.getBillingRates();
{
"data": {
"rates": [
{ "operation": "inference.predictfm_ttsi", "base": 5.0, "effective": 5.0 },
{ "operation": "inference.predictfm_no_ttsi", "base": 2.0, "effective": 2.0 },
{ "operation": "adapter_training.adapt", "base": 50.0, "effective": 50.0 },
{ "operation": "adapter_training.specialize", "base": 500.0, "effective": 500.0 },
{ "operation": "discovery.run", "base": 25.0, "effective": 25.0 },
{ "operation": "discovery.live_day", "base": 5.0, "effective": 5.0 },
{ "operation": "byom.upload_per_mb", "base": 0.05, "effective": 0.05 },
{ "operation": "ingestion.streaming_per_thousand", "base": 0.5, "effective": 0.5 },
{ "operation": "storage.gb_day_hot", "base": 0.336, "effective": 0.336 },
"…"
],
"included_monthly": {
"storage_gb_days_hot": 300.0,
"storage_gb_days_warm": 0.0,
"storage_gb_days_cold": 0.0,
"hosting_days_dedicated": 0.0,
"ingest_gb": 20.0,
"streaming_events_thousands": 200.0,
"query_gb_scanned": 1000000.0,
"connector_runs": 300.0,
"discovery_live_days": 35.0
},
"credit_value_usd": 0.01,
"overage_allowed": true,
"overage_floor_credits": 10000.0,
"free_monthly_drip_credits": 100.0,
"plan_tier": "starter"
}
}Response fields
| Field | Meaning |
|---|---|
rates | base is the platform default; effective is your price after plan-tier and account overrides. Where the two differ, you have a discount (or surcharge) on that operation. |
included_monthly | Your free monthly allowance per meter, granted to each workspace independently. Usage above it bills at the matching rate (e.g. ingest_gb overage at ingestion.bulk_per_gb). |
overage_allowed | Whether your tier can spend past a zero balance into pay-as-you-go, down to overage_floor_credits below zero. |
credit_value_usd | The USD anchor for one credit. |
free_monthly_drip_credits / plan_tier | The free tier's monthly credit drip, and which plan resolved this card. |
Errors
| Status | Why | Example message |
|---|---|---|
401 | Missing or invalid token | "Unauthorized" |
Rates are resolved per account, so cache them per user or organization — not globally. They change only when your plan or a negotiated override changes.

