Skip to main content

FMAPI — Databricks Models

Lakemeter UI name: FMAPI - Databricks

Foundation Model APIs (FMAPI) let you access open-source models hosted by Databricks -- such as Llama, DBRX, Gemma, and embedding models -- through pay-per-token or provisioned-throughput pricing. Unlike compute workloads, FMAPI pricing is based on token volume or reserved throughput capacity, not compute hours.

FMAPI Databricks documentation page The FMAPI Databricks guide — token-based and provisioned throughput pricing with worked cost examples.

FMAPI Databricks worked cost example Worked example showing input/output token costs and provisioned throughput comparison.

When to use FMAPI Databricks

Use FMAPI Databricks when you want to call open-source models hosted on Databricks without managing your own serving infrastructure. This includes LLMs (Llama, DBRX, Gemma, GPT-OSS) and embedding models (BGE, GTE). If you need commercial models from Anthropic, OpenAI, or Google, see FMAPI — Proprietary Models instead. If you are deploying your own custom model, see Model Serving.

Real-world example

Scenario: You are building a customer support chatbot on AWS us-east-1 (Premium tier) using Llama 3.3 70B. Based on your projected traffic, you estimate 50 million input tokens and 10 million output tokens per month. You want to estimate the pay-per-token cost.

Configuration (input tokens)

FieldValue
Workload TypeFMAPI Databricks
ModelLlama 3.3 70B
Rate TypeInput Token
Quantity (Millions)50

Configuration (output tokens)

FieldValue
Workload TypeFMAPI Databricks
ModelLlama 3.3 70B
Rate TypeOutput Token
Quantity (Millions)10
info

Each rate type (input token, output token) is a separate line item in Lakemeter. Add one workload entry for input tokens and another for output tokens.

Step-by-step calculation

1. Input token cost

Monthly DBUs = Quantity (millions) x DBU per 1M Tokens
= 50 x 7.143
= 357.15 DBUs
DBU Cost = 357.15 x $0.07/DBU = $25.00

2. Output token cost

Monthly DBUs = 10 x 21.429 = 214.29 DBUs
DBU Cost = 214.29 x $0.07/DBU = $15.00

3. Total monthly cost

Total = Input Cost + Output Cost = $25.00 + $15.00 = $40.00/month
note

These are example rates for illustration using Llama 3.3 70B on AWS. Actual rates depend on the model and cloud. Output tokens always cost more than input tokens because generation is more compute-intensive.

What about provisioned throughput?

If you need guaranteed capacity for consistent high-throughput usage, you can reserve a provisioned endpoint. For Llama 3.3 70B with provisioned_scaling at 730 hours/month:

DBU/Hour     = 342.857 (provisioned_scaling rate)
Monthly DBUs = 342.857 x 730 = 250,285.6 DBUs
DBU Cost = 250,285.6 x $0.07 = $17,520.00/month

Provisioned throughput is significantly more expensive but guarantees capacity. Use pay-per-token for variable workloads and provisioned for consistent, high-volume production traffic.

Supported models

Lakemeter includes pricing data for all Databricks-hosted foundation models, loaded from the pricing bundle:

CategoryModels
Large Language ModelsLlama 4 Maverick, Llama 3.3 70B, Llama 3.1 8B, Llama 3.2 3B, Llama 3.2 1B, GPT-OSS 120B, GPT-OSS 20B, Gemma 3 12B
Embedding ModelsBGE Large, GTE
tip

The model list updates with each pricing bundle release. If a model is missing, Lakemeter uses fallback rates so you can still generate estimates.

Rate types

Rate TypeCategoryUnitDescription
input_tokenPay-Per-TokenDBU per 1M tokensTokens sent to the model (prompts, context)
output_tokenPay-Per-TokenDBU per 1M tokensTokens generated by the model (completions)
provisioned_scalingProvisionedDBU per hourReserved throughput (scaling tier)
provisioned_entryProvisionedDBU per hourReserved throughput (entry tier, lower cost)

Pay-Per-Token vs Provisioned

Pay-Per-Token: Best for variable or unpredictable workloads. You pay based on actual token volume processed.

Provisioned Throughput: Best for consistent, high-throughput production workloads. You reserve fixed capacity and pay by the hour, regardless of actual token usage. Entry tier is cheaper; scaling tier provides higher throughput.

Key rate relationships
  • Output tokens always cost more than input tokens for all models (generation requires more compute)
  • provisioned_entry is always cheaper than provisioned_scaling (lower throughput tier)
  • Rates are identical across clouds for most models, with occasional exceptions (e.g., GCP Llama 3.1 8B provisioned rates differ)

Configuration reference

FieldDescriptionDefault
ModelThe Databricks-hosted model name— (select from list)
Rate TypeToken direction or provisioned tierInput Token
QuantityVolume -- millions of tokens/month (token-based) or hours/month (provisioned)

Rate type groups in the UI

The UI groups rate types into two categories in the dropdown:

GroupRate Types
Token-basedinput_token, output_token
Provisionedprovisioned_scaling, provisioned_entry

How costs are calculated

Token-based pricing

Monthly DBUs = Quantity (millions) x DBU per 1M Tokens
DBU Cost = Monthly DBUs x $/DBU
Total Cost = DBU Cost (no VM costs — always serverless)

Provisioned pricing

Monthly DBUs = Hours x DBU per Hour
DBU Cost = Monthly DBUs x $/DBU
Total Cost = DBU Cost (no VM costs — always serverless)

Fallback behavior

When a model/rate_type is not found in the pricing bundle:

ComponentToken fallbackProvisioned scaling fallbackProvisioned entry fallback
Frontend1.0 DBU/1M (input), 3.0 DBU/1M (output)200 DBU/hr50 DBU/hr
Backend0 DBU0 DBU/hr0 DBU/hr

The frontend provides defaults so you always see a non-zero estimate. The backend returns 0 for unknown models to avoid incorrect Excel exports.

SKU mapping

WorkloadSKUFallback $/DBU
FMAPI Databricks (all models, all rate types)SERVERLESS_REAL_TIME_INFERENCE$0.07

Tips

  • Pay-per-token for prototyping: Start with pay-per-token to understand your actual usage patterns. Switch to provisioned only when you have consistent, high-volume production traffic.
  • Estimate both input and output: Always add separate line items for input and output tokens. Output tokens cost 2-5x more than input, so underestimating output volume significantly understates cost.
  • Embedding models are cheap: BGE Large and GTE only use input tokens (no output). They are significantly cheaper than LLMs per million tokens.
  • Compare open-source vs proprietary: FMAPI Databricks models (Llama, DBRX) are much cheaper per token than proprietary models (Claude, GPT). Consider whether an open-source model meets your quality requirements.

Common mistakes

  • Using provisioned for variable workloads: Provisioned throughput charges by the hour regardless of usage. If your traffic is bursty (high during business hours, zero at night), pay-per-token is usually cheaper.
  • Forgetting output tokens are more expensive: If you expect 50M input tokens, your output volume might be 10-20M tokens -- but at 3x the rate, output can dominate total cost.
  • Comparing $/DBU with compute workloads: FMAPI uses the same SERVERLESS_REAL_TIME_INFERENCE SKU at $0.07/DBU as Model Serving. The cost difference is in how many DBUs each token or hour generates.
  • Treating provisioned entry as "free tier": Provisioned entry is a paid tier with dedicated capacity -- it is not a free tier. It offers lower throughput at a lower per-hour rate than provisioned scaling.

Excel export

FMAPI Databricks workloads export as a single row per line item. The formula depends on rate type:

ColumnToken-basedProvisioned
ConfigurationModel name + rate typeModel name + rate type
ModeServerless (always)Serverless (always)
SKUSERVERLESS_REAL_TIME_INFERENCESERVERLESS_REAL_TIME_INFERENCE
Token TypeRate type labelRate type label
Tokens/Mo in MillionsQuantity
DBU per 1M TokensDBU rate
DBU/HourDBU rate
Monthly DBUsQuantity x DBU/1MDBU/Hr x Hours
DBU CostMonthly DBUs x $/DBUMonthly DBUs x $/DBU
VM Cost$0$0
Total CostDBU CostDBU Cost
caution

When auditing an exported spreadsheet, verify you are reading the correct formula for the rate type. Token-based rows multiply Tokens/Mo x DBU/1M. Provisioned rows multiply DBU/Hr x Hours/Mo. The columns are different.