Admin Billing Spend Reports

Get admin spend report

Returns period-bucketed spend in dollars and credits across all organizations. Use organization_name as a group_by dimension for organization-level spend dashboards.

get/api/v1/admin/billing/spend/report

Request

  • Base URL: https://api.sanifu.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.sanifu.ai/api/v1/admin/billing/spend/report
  • Auth: one of:
    • OAuth 2 (password, token URL auth/jwt/login)
    • HTTP basic

Query parameters

preset'mtd' | 'qtd' | 'ytd' | 'last_7d' | 'last_30d' | 'last_90d' | 'last_365d' | 'all_time' | 'custom'

Preset date range. Use custom with start_date and end_date for an explicit range.

granularity'day' | 'week' | 'month' | 'quarter' | 'year'

Time bucket size for rows in the report.

start_datestring date nullable

Inclusive start date. Required when preset=custom.

end_datestring date nullable

Inclusive end date. Required when preset=custom.

group_byBillingUsageDimension[]

Dimensions to group by in addition to the period bucket. Supports up to 3 values. Admin reports can use organization_name for cross-organization charts.

metricsBillingSpendMetric[]

Spend metrics to return. Spend reports only include money/credit totals; use usage/report for quantities and counts.

source_typestring[] nullable

Filter by source: execution or builder.

providerstring[] nullable

Filter by AI/service provider returned by billing events, such as openai, anthropic, aws.

model_namestring[] nullable

Filter by model name, such as gpt-6-sol or claude-sonnet-4.

item_typestring[] nullable

Filter by usage item type, such as input_tokens, output_tokens, runtime_minutes, pages, requests, or agent_call.

transaction_typestring[] nullable

Filter by credit transaction type, such as workflow_execution or agent_usage.

environmentstring[] nullable

Filter by billing environment: production or sandbox.

organization_idinteger[] nullable

Filter by organization ID. Most useful with the admin organization lookup endpoint for unique organization selection.

organization_namestring[] nullable

Filter by organization name. Most useful on admin reports.

agent_namestring[] nullable

Filter by AI/builder agent name, such as intent_analyzer. This is not the data app name.

data_app_namestring[] nullable

Filter by data app name for readable dashboards.

workflow_namestring[] nullable

Filter by workflow name.

component_namestring[] nullable

Filter by workflow component name, such as ai_classifier or textract_reader.

record_categorystring[] nullable

Filter by execution record category, such as runtime or component.

container_slugstring[] nullable

Filter by runtime container tier used for runtime usage.

execution_contextstring[] nullable

Filter by execution context, such as direct, for_each, or parallel.

loop_typestring[] nullable

Filter by loop type, such as parallel_map or for_each.

app_typestring[] nullable

Filter by triggering app type, such as gmail, slack, scheduler, or pubsub.

integration_patternstring[] nullable

Filter by integration pattern, such as webhook, schedule, or pubsub.

Response

Successful Response

granularity'day' | 'week' | 'month' | 'quarter' | 'year' required
start_datestring date required

Inclusive start date used by the report.

end_datestring date required

Inclusive end date used by the report.

group_byBillingUsageDimension[] required

Dimensions used to group each row.

metricsBillingSpendMetric[] required

Spend metrics returned in summary and rows.

summaryobject required

Spend totals across the entire selected date range after filters.

Example response

{
  "end_date": "2026-05-08",
  "granularity": "day",
  "group_by": [
    "data_app_name"
  ],
  "metrics": [
    "usd",
    "credits"
  ],
  "rows": [
    {
      "dimensions": {
        "data_app_name": "Invoice Processor"
      },
      "metrics": {
        "credits": "184200.00000000",
        "usd": "18.42000000"
      },
      "period_end": "2026-05-02",
      "period_start": "2026-05-01"
    }
  ],
  "start_date": "2026-04-09",
  "summary": {
    "credits": "2849123.45670000",
    "usd": "284.91234567"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.