Skip to content
AISpendbook

Your app's data

CSV & JSON imports

Upload usage, billing or revenue files, with column reference and example files.

Upload a file, choose its type, confirm the suggested column mapping, and review validation results. Rejected rows are listed with their row numbers before anything is written. Importing the same rows again doesn't create duplicates, because rows are keyed by event_id or a stable hash. Files can be up to 4 MB.

AWS billing export (Bedrock)

An AWS Cost and Usage Report CSV. Only Amazon Bedrock lines are kept; other rows are left out and counted. Columns map themselves.

ColumnRequiredMeaning
dateyeslineItem/UsageStartDate.
serviceyeslineItem/ProductCode.
costyeslineItem/UnblendedCost.
usage_typelineItem/UsageType.
currencylineItem/CurrencyCode.
end_datelineItem/UsageEndDate.
charge_typeTax lines are left out.
account_idlineItem/UsageAccountId.
descriptionlineItem/LineItemDescription.
aws_billing_export.csv example

Azure billing export (Azure OpenAI)

An Azure Cost Management actual-cost export CSV. Only Azure OpenAI and Foundry Models lines are kept; other rows are left out and counted.

ColumnRequiredMeaning
dateyesDate or UsageDateTime.
serviceyesMeterCategory.
costyesCostInBillingCurrency, PreTaxCost or Cost.
sub_serviceMeterSubCategory.
usage_typeMeterName.
currencyBillingCurrencyCode.
charge_typeChargeType.
account_idSubscriptionId.
descriptionProductName.
azure_billing_export.csv example

Provider costs / invoices

Provider cost exports or invoice lines. Stored as billed spend, which is the source of truth for totals.

ColumnRequiredMeaning
dateyesBilling day or period start.
provideryesanthropic, openai, google, …
costyesCharged amount (in the row's currency).
currencyISO code; defaults to USD.
modelIf the line is model-specific.
line_itemInvoice description / SKU.
cost_typetokens, web_search, code_execution, …
project_idProvider project id.
workspace_idProvider workspace id.
end_datePeriod end, if a line spans several days.
event_idStable id; otherwise a hash of the row is used.
provider_costs.csv example

Provider token usage

Token usage aggregates per day, model and project, as exported from a provider console.

ColumnRequiredMeaning
dateyesUsage day.
provideryesanthropic, openai, …
modelyesModel id.
input_tokensUncached input tokens.
output_tokensOutput tokens.
cache_read_tokensPrompt-cache reads.
cache_write_tokensPrompt-cache writes.
request_countNumber of requests.
project_idProvider project id.
service_tierstandard, batch, priority, …
event_idStable id; otherwise a hash of the row is used.
token_usage.csv example

Model usage summary

Requests, tokens and reported cost per model and period.

ColumnRequiredMeaning
dateyesPeriod day.
modelyesModel id.
request_countyesNumber of requests.
providerInferred from the model when missing.
input_tokensInput tokens.
output_tokensOutput tokens.
costReported cost.
currencyISO code; defaults to USD.
project_idProject id.
event_idStable id; otherwise a hash of the row is used.
model_usage.csv example

Request-level records

One row per model call, for example a log export. Enables attribution by customer, feature and user.

ColumnRequiredMeaning
timestampyesWhen the call happened (with a time zone, or set one in options).
modelyesModel id.
providerInferred from the model when missing.
input_tokensUncached input tokens.
output_tokensOutput tokens.
cache_read_tokensPrompt-cache reads.
cache_write_tokensPrompt-cache writes.
customer_idYour customer/account id.
end_user_idIndividual user id.
featureFeature / workflow that made the call.
categoryUsage category.
request_idProvider request id (de-duplication).
costYour recorded cost, if any.
currencyISO code; defaults to USD.
statussuccess / error / HTTP status.
latency_msLatency in milliseconds.
event_idStable id; otherwise a hash of the row is used.
request_data.csv example

Customer mappings

Maps external ids (for example Stripe customer ids) to your customer_id.

ColumnRequiredMeaning
external_idyesId in the other system.
customer_idyesYour customer id used on usage.
customer_nameDisplay name.
sourceSystem the external id comes from.
customer_mappings.csv example

Monthly provider invoices

One row per provider invoice: month, provider and amount. Stored as billed spend for the whole month, so forecasts, budgets and spend by provider work from the first upload.

ColumnRequiredMeaning
monthyesYYYY-MM, or any date in the invoiced month.
provideryesanthropic, openai, google, …
amountyesInvoice total for the month.
currencyISO code; defaults to USD.
invoice_idOptional; shown as the line item.
provider_invoices.csv example

Customer, feature and plan names

Display names for the customer and feature ids in your telemetry and for plan ids (such as Stripe product ids), shown on margin, statements and analytics tables.

ColumnRequiredMeaning
idyesThe customer id or feature id as it appears in telemetry, or the plan id.
nameyesThe name to show.
kindcustomer, feature or plan; customer when missing.
display_names.csv example

Customer revenue

Monthly revenue per customer, used for AI cost as a share of revenue and margin after AI.

ColumnRequiredMeaning
customer_idyesMust match customer_id on usage.
monthyesYYYY-MM (or a date in the month).
revenueyesRevenue for the month.
currencyISO code; defaults to USD.
revenue.csv example
customer_id,month,revenue_usd,customer_name
acme,2026-10,12000.00,Acme Corp
globex,2026-10,4500.00,Globex

Timestamps need a time zone (ISO-8601 with an offset, or epoch seconds or milliseconds). If yours have none, set “assume time zone” in the mapping options. Money is in US dollars unless the file has a currency column and you enter a rate.

  • No admin key yet? The Monthly provider invoices type takes one row per month and provider. Each row is billed cost for the whole month, dated on its first day, so spend by provider, forecasts and budgets work after the first upload.
  • A mapping that validates is remembered for the next file with the same import type and the same column names, and that file is pre-filled.
  • Import history has Undo on committed imports: it removes the ledger records, revenue, customer mappings and names the import wrote.
  • Card statements, seat lists and non-token cost files have their own uploads: see cards, AP and contracts, seat connectors and voice, audio and RAG cost.