Predict.aiDocs
Billing

Balance & usage

Read your credit balance and your live quota usage.

Check your balance

curl "$API_BASE/v1/billing/balance" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace-Id: $WORKSPACE_ID"
{
  "data": {
    "scope": "user",
    "uid": "usr_7f3a91c2",
    "current_balance": 3240.5,
    "total_granted": 5500.0,
    "total_spent": 2259.5
  }
}

scope is user or org — charges land on your organization's wallet when you operate in an organization context, and uid is the wallet owner's ID accordingly.

Errors

StatusWhyExample message
401Missing or invalid token"Unauthorized"

Quota usage

Live counts of every quota-capped object. Quotas are enforced per workspace (each workspace gets its own allowance), so the counts are scoped to the workspace in your X-Workspace-Id header — or pass an explicit workspace_id query parameter. Only workspaces is an account-wide count, since that cap is account-level.

curl "$API_BASE/v1/billing/usage" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Workspace-Id: $WORKSPACE_ID"
{
  "data": {
    "usage": {
      "workspaces": 3,
      "segments": 12,
      "pipelines": 4,
      "models": 7,
      "byom_models": 1,
      "predictfm_adapters": 0,
      "goals": 2,
      "streams": 2,
      "deployments": 5,
      "deployments_public": 3,
      "deployments_dedicated": 0,
      "signals": 184220
    },
    "workspace_id": "ws_1a2b3c4d"
  }
}

deployments_public and deployments_dedicated count active deployments in each serving bucket — those are what the corresponding caps enforce. What each key gates: Concepts → Quotas.

Errors

StatusWhyExample message
401Missing or invalid token"Unauthorized"

On this page