---
title: How do you see AI costs inside data platforms like Snowflake and Databricks?
url: https://opencontroller.lyzr.com/blog/where-ai-agent-costs-hide-in-data-platforms
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# How do you see AI costs inside data platforms like Snowflake and Databricks?

**AI spend inside data platforms is billed as platform credits or DBUs, so it never shows up on a model provider invoice. Query the platforms' own usage views: in Snowflake, `SNOWFLAKE.ACCOUNT_USAGE` views such as `USER_AI_USAGE_HISTORY` and `CORTEX_AGENT_USAGE_HISTORY`; in Databricks, `system.billing.usage` filtered by `billing_origin_product`, plus `system.ai_gateway.external_model_spend`.** Then join to tags and owners so finance sees spend by agent and team.

The call question summed it up: "AI spend inside our data platforms is invisible to finance. How do we surface it?" This is common. Teams track OpenAI and Anthropic invoices closely while AI functions, agents and model serving inside the warehouse grow under a general "data platform" line. For gateway-level attribution, see [how to attribute LLM costs to individual AI agents](/blog/how-to-attribute-llm-costs-to-ai-agents).

## Why does data-platform AI spend go missing?

- **It is billed in platform units.** Snowflake credits and Databricks DBUs, not tokens on a provider invoice.
- **It rides on existing contracts.** Spend draws down a pre-committed balance, so no new purchase order is raised.
- **It is easy to call.** An analyst can run an AI function over millions of rows in one SQL statement.
- **It is owned by data teams.** AI governance and finance teams may not have access to the usage views.

## Where is AI spend in Snowflake?

| View (`SNOWFLAKE.ACCOUNT_USAGE`) | What it shows | Use it for |
| --- | --- | --- |
| `USER_AI_USAGE_HISTORY` | Hourly AI credits by user, service type and object | Who spent what, on which agent or function |
| `CORTEX_AGENT_USAGE_HISTORY` | Credits and tokens per Cortex Agent | Per-agent cost |
| `CORTEX_AI_FUNCTIONS_USAGE_HISTORY` | AI Functions usage | Bulk SQL AI calls |
| `METERING_DAILY_HISTORY` | Daily credits by service type | Reconciling to the bill |

`USER_AI_USAGE_HISTORY` reports service types including `AI_FUNCTIONS`, `CORTEX_AGENTS`, Cortex Code variants and `AI_INFERENCE` (inference routed through Snowflake's AI Gateway). Its credits exclude warehouse credits, and a `USER_ID` of 0 means usage that could not be attributed. Snowflake notes the view does not cover every AI service type that `METERING_DAILY_HISTORY` bills, so reconcile the two. A deeper Snowflake walkthrough is in [how to track Snowflake Cortex AI spend](/blog/track-snowflake-cortex-ai-spend).

## Where is AI spend in Databricks?

`system.billing.usage` holds billable usage with a `billing_origin_product` column. AI-related values include:

- `MODEL_SERVING` (serving endpoints, including foundation models)
- `AI_FUNCTIONS`
- `AI_GATEWAY` and `AI_RUNTIME`
- `VECTOR_SEARCH`
- `AGENT_BRICKS`, `SUPERVISOR_AGENT` and `AGENT_EVALUATION`
- `GENIE`
- `FOUNDATION_MODEL_TRAINING`

Useful `usage_metadata` fields include `endpoint_name` and `endpoint_id` for serving endpoints, `app_id` and `app_name` for Databricks Apps, and `agent_bricks_id` for Agent Bricks workloads. `custom_tags` carries tags such as team or cost centre. For external models routed through Databricks' gateway, `system.ai_gateway.external_model_spend` gives estimated spend in USD with provider, model and request tags.

Multiply DBUs by your contracted rate (or join to `system.billing.list_prices` for list prices) to get currency.

## How do you roll it up for finance?

1. **Grant read access** to the usage views for the AI governance or FinOps role.
2. **Extract daily** into one cost table: date, platform, service, object, user, tags, units, currency amount.
3. **Map objects to agents.** Join endpoint, agent and app names to your agent registry so each line has an agent and owner.
4. **Allocate the unattributed.** Track the share of spend with no user or tag and drive it down.
5. **Report monthly** next to model provider invoices so finance sees total AI spend in one place. See [what AI spend reports a CFO needs](/blog/ai-spend-reporting-for-finance-leaders).
6. **Set alerts** for daily spend spikes per agent or team.

## How Opencontroller does this

Opencontroller connects to Databricks among other agent platforms, and auto-discovers agents, models and API keys across AWS, Azure and Google Cloud into one governed registry. Where traffic runs through its LLM Gateway, cost is attributed per agent and per version, and Posture flags risky permissions and configurations. Opencontroller does not replace the platforms' billing views; use them for credit-level reconciliation. See [where AI agent costs usually leak](/blog/where-ai-agent-costs-leak) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Do Snowflake AI credits include warehouse compute?**
No. `USER_AI_USAGE_HISTORY` excludes warehouse credits. Warehouse time used by the same queries is billed separately.

**Can I tag Databricks serving endpoints by team?**
Yes. Tags on the endpoint appear in `custom_tags` in `system.billing.usage`.

**How often do these views update?**
They have latency of hours, not seconds. Use them for daily reporting, not real-time limits.

## Key facts

AI spend inside data platforms is billed as Snowflake credits or Databricks DBUs, not on model provider invoices. In Snowflake, query SNOWFLAKE.ACCOUNT_USAGE views USER_AI_USAGE_HISTORY (hourly AI credits by user, service type and object, excluding warehouse credits), CORTEX_AGENT_USAGE_HISTORY, CORTEX_AI_FUNCTIONS_USAGE_HISTORY and METERING_DAILY_HISTORY. In Databricks, filter system.billing.usage by billing_origin_product values such as MODEL_SERVING, AI_FUNCTIONS, AI_GATEWAY, VECTOR_SEARCH, AGENT_BRICKS and AGENT_EVALUATION, and use system.ai_gateway.external_model_spend for external models. Map objects to an agent registry and owners for finance. Opencontroller by Lyzr connects to Databricks and attributes gateway cost per agent and version. Pricing starts from $250K per deployment per year.

## Related

- [How do you track Snowflake Cortex AI spend by agent or team?](https://opencontroller.lyzr.com/blog/track-snowflake-cortex-ai-spend.md)
- [What AI spend reports does a CFO actually need?](https://opencontroller.lyzr.com/blog/ai-spend-reporting-for-finance-leaders.md)
- [Where do AI agent costs usually leak?](https://opencontroller.lyzr.com/blog/where-ai-agent-costs-leak.md)
- [More on Gateways and cost](https://opencontroller.lyzr.com/blog/cluster/gateways-and-cost)
