惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
K
Kaspersky official blog
A
Arctic Wolf
Attack and Defense Labs
Attack and Defense Labs
L
LINUX DO - 热门话题
N
News | PayPal Newsroom
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
PCI Perspectives
PCI Perspectives
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
W
WeLiveSecurity
Know Your Adversary
Know Your Adversary
博客园 - Franky
T
Tenable Blog
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Help Net Security
Help Net Security
WordPress大学
WordPress大学
T
The Exploit Database - CXSecurity.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
S
Security Affairs
J
Java Code Geeks
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
NISL@THU
NISL@THU
O
OpenAI News
The Cloudflare Blog
月光博客
月光博客
Google Online Security Blog
Google Online Security Blog
V
V2EX
罗磊的独立博客
美团技术团队
博客园 - 三生石上(FineUI控件)
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
L
LINUX DO - 最新话题
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How to design pricing for AI APIs and LLM-powered products
Arnon Shimoni · 2026-06-04 · via DEV Community

AI API pricing comes down to six decisions, in order: what to meter, which primitive to charge for, what to charge per unit, how to structure tiers, hard cap or soft cap, and how the credit wallet behaves. This guide walks through each one with worked examples and dollar amounts. There's a Claude prompt at the end you can paste in to diagnose your own pricing.

The reason for writing this blog post is because I was talking to a founder who showed me his pricing page pricing page, that said "$0.02 per 1k tokens"… I asked what the customer sees on the invoice, and… I didnøt like the answer. So, this is for founders, PMs, and monetization leads about to make the decisions that will haunt the next 18 months of their P&L.

The structure of an AI pricing plan

With classic API pricing, a plan is the subscription tier (Free, Pro, Scale).

Inside each plan there are phases (a 14-day trial, then the default phase) that make it up.

Inside each phase there are rate cards that tie a meter to a price and an entitlement. During a trial, you may get more features than during the "evergreen" phase.

AI pricing adds three twists to this structure.

The meter is no longer just "requests." It's tokens (input and output), credits (abstracted units), or outcomes (a completed task, a resolved ticket, a generated document).

The rate card has to handle multiple model costs sitting under one customer-facing price.

The entitlement is a wallet, not a counter. Credits accumulate, expire, roll over, and get spent across multiple features.

Also, phases matter more than they did in classic SaaS, because AI pricing changes more often. A model provider cuts their price or you ship a new credit rate, or a customer extends their trial - all of those creates a phase transition, not necessarily just a contract amendment.

That gives you six decisions, in order.

Step 1: Pick what you're metering

The meter is the thing you count. Pick it wrong and you'll fight your customers about whether the bill is fair for the next two years.

For AI products, four meters dominate:

  • Input + output tokens (OpenAI, Anthropic, Mistral)
  • Credits (Cursor, Notion AI, Linear AI)
  • Outcomes (Intercom Fin at $0.99 per resolved conversation)
  • Compute time

The meter has to correlate with two things at once: customer-perceived value, and your cost of goods. A flat per-request meter on a multi-model product will wreak havoc on your (already thin) gross margin the moment a customer sends 50k-token prompts.

💡 Decision to lock: which meter, with the exact definition.

Write it down - "1 token = 1 GPT-5.5-style token, input + output combined". My exprience is that vague definitions are a source of customer disputes that you can very easily avoid.

Step 2: Pick your pricing primitive

I suggest a customer-facing unit, even if you do the math in another internally.

Primitive What you charge for When it works well When not to use it
Token Input + output tokens at a $/1k rate Direct API products, technical buyers, OpenAI-style resellers Multi-model usage, when output volume varies wildly, non-technical buyers
Credit Abstracted units redeemable against any feature LLM-powered SaaS, mixed model usage, packaged AI features When credit rates don't track cost changes, when customers can't predict burn rate
🏆 Outcome Per generated document, resolved ticket, completed task Clear value units, enterprise contracts, vertical AI When outcome definitions are fuzzy, when failure modes aren't priced in

Most products that do well in a pricing change end up running all three at once.

For example, a per-token for power users on the API, with credits for the packaged product, and outcome pricing on top for enterprise deals.

Agentforce charges for conversation, Fin runs outcome-based, but cursor runs credits and OpenAI runs tokens. All are valid, but highly dependent on the business.

So again, outcomes first if you can define them, credits second for flexibility, tokens last if you can't avoid them.

💡 Decision to lock: which primitive appears on the invoice.

Step 3: Calculate your cost and set your price

Here's a good example to work with: Your product makes one Claude Opus 4.8 call per user request. Anthropic charges $5 per 1M input tokens and $25 per 1M output tokens.

If your average request uses 1k input tokens and 500 output tokens, your cost per request is $0.005 + $0.0125 = $0.0175.

Three pricing approaches from that cost to consider:

  1. Cost-plus markup. Charge $0.035 per request. 50% gross margin. Predictable, defensible, boring. Works in the API reseller category. Breaks the moment you add a second model with a different cost profile.
  2. Value-based. The customer would pay $1 per generated document because that's the value to them. Charge $0.50. ~96.5% gross margin. Risky when a competitor undercuts you. Excellent when you have a moat. (The classic Salesforce play. Different now in AI because the moat is thinner.)
  3. Credit-based abstraction. Define a credit as "one standard request" and charge $0.05 per credit. Heavy-input requests cost 2 credits. Document generation costs 5 credits. The customer sees a balance, not a token count. Your margin moves smoothly across model changes because you control the credit-to-cost mapping internally.

Side-note: Opus 4.7 introduced a new tokenizer that can use up to 35% more tokens for the same input text compared to earlier Opus models. Same prompt, same model family can result in a 35% bigger bill. If your pricing is per-token, you just absorbed a price hike you can't pass through easily but if your pricing is per-credit, you adjust the credit-to-token ratio internally and the customer notices nothing. Credits as architecture, again.

A practical rule for me is that if you can't predict the customer's monthly bill within ±20%, your pricing is too tightly coupled to your cost. Credits with controlled rates kinda solve it, while cost-plus per-token definitely doesn't.

💡 Decision to lock: per-unit price (in whatever primitive you picked) and target gross margin.

Step 4: Build your tier structure

Most AI products land on 4-5 tiers. The structure matters more than the numbers. You can change the numbers. You can't easily change the shape.

Here's a starting point to consider:

Tier Price/mo Included Limit type Best for
Sandbox $0 100 credits/month Hard cap Devs evaluating, demos
Starter $29 5,000 credits/month Soft cap, $0.01/credit overage Indie devs, early prod
Pro $299 100,000 credits/month Soft cap, $0.005/credit overage Growing teams, full prod
Scale From $2,500 Annual commit, custom volume Negotiated overage $1M+ ARR mid-market
Enterprise Custom Custom + SLA + multi-entity Custom Regulated, multi-region

I like a hard cap on free (protects margin from abuse), or a soft cap with overages on paid (let customers scale), and commit-based for the top.

You should note, that a free tier is typically an acquisition cost - so price it for the abuse boundary… 100 credits gets a developer through a "hello world" and 10,000 credits can get a hobbyist building real things on your dime. That's fine if you're planning for it, but the abuse line is wherever the cost per signup makes your CAC start to really hurt.

Also worth noting that charging 2-3x the included rate as overage is standard. Going higher than 3x makes customers hard-cap their own usage internally which suppresses your expansion revenue and may sabotage your product (it feels like you're robbing them). Going lower than 1.5x definitely leaks margin on power users.

💡 Decision to lock: tier count, included usage per tier, price per tier, overage rate per tier.

Step 5: Decide hard cap vs soft cap

Hard limits block requests when the entitlement is exhausted. Customers get an error (consider an HTTP 429!) and stop until they upgrade or the period rolls over.

Soft limits let usage continue past the entitlement and bill the overage at the period boundary.

Use hard limits on:

  • Free tiers and trials
  • Anything where the customer hasn't agreed to overage terms
  • Developer sandboxes and test environments

Use soft limits on:

  • Paid tiers where overage terms are in the contract
  • Anything where blocking would break a production system
  • Scale and Enterprise customers who want to maximise usage and have credit lines

The common mistake I see people make is putting hard limits on paid tiers because "we don't want to surprise the customer and have their app stop working" - which is noble but getting a huge huge bill at the end of the month isn't great either. A soft limit with a generous spend alert is the move.

💡 Decision to lock: hard or soft per tier, the overage price for soft, the alert thresholds (50%, 80%, 100% of entitlement).

Step 6: Design your credit wallet

If your primitive is credits (Step 2), the wallet is the entire pricing experience. Get the four decisions wrong and customers will tolerate you but never trust you.

Expiry

Do credits expire? Month-end is harsh, year-end is generous, contract-end is the enterprise default.

Having no expiry creates a pretty serious liability on your balance sheet - so talk to a CFO before you ship "credits never expire" as a marketing line.

Rollover

What happens to unused credits at period boundaries? Full rollover is most user-friendly, but some do a partial rollover.

Having no rollover sucks. Customers will eventually notice and resent it.

Top-ups

Can customers buy more mid-cycle?

At the same price, or a premium?

Self-serve, or sales-assist?

Top-ups are where customer happiness lives. Friction here is the single biggest cause of "we love the product but the billing is annoying."

Multi-meter redemption

Can one credit pool be spent across multiple features (chat, search, generation)? Or does each feature have its own pool?

A single pool is friendlier and easier, but a multi-pool is easier to revenue-recognize under ASC 606. You'll end up with single pool because customers ask for it.

💡 Decision to lock: expiry policy, rollover policy, top-up flow, single vs multi pool.

Planning for when the model prices drop

Anthropic took Opus from $15 input / $75 output per 1M tokens (Opus 4.1) to $5 / $25 (Opus 4.5 and later). A 3x cut on the most premium model in the lineup.

OpenAI ships similar moves every quarter, and… Yeah, well, it's hard to plan around this.

If you priced per-token at a fixed markup, your gross margin just tripled. Good for the P&L, but not great for the customer who now feels the bill is too high.

Expect a renegotiation request within 60 days, or a switch to a vendor who reprices automatically.

If you priced credit-based, you have a choice. Hold the credit rate and bank the margin. Lower it and pass savings through. Or rebalance: lower the rate for older models, hold for newer ones.

If you priced outcome-based, you barely notice. The customer pays $0.99 per resolution whether you used Opus 4.7 or Haiku 4.5. Margin compounds automatically. (Why outcome pricing is the most durable shape, and the hardest to ship on day one.)

The infrastructure question you must know is can your billing system change a credit rate mid-cycle without rewriting prior invoices? If not, every model price drop becomes a project and a migration which can really hurt.

Diagnose your pricing with Claude

Copy this prompt into Claude (or any capable model). It runs the discovery with you and returns a tier table and reasoning. It won't get the price points exactly right. That's your judgment and your data. It does get the shape right, and it saves 60 days of design work.

I need help designing pricing for my AI API or LLM-powered product. Please work with me in two phases.

Phase 1 — Ask me these questions in turn. Wait for my answer to each (or each small group) before moving on. Don't move to Phase 2 until you have enough from me to work with.

What does your product do? (What problem does it solve? Who uses it?)

Which models do you use? (Single model, multi-model, with fallback?)

What does an average request look like? (Approximate input tokens, output tokens, latency budget, any multimodal cost.)

What's your cost per request? (Or per token, by model, if multi-model.)

What unit do you want customers to pay for? (Tokens, credits, completed outcomes, hybrid.)

Who are your target customers? (Developers, prosumers, startups, enterprises, mix.)

Are there comparable products? Their pricing if you know it.

What's your goal? (Maximise adoption, maximise revenue, hit a specific gross margin target.)

Do you want a free tier? If so, what's the abuse boundary?

Phase 2 — Design the strategy. Present it as a comparison table covering each plan tier.

For each tier, specify:

Plan name and target audience

Pricing primitive (token, credit, outcome, or hybrid)

Included usage (tokens / credits / outcomes per period)

Hard limit or soft limit, and overage price if soft

Credit wallet behaviour if applicable (expiry, rollover, top-ups, multi-meter)

Model fallback or routing behaviour

Differentiating features (SLA, priority support, advanced models, observability)

Free trial behaviour (yes/no, duration, hard or soft)

After the table, explain:

Why this structure for this product

Why these price points (margin maths)

What tradeoffs I'm making (margin vs predictability, complexity vs adoption)

What to test in the first 90 days

Run it once, refine the inputs, run it again - because the second pass is usually better!

What billing infrastructure has to handle

5 things that we've seen really hurt with AI pricing if you didn't design for them:

  1. Per-event metering at high cardinality. Millions of events per day. Aggregating at month-close doesn't scale.
  2. Credit wallets as first-class entities. Not invoices with line items. Wallets with balances, debit/credit history, expiry, rollover, and multi-meter redemption rules.
  3. Real-time balance updates. Customers want to see credits drop as they use the product. If your system updates nightly, they'll build their own UI on top of your API. Or churn.
  4. Margin visibility at the unit level. Per-customer, per-feature, per-model cost-vs-revenue, in a dashboard the finance team can actually read.
  5. Rate-card versioning. You'll change credit rates 3-5 times in the first year. Your billing system has to handle "this customer was on the old rate until July 15, new rate from July 16" without rewriting February's invoice.

Solvimon treats credits and wallets as first-class billing primitives, which is different from gluing a metering service to a subscription billing tool and writing the wallet logic yourself.

Frequently Asked Questions

How do I price AI tokens?

Calculate your cost per request from the model provider's per-token rates, multiply by your expected input and output tokens per request, and apply either a cost-plus markup, a value-based price, or a credit abstraction. Credit abstraction is more durable across model price changes.

Should I let credits expire?

Yes, with a long enough horizon. 12 months or contract-end is standard. No expiry creates a growing balance-sheet liability. Aggressive expiry (monthly) feels like a gift-card scam and erodes trust at renewal.

When should I use a hard cap vs a soft cap?

Hard cap on free tiers, trials, and developer sandboxes. Soft cap on paid tiers, production workloads, and Enterprise contracts. Hard cap on a paid production tier is the most common mistake. Customers would rather pay an overage than have their app go down.

How many tiers should I have?

Three to five. Sandbox (free), Starter, Pro, Scale, optional Enterprise. More than five and the pricing page stops being a decision aid and starts being a maze.

How do I handle multiple AI models with different costs?

Either pass the cost variance to the customer (different credit rates per model), or absorb it internally (fixed credit rate, smart routing to the cheapest qualifying model). Absorbing it requires a billing system that supports credit-to-cost mapping at the route level.

How do credits get revenue-recognized under ASC 606?

Credits are typically recognized as revenue when consumed (the performance obligation is satisfied at redemption), not when sold. Unredeemed credits sit on the balance sheet as deferred revenue. Breakage (unredeemed credits at expiry) is recognized as revenue at expiry, subject to your historical breakage rate analysis. Ask your auditor before you finalize the wallet policy.