A single AI invoice can support several customers, products, experiments, and internal teams. Without allocation, every project looks more profitable than it is and the company cannot tell whether higher AI spend created value or simply moved between workloads.
Allocation does not require perfect accounting at the request level. It requires consistent rules, clear ownership, and an explicit place for costs that cannot be assigned confidently.
Choose the decision unit first
Ask what the business needs to decide:
- price a client engagement;
- protect the margin of a project;
- compare product features;
- assign a department budget;
- forecast a launch;
- show teams the cost they control.
That answer defines the primary allocation target. An agency will often allocate to client project. A product company may use product, feature, or environment. Finance may also need cost center. Keep the first implementation focused on one primary view and add secondary dimensions only when they support a real decision.
Create stable project identifiers
Every active project needs:
- a unique internal ID;
- a human-readable name;
- an owner;
- start and end dates;
- status;
- budget;
- customer or business unit;
- environment and service mappings;
- provider account, workspace, or key mappings where available.
Do not use a mutable project name as the only key. Names change, collide, and are difficult to reconcile across systems.
Prefer provider boundaries over inference
The cleanest allocation comes from boundaries established before usage occurs.
For OpenAI, separate projects and project-scoped service accounts can isolate usage. For Anthropic, Workspaces and scoped API keys can provide organizational separation. Other providers may expose accounts, folders, teams, tags, or keys.
Use one provider boundary per project when:
- volume is material;
- the project has its own budget or customer;
- credentials need separate access control;
- incident response should not affect other workloads.
Do not create hundreds of tiny boundaries that nobody maintains. The structure should match stable ownership, not every temporary task.
Use a deterministic allocation priority
When multiple signals exist, use a documented priority so the same transaction cannot be silently assigned twice.
A practical order is:
- Manual assignment. A reviewer explicitly selected the project.
- Exact provider mapping. The provider account, workspace, project, or key maps to one project.
- Service mapping. The internal service or deployment belongs to one project.
- Employee-period mapping. An employee worked on exactly one eligible project during the usage period.
- Shared-cost rule. A documented allocation method applies.
- Unallocated. Evidence is insufficient or ambiguous.
Manual and exact provider assignments should not be overwritten by later automation. If two automatic rules point to different projects, leave the cost unallocated and surface the conflict.
Separate direct and shared costs
Direct costs can be traced to one project. Shared costs support several projects: a central evaluation platform, a common support bot, an orchestration service, or a team subscription.
Choose one policy per shared cost:
- Central budget: keep it as a platform or overhead cost.
- Even split: useful when benefit is genuinely similar.
- Usage-proportional: distribute by requests, tokens, active users, or another measured driver.
- Revenue-proportional: useful when the service supports customer accounts with different commercial value.
- Fixed percentages: simple and auditable when the business has agreed on the split.
The FinOps allocation guidance notes that some shared costs can be centrally funded by an informed decision. Full allocation is not always worth the complexity. Document the choice, effective date, and owner.
Keep raw usage and allocation separate
Do not rewrite provider transactions to embed project fields. Store raw usage as received, then create allocation records that reference it.
This preserves:
- auditability;
- the ability to change a rule prospectively;
- reconciliation with provider totals;
- visibility into manual versus automatic decisions;
- an explicit unallocated balance.
Enforce a rule that one transaction can have at most one primary project allocation unless your data model intentionally supports fractional shared-cost allocations. If you support fractions, require the shares to total exactly 100 percent and identify the shared-cost policy.
Handle employee-based costs carefully
Employee-period allocation can help with individual subscriptions or usage that lacks project metadata. It is safe only when the employee has one active project for the relevant period.
If an employee worked across three clients, guessing based on the most recent project will misstate margins. Use timesheets, explicit selection, or leave the cost unallocated. Ambiguity is a data-quality signal, not a reason to invent precision.
Reconcile every period
For each provider and billing period:
Provider total = direct project cost + shared allocated cost + central shared cost + unallocated cost
Allow for taxes, credits, currency conversion, and timing differences. Label estimates separately from settled invoice amounts. Track the reconciliation gap and investigate it before using the numbers for chargeback.
Useful allocation metrics include:
- percentage of spend directly allocated;
- percentage covered by shared-cost rules;
- unallocated amount and age;
- conflicts requiring review;
- time between usage and allocation;
- project cost per accepted task or business outcome.
A high allocated percentage is not automatically good if the rules are wrong. Accuracy and decision usefulness matter more than a cosmetic 100 percent.
Build the review workflow
Give project owners a monthly view containing:
- project budget and actual cost;
- provider and model breakdown;
- shared-cost amount and rule;
- unallocated items awaiting their input;
- material changes from the prior period;
- estimated cost per useful unit.
Let owners correct mappings without editing raw data. Record who changed an allocation, when, and why. Apply corrections consistently to reporting and forecasts.
Example: a small AI agency
An agency has three client projects, one internal marketing project, and a shared evaluation service.
- Each client gets a provider project and a dedicated production service account.
- Internal marketing uses its own key and project ID.
- The evaluation service is centrally funded because every team benefits and its cost is small.
- Individual research subscriptions are allocated by employee only when the employee has one active client assignment that month.
- Ambiguous subscriptions remain unallocated until operations reviews them.
This model is not mathematically elaborate, but it is stable, explainable, and sufficient for client-margin decisions.
Common mistakes
- One shared API key for every project.
- Allocating by employee when employees work across projects.
- Reallocating historical costs whenever a project name changes.
- Hiding unallocated costs inside the largest project.
- Splitting shared costs with a complex formula nobody can explain.
- Treating estimates as reconciled invoice amounts.
- Applying a new policy retroactively without versioning or an audit note.
The practical standard
Start by separating the projects that materially affect pricing or margin. Use exact provider mappings where possible, then deterministic service and employee-period rules. Keep shared and unallocated cost visible. Reconcile the result to provider totals and review exceptions monthly.
Good allocation does not manufacture certainty. It creates enough trustworthy context for owners to budget, price, and optimize the work they are responsible for.
Official sources and references
Spendly Editorial
Practical guidance for teams that need clear ownership and control of AI spending.
