LLM-kostnader & prissättning

Large language models have moved off the innovation budget and onto the operating bill. For engineering leaders in Sweden and across the EU, the question has shifted from whether an LLM feature works to whether its unit economics survive real traffic. A prototype that costs a few cents per demo can become a six-figure annual line item once thousands of users hit it daily. And unlike most cloud spend, the bill responds directly to decisions your engineers make in code: prompt design, context management and model selection all show up on the invoice.

That is what makes LLM cost management an engineering discipline rather than a procurement exercise. Token-based pricing means every prompt template, every retrieved document stuffed into context and every verbose model reply has a price attached. Teams that treat the model as a fixed-cost black box tend to overspend dramatically compared with teams that instrument, measure and tune.

Why LLM spend behaves differently from cloud spend

Traditional infrastructure cost is mostly a capacity question: you size machines, you pay for them, and usage within that envelope is free. LLM APIs invert this. Cost scales per request, and each request's cost depends on how many tokens go in and how many come out. Output tokens are typically priced several times higher than input tokens, which means a model that rambles is not just slower, it is more expensive. A single code change that lengthens a system prompt or forgets to cap output length can double a feature's cost overnight without any alert firing.

Pricing itself is also unusually volatile, in both directions. Vendors cut prices on capable mid-tier models as competition intensifies, while hosted open-weight models that anchored the cheap end of the market have shown they can reprice upward when the economics stop working. Any cost model built on the assumption that today's price list holds for the length of a budget cycle is fragile. Cost work is continuous, not a one-off negotiation.

The decisions that determine your bill

Right-sizing the model per workload

The largest single lever is matching model capability to task difficulty. Frontier models are priced for hard reasoning, and most production traffic is not hard reasoning. Classification, extraction, routing and summarization often run well on small or mid-tier models at a fraction of the price, sometimes on models compact enough to self-host. The pattern that works is a portfolio: cheap models for high-volume routine steps, expensive models reserved for the requests that genuinely need them, with routing logic in between. Getting this right routinely changes total spend by an order of magnitude.

How you buy capacity

On Azure OpenAI and similar platforms you choose between pay-as-you-go tokens, provisioned throughput (PTUs) that reserve capacity at a fixed rate, and batch endpoints that process asynchronous workloads at a steep discount. Provisioned capacity pays off when volume is sustained and latency consistency matters; it wastes money on spiky or low traffic. Batch pricing suits anything that tolerates minutes or hours of delay, such as document processing or nightly enrichment jobs. Many mature deployments combine all three, with reserved capacity for baseline load and pay-as-you-go absorbing the peaks.

Engineering the tokens themselves

Prompt caching is the optimization with the best effort-to-savings ratio for most teams. When the same large prefix repeats across requests, whether system instructions, tool definitions or shared reference context, providers bill those cached input tokens at a heavy discount. Chat applications and agent loops, where an identical prefix precedes every call, benefit most. Beyond caching, disciplined context management matters: retrieve fewer, better documents; cap output length; prefer structured outputs over prose where a downstream system consumes the result.

The agent multiplier

Cost intuition built on chatbots does not transfer to agents. An agent makes many model calls per user request, and every tool result is appended to a context that is re-sent on the next call, so input tokens compound across the loop. A task a chatbot handles in one call can consume dozens of calls with a steadily growing context. Long-running and multi-agent setups amplify this further. Teams shipping agents need per-task token budgets, observability into where tokens go, and cheaper models assigned to the routine sub-steps inside the loop.

A practical anchor: stop reasoning in price per million tokens and start measuring cost per business transaction, such as per resolved support ticket, per processed invoice or per generated report. That number is comparable across models and vendors, it is legible to finance, and it tells you immediately whether an optimization moved anything that matters.

How to approach it

A workable LLM cost practice for an EU enterprise team looks less like a cost-cutting project and more like an operating rhythm:

  • Instrument first. Capture token counts per feature, per tenant and per model before optimizing anything. You cannot tune what you cannot attribute.
  • Build evaluation before switching. A cheaper model is only cheaper if quality holds. An eval suite for your actual tasks turns model swaps from a gamble into a measurement.
  • Revisit quarterly. Prices, models and discount mechanisms change often enough that last quarter's optimal choice may no longer be.
  • Keep switching costs low. Abstract the model behind your own interface so a vendor repricing is a configuration change, not a rewrite.
  • Price in your constraints. Data residency and sovereignty requirements narrow which regions and deployment forms are available to EU workloads, and that belongs inside the cost model, not beside it.

The articles below get concrete: current vendor price lists and what they mean in practice, caching mechanics on Azure OpenAI and Claude, PTU math, agent cost breakdowns, and when a small self-hosted model beats an API call. Together they form a running record of a market that rewards teams who treat cost as a design parameter from day one.

Alla artiklar i ämnet

Guiden växer i takt med att vi publicerar — nya artiklar dyker upp här automatiskt.

DeepSeek's 4x price rise: rethinking cheap open modelsAugust 17, 2026

DeepSeek's V4-Pro reached general availability on 13 August 2026 with a 1M-token context and strong agent benchmarks, and three days later its peak-hour output price rose from a flat $0.87 to $3.96 per million tokens. For EU teams that built agent cost models around ultra-cheap open-weight APIs, the arithmetic, the data governance questions and the Azure hosting options all deserve a fresh look.

Workhorse shootout: Gemini 3.7 Flash, GPT-5.6 Luna, Sonnet 5August 14, 2026

Google shipped gemini-3.7-flash as generally available on 13 August 2026 at an introductory $0.75/$3.75 per million tokens, two weeks after OpenAI cut GPT-5.6 Luna by 80 percent and days after Anthropic locked Claude Sonnet 5 at $2/$10 permanently. We compare the three workhorse models on list price, context, Azure availability and EU residency, and show why cost per completed task beats cost per token.

LLM cost planning autumn 2026: Sonnet 5 stays at $2/$10August 12, 2026

Anthropic has cancelled the Claude Sonnet 5 price increase scheduled for 1 September 2026, making the introductory $2 input / $10 output per million tokens the permanent standard price. For teams running Claude on Azure through Microsoft Foundry, that removes a planned 50% jump from autumn budgets and reshapes the mid-tier price comparison against GPT-5.6 Terra and Gemini 3.1 Pro.

Azure OpenAI cost check: GPT-5.6 price cuts and PTU mathAugust 3, 2026

OpenAI cut GPT-5.6 Luna prices by 80 percent and Terra by 20 percent on 30 July 2026, and Microsoft confirmed the same decreases reach Azure OpenAI Global Standard deployments from 1 August. For Swedish and EU teams running these models on Azure, the cuts move the break-even point for PTU reservations, model routing and residency premiums, so the autumn budget math deserves a fresh pass before any new one-year commitments.

Claude Opus 5 for long-running agents: the cost mathJuly 27, 2026

Claude Opus 5 launched on 24 July 2026 at $5/$25 per million tokens with a 1M context window and day-one availability in Microsoft Foundry. For long-running agents the per-token price is the wrong unit: we work through cost per completed task against Sonnet 5 and GPT-5.6 Sol, and flag the EU data-residency caveat Swedish Azure teams need to check first.

Tokens are the new pricing lever: Gemini 3.6 Flash mathJuly 23, 2026

Google's 21 July release of Gemini 3.6 Flash pairs an output-price cut from $9.00 to $7.50 per million tokens with a claim of roughly 17% fewer output tokens per task, compounding to about 31% lower output cost for unchanged work. That combination makes per-million-token price sheets unreliable for model comparison, and Azure teams should measure cost per completed task instead.

Running GPT-5.6 the enterprise way on Microsoft FoundryJuly 15, 2026

GPT-5.6 (Sol, Terra, Luna) went GA in Microsoft Foundry on 9 July 2026, day-and-date with OpenAI, alongside a new Asia-Pacific Data Zone and a hosted agents runtime with VNet integration. A practical guide for Swedish and EU Azure teams: choosing between the three models, picking Global Standard versus EU Data Zone versus PTUs, worked cost math on the launch prices, and a two-week adoption checklist.

Claude Sonnet 5 vs Opus 4.8 vs GPT-5.5: agent cost mathJuly 1, 2026

Anthropic launched Claude Sonnet 5 on 30 June 2026 at an introductory 2/10 dollars per million tokens, posting 63.2% on SWE-bench Pro and near-Opus agentic performance at 40-60% of the cost per task. We run the cost math against Opus 4.8 and GPT-5.5, set out a routing framework for when the cheap model wins, and draw the continuity lesson from the eighteen-day Fable and Mythos export-control pause.

Claude Opus 4.8: the effort dial, fast mode and token mathMay 29, 2026

Claude Opus 4.8 arrives at unchanged pricing with an effort control on all plans, a fast mode at a third of the previous fast-inference cost, and a Messages API change that lets system entries sit inside the messages array so mid-task instruction updates no longer invalidate the prompt cache. Worked token math shows cache hit rate remains the biggest cost lever, and a four-question framework matches effort, speed and fan-out to each workload.

Small Models in Production: When Phi-4 and 8B Llama WinMay 18, 2026

Frontier models are the default. Defaults are how teams overpay on LLM bills. Three workloads where small models (Phi-4, Llama 3.x 8B, Mistral Small) outperform on cost-per-decision without losing meaningfully on quality, three workloads where they do not, and the two-tier production pattern that cost-conscious teams converge on after a quarter of evaluation work.

Prompt Caching in 2026: Cut Azure OpenAI and Claude CostsMay 15, 2026

Prompt caching is the highest-ROI cost lever on long-context LLM workloads in 2026. Anthropic, OpenAI, and Azure OpenAI all offer it with different pricing and breakpoint semantics. A worked comparison of the three providers, the placement patterns that actually hit cache, where the cache silently goes cold, and a 30-minute audit that pays back.

AI Agent Cost Economics: Why 100x and How to Cut ItApril 30, 2026

Agent loops cost 10x to 50x what a chatbot interaction costs; multi-agent systems add another order of magnitude. The cost compounding is structural, not a bug. The cost reduction is structural too. Decomposing where the tokens go and how to bring agent economics back from runaway to acceptable.

Cost-Optimizing Azure OpenAI: PTUs, Batch, Caching in 2026April 2, 2026

A concrete playbook for reducing Azure OpenAI bills in 2026. Break-even math for Provisioned Throughput Units, prompt-cache economics, the Batch API 50 percent discount, Foundry IQ for retrieval, tiered model routing, and the telemetry that keeps the wins honest.

Prompt Caching: Cutting LLM Costs Without Quality LossJanuary 20, 2026

A technical guide to prompt caching across Claude, Azure OpenAI, and GPT — what belongs in the cache, how to structure cache breakpoints, TTL realities, hit-rate optimization, and the anti-patterns that erase the savings.

Microsoft Foundry: The AI Platform for the Agentic Era - Ignite 2025November 28, 2025

From scientific research to enterprise AI transformation, discover how Microsoft Foundry unifies models from OpenAI, Anthropic, Cohere, Meta, and more into one secure platform. Learn intelligent model routing, cost optimization, and the game-changing Claude integration.

Fine-Tuning in Microsoft Foundry: Building Production-Ready AI Agents - Microsoft Ignite 2025November 28, 2025

Microsoft Ignite BRK188: Fine-tuning in Microsoft Foundry transforms generic models into production-ready agents. Synthetic data generation, supervised + reinforcement fine-tuning, 40-90% cost reduction, 95%+ accuracy. Real-world results: 2M docs/day, $27M savings.

Running Open-Source AI Models at Scale: Azure Container Apps, AKS, and On-Premise Deployments - Microsoft Ignite 2025November 28, 2025

Microsoft Ignite BRK117: Deploy open-source AI models (Llama 3.3, Mistral) with Azure Container Apps serverless GPUs, AKS with Kaido workflows, and on-premise infrastructure. Cost reduction 60-85%, data sovereignty, and hybrid architectures with Azure Arc.

Vanliga frågor

How much does it cost to run an LLM feature in production?

It depends almost entirely on token volume and model choice. A high-volume classification task on a small model can cost hundredths of a cent per request, while a frontier-model agent task can cost several dollars per run. The useful number is cost per business transaction measured in your own telemetry, not the published per-token price alone.

What is prompt caching and how much does it save?

Prompt caching lets the provider reuse the already-processed prefix of a prompt, such as system instructions, tool definitions and shared context, across requests. Cached input tokens are billed at a steep discount, commonly 75 to 90 percent below the standard input price. For chat and agent workloads where a large identical prefix repeats on every call, it is usually the cheapest optimization to ship.

When do PTUs beat pay-as-you-go on Azure OpenAI?

Provisioned throughput pays off when you have sustained, predictable volume high enough to keep the reserved capacity busy, and when consistent latency matters. For spiky or low traffic, pay-as-you-go is normally cheaper. Many teams run a hybrid: provisioned capacity for baseline load with pay-as-you-go spillover for peaks.

Why do AI agents cost so much more to run than a chatbot?

An agent makes many model calls per user request, and each tool result is appended to a context that gets re-sent on every subsequent call, so input tokens compound across the loop. A task a chatbot answers in one call can take dozens of calls with a growing context. Per-task token budgets, prompt caching and cheaper models for routine sub-steps keep this manageable.

Should we switch to a cheaper or smaller model?

Only with evidence. Build an evaluation set from your real tasks and compare candidates on quality first, then on price. Many classification, extraction and routing workloads run well on small or mid-tier models, while genuinely hard reasoning steps still justify frontier pricing.

How do we budget for LLM costs when prices keep changing?

Budget per business transaction rather than per token, and revisit model choice at least quarterly. Vendor prices move in both directions, and an upstream repricing can change your unit economics overnight. Keeping the model behind your own abstraction layer keeps switching costs low when that happens.