How do I map AI spend to GL accounts?
Tag every AI call with a GL account code so finance can process it automatically. Takes 10 minutes to set up — after which chargeback reports arrive pre-coded for your accounting system.
Goal: Every AI API call automatically attributed to the correct General Ledger account, with a monthly chargeback report finance can import directly.
Prerequisites: Cognocient proxy key in place, at least one application making calls through the proxy.
Step 1 — Add the GL account header to your calls
Add X-Cost-GL-Account to every API call. Use your organisation's existing GL code — the same code that appears on your expense reports and invoices.
If different features charge to different GL accounts, add the header conditionally in the function that wraps your AI calls.
Step 2 — Tag historical calls (optional)
If you want historical GL attribution without changing code for every call site, set a default GL account on your proxy key instead. Go to Settings → API Keys, click your key, and set a Default GL Account. Every call from that key inherits the account unless the call overrides it with its own header.
Default GL accounts on proxy keys work well for single-GL-code teams. If your org has multiple GL codes across features, you need per-call headers (Step 1) rather than a key-level default.
Step 3 — Generate the chargeback report
Go to Dashboard → Chargeback. Select your billing period and click Generate Report. The report shows:
| Column | What it contains |
|---|---|
| GL Account | The code you passed in X-Cost-GL-Account |
| Department | From X-Cost-Department |
| Feature | From X-Cost-Feature |
| Total Spend | Aggregated cost for the period |
| Provider | OpenAI / Anthropic / etc. |
| Token Volume | Input + output tokens |
Step 4 — Export for your accounting system
FOCUS 1.1 export — Click Export → FOCUS 1.1 on the Chargeback page. The resulting CSV is compatible with CloudZero, Apptio, and any BI tool. The GL account code appears in the SubAccountId field per the FOCUS specification.
PDF chargeback — Click Export → PDF for a formatted report you can send to finance as an email attachment. The GL code breakdown appears as a separate section.
Scheduled delivery — Go to Reports → Scheduled and configure monthly delivery. Finance receives the chargeback PDF on the first of each month without anyone manually triggering it.
Done
Finance now receives a monthly report with AI spend pre-coded by GL account. No manual categorisation, no spreadsheet assembly.
Once GL attribution is working, set up budget enforcement per GL account or department to prevent overspend before it reaches the bill.
Related articles
Tag Your First AI Call
Add 2 headers to your existing code and see per-feature spend in under 5 minutes.
Set a Monthly Spending Limit
Create a hard budget enforced at the proxy before charges reach your provider bill.
Cut Your AI Bill with One Click
Use AI Advisor recommendations to apply model downgrades and caching without code changes.