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 — Tag your calls with department and feature
GL codes are assigned by mapping, not by a per-call header — Cognocient maps X-Cost-Department values to GL accounts, so make sure your calls already carry X-Cost-Department (and X-Cost-Feature, which appears in the export as project_code):
There is no X-Cost-GL-Account call header that feeds the chargeback export — GL codes are assigned centrally per department in Step 2, not per call.
Step 2 — Map each department to a GL account
Go to Chargeback → GL Mappings. For each department value you use in X-Cost-Department, add a mapping to a GL account code and name (e.g. customer-success → 6420 / "Software & SaaS"). Every call tagged with that department automatically picks up the mapped GL code in the export — no per-call configuration needed.
Step 3 — Generate the chargeback report
Go to Chargeback → Department Breakdown, pick the billing month, and export. The generic CSV export contains:
| Column | What it contains |
|---|---|
| date | Call date |
| department | From X-Cost-Department |
| project_code | From X-Cost-Feature |
| gl_account | Mapped GL account code |
| gl_account_name | Mapped GL account name |
| amount_usd | Aggregated cost |
| description | Line-item description |
There's no separate Provider or Token Volume column in this export — if you need per-provider or token-level detail, use the FOCUS export or the API Call Log instead.
Step 4 — Export for your accounting system
FOCUS export — Click Download FOCUS CSV on the Chargeback page. Cognocient's FOCUS export currently targets FOCUS 1.2 on a best-effort basis (not a certified 1.1 or 1.2 conformance claim). The department maps to the FOCUS SubAccountId field; the GL account code itself appears in a custom x-cog-gl-account tag column, not SubAccountId.
There is no separate PDF chargeback export today — CSV (generic or FOCUS) is the only chargeback export format.
Scheduled delivery — Go to Reports → Scheduled Delivery to have an AI ROI Summary or Full Detail Report emailed automatically each month. This is a general spend/ROI report, not a GL-coded chargeback document — for the GL-coded breakdown, export the CSV from the Chargeback page directly each period.
Done
Finance now has AI spend pre-coded by GL account via department mappings — 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.