Skip to content

Billing & Credits

Catalyzed uses a credit-based billing system. Credits are consumed by various operations and tracked at the team level.

  • Each team has a credit balance tracked in nanodollars (for precision)
  • Operations consume credits based on resource usage
  • When credits are depleted, operations may be blocked
  • Credits can be purchased or allocated by plan
OperationCredit Cost
Query executionBased on data scanned
Data storagePer GB per month
File processingBased on file size
Pipeline executionBased on compute time
AI model usageBased on tokens

Get credit balance

Terminal window
curl "https://api.catalyzed.ai/teams/ZkoDMyjZZsXo4VAO_nJLk/credits/balance" \
-H "Authorization: Bearer $API_TOKEN"

Response:

{
"teamId": "ZkoDMyjZZsXo4VAO_nJLk",
"balanceNanodollars": 8500000000,
"balanceUsd": 8.50,
"totalCreditsNanodollars": 10000000000,
"totalCreditsUsd": 10.00,
"totalUsageCostNanodollars": 1500000000,
"totalUsageCostUsd": 1.50,
"hasSufficientFunds": true
}

The response provides both nanodollar (precise) and USD (human-readable) values for convenience.

View credit transactions with the ledger endpoint:

List credit ledger entries

Terminal window
curl "https://api.catalyzed.ai/teams/ZkoDMyjZZsXo4VAO_nJLk/credits/ledger?limit=50&offset=0" \
-H "Authorization: Bearer $API_TOKEN"

Response:

{
"entries": [
{
"teamCreditLedgerId": "pQqghNlazy2Yxil4OKQcv",
"teamId": "ZkoDMyjZZsXo4VAO_nJLk",
"entryType": "usage",
"amountNanodollars": -150000000,
"amountUsd": -0.15,
"description": "Query execution",
"metadata": null,
"createdBy": "usr_abc123",
"createdAt": "2024-01-15T14:30:00Z",
"idempotencyKey": null
},
{
"teamCreditLedgerId": "zk3PnrrwUDWk_HWXQilsX",
"teamId": "ZkoDMyjZZsXo4VAO_nJLk",
"entryType": "credit",
"amountNanodollars": 10000000000,
"amountUsd": 10.00,
"description": "Monthly allocation",
"metadata": null,
"createdBy": null,
"createdAt": "2024-01-01T00:00:00Z",
"idempotencyKey": null
}
],
"total": 2,
"limit": 50,
"offset": 0
}
Terminal window
# Filter by entry type
curl "https://api.catalyzed.ai/teams/ZkoDMyjZZsXo4VAO_nJLk/credits/ledger?entryType=usage"
# Filter by date range
curl "https://api.catalyzed.ai/teams/ZkoDMyjZZsXo4VAO_nJLk/credits/ledger?startDate=2024-01-01T00:00:00Z&endDate=2024-01-31T23:59:59Z"
Entry TypeDescription
creditCredits added (purchase, allocation, bonus)
usageCredits consumed by operations
adjustmentManual adjustment by support
refundCredits returned for failed operations

The Catalyzed app provides a billing dashboard:

  1. Navigate to Team Settings
  2. Select the Billing tab

You’ll see:

  • Credit Balance - Current credits remaining (USD)
  • Total Usage - Credits used this billing period
  • Ledger - Transaction history
  • Usage Breakdown - By operation type

For credit-intensive operations, check balance first:

async function checkCreditsAndQuery(sql: string, tableName: string, tableId: string) {
// Check credits
const creditsResponse = await fetch(
`https://api.catalyzed.ai/teams/${teamId}/credits/balance`,
{ headers: { Authorization: `Bearer ${apiToken}` } }
);
const credits = await creditsResponse.json();
if (!credits.hasSufficientFunds) {
throw new Error("Insufficient credits. Please add more credits.");
}
// Execute query
const queryResponse = await fetch("https://api.catalyzed.ai/queries", {
method: "POST",
headers: {
Authorization: `Bearer ${apiToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
sql,
tables: { [tableName]: tableId },
}),
});
return queryResponse.json();
}

When credits are depleted, you’ll receive a 402 Payment Required response:

{
"error": "Insufficient credits",
"code": "INSUFFICIENT_CREDITS"
}
  • Use LIMIT to reduce data returned
  • Select only needed columns (avoid SELECT *)
  • Add WHERE clauses to filter early
  • Create indexes on frequently filtered columns
  • Use Parquet format for large datasets (more efficient)
  • Delete unused tables and files
  • Archive old data you don’t need to query
  • Combine multiple small inserts into batch inserts
  • Group related queries together

Regularly review the credit ledger to identify:

  • Unexpected high-cost operations
  • Inefficient queries
  • Unused resources

Set up alerts for low credit balance in the app:

  1. Go to Team Settings > Billing
  2. Click Configure Alerts
  3. Set threshold (e.g., alert when balance below $10)
  4. Choose notification method (email, webhook)

Operations that consume credits will fail with a 402 error and INSUFFICIENT_CREDITS code. Read operations (listing, getting) continue to work.

Depends on your plan. Free tier credits do not roll over. Paid plans may have rollover options.

Credits are automatically refunded for operations that fail due to system errors. User errors (invalid SQL, etc.) are not refunded.

Query costs are based on:

  • Data scanned (bytes read from storage)
  • Compute time (execution duration)
  • Result size (bytes returned)