Import AI usage by CSV to understand costs across providers such as OpenAI, Anthropic and Google. Compare models and workflows to see where spending is concentrated.
What to upload
Each row can be an AI call or a rollup for a day or month. Use consistent rollups so totals are easy to compare.
| Column | Required | Notes |
|---|---|---|
provider | Yes | Provider name, such as openai or anthropic |
model | Yes | Model name used in your records |
workflow_type | Yes | Workflow or application, such as email-draft |
occurred_at | Yes | Date or ISO timestamp |
cost_usd | Cost or tokens | Include explicit cost in USD for spend analysis |
input_tokens | No | Input token count |
output_tokens | No | Output token count |
total_tokens | Cost or tokens | Total token count; can also be calculated from input and output |
cost_center | No | Team or department |
user_id | No | Workspace user UUID for user attribution |
Include cost_usd. Rows with only token counts show a cost of $0. For user attribution, supply the workspace user UUID. Use cost_center to group spending by team.
Common header aliases are accepted, including workflow, app, date, timestamp, cost and department. Column names are matched without case sensitivity.
Where to get this data
- OpenAI or Anthropic: export usage and cost data from your provider account.
- Google: use your Cloud billing export for AI services.
- Your own logs: export AI calls from your gateway, application or usage records.
Map the export to the columns above. Add a workflow label if your export has no application or workflow column.
How to import
- Open Overview → Getting started and choose Import AI usage.
- Download a sample from Settings → CSV templates.
- Remove its opening comment lines, keeping the column header row.
- Choose your CSV and click Import.
- Review Past imports for status, imported rows, skipped rows and errors.
Owners, admins and finance members can import usage. Files can be up to 10 MB and contain up to 100,000 data rows per import.
What you see after import
Open Spend → AI usage:
- Summary cards: total tokens, total AI cost, calls and average cost per call.
- Cost by provider: calls, tokens and cost for each provider.
- Cost by workflow: compare application and workflow totals.
- Analytics: review spend trends and monthly comparisons.
- Recent calls: date, provider, model, workflow, source, status, tokens and cost.
Filter by provider, model, workflow or source. Choose Customer when reviewing your imported AI usage. The Internal source helps you review Nagata's own AI activity separately.
Spike detection
Generate recommendations or refresh alerts after importing new data. AI spend growth can be flagged when the current month rises at least 50% and $200 over a positive prior month total.
Include at least two months of data for meaningful monthly comparisons. Compare a partial current month with care.
Common problems
Missing columns Include provider, model, workflow and a date on each row, plus cost or token counts. Check the skipped row summary for the missing fields.
Unexpected cost totals
Include cost_usd for every row you want included in spend analysis. Plain numbers such as 0.0032 are easiest to review. Check that daily and monthly rollups do not cover the same usage twice.
User totals are incomplete
Use a workspace user UUID in user_id for user attribution. Use cost_center for team attribution.
Only one month of data Add the prior month to support growth comparisons and spike findings.