keepcalculator

06 Numbers and Powers

Cut AI Product Costs: Unit Economics Playbook

Card No. 06·34808 · Updated · Standard formula, shown below

This playbook gives you a practical, step-by-step method to control the overhead costs of an AI-powered product by applying unit economics thinking. You’ll learn how to break down your AI spend into per-unit costs, identify the biggest levers, and make data-driven decisions to improve margins—without sacrificing product quality. Before you start, gather your recent cloud bills, model API invoices, and usage analytics.

What You’ll Need

  • Access to your cloud provider’s cost dashboard (AWS, Azure, GCP, or similar)
  • A list of your AI model API usage and pricing (e.g., per-token costs)
  • Product analytics showing daily or monthly active users and feature usage
  • A spreadsheet or BI tool to build a simple cost model

Step-by-Step

  1. Define your unit of value. Decide what “one unit” of your product means. It could be a single API call, a processed document, a chat session, or a generated image. This is the denominator for all your cost calculations.
  2. Map all AI-related costs to that unit. List every cost component: model inference (per token or per request), fine-tuning, vector database storage, GPU/CPU compute, data egress, and human review. For each, estimate the cost per unit. For example, if you pay $0.002 per 1K tokens and each unit uses 500 tokens, your model cost per unit is $0.001.
  3. Build a unit cost table. Create a spreadsheet with columns: cost component, cost per unit, and notes. Sum them to get your total AI cost per unit. This is your baseline.
  4. Track usage patterns. Identify which features drive the most AI calls. Use your analytics to see the average number of calls per user per session. Multiply by your cost per call to see the AI cost per user per session.
  5. Find the biggest cost drivers. Sort your cost components by total monthly spend. Often, model inference dominates. But don’t ignore data egress or idle GPU instances. Focus on the top 2–3 items first.
  6. Optimize model selection. For each use case, test if a smaller or cheaper model meets your accuracy threshold. Many products can use a distilled model for 80% of requests and a premium model only for complex ones. Track the trade-off between cost and quality.
  7. Implement caching and batching. Cache identical or similar requests (e.g., using a semantic cache) to avoid redundant calls. Batch asynchronous tasks to use more efficient inference modes. Both reduce the number of paid calls.
  8. Set cost alerts and budgets. Use your cloud provider’s cost management tools to set alerts at 50%, 75%, and 90% of your monthly budget. This prevents surprise bills and forces early intervention.
  9. Review and iterate monthly. Unit economics change as your usage grows and model prices change. Recalculate your unit cost table monthly and compare it to your baseline. Adjust your optimization strategy based on what you see.

Common Mistakes

  • Ignoring fixed costs. Don’t only look at variable per-call costs. Include fixed costs like fine-tuning jobs, dedicated GPU instances, and storage in your unit cost calculation.
  • Over-optimizing too early. If your product is still finding product-market fit, don’t sacrifice quality for cost. Focus on the biggest levers that don’t hurt user experience.
  • Not accounting for retries. Failed API calls that are retried can double your costs. Monitor error rates and add retry logic with exponential backoff to avoid unnecessary retries.
  • Using one model for everything. A single large model for all tasks is usually overkill. Match model size to task complexity.
  • Forgetting about data egress. Moving data out of the cloud can be surprisingly expensive. Keep data processing close to your AI services to minimize egress fees.

Tips

  • Start with a simple model. You don’t need a complex system. A spreadsheet with 10 rows is enough to start.
  • Use spot instances for non-critical workloads. If you run batch processing that can tolerate interruptions, spot instances can cut compute costs by 60-90%.
  • Negotiate with your AI provider. If you have high volume, ask for volume discounts or committed-use discounts. Many providers offer them.
  • Monitor token usage per request. Sometimes your code sends extra context or system prompts that inflate token counts. Trim unnecessary tokens.
  • Consider open-source models. For some use cases, self-hosted open-source models can be cheaper at scale, but factor in the cost of the infrastructure and maintenance.

Troubleshooting

When your costs are still too high after optimization:

  • Re-examine your unit definition. Maybe your unit is too granular. For example, if you’re counting per API call, but each call processes multiple items, consider defining the unit as “per item processed.”
  • Look for hidden costs. Check for idle GPU clusters, unused vector indexes, or over-provisioned databases. Shut down anything not in active use.
  • Re-evaluate your quality thresholds. Are you using a high-precision model when a lower-precision one would suffice? Run A/B tests to see if users notice the difference.
  • If you can’t reduce costs further, consider passing some cost to the customer. For example, you could offer a free tier with lower AI usage and a paid tier with more. This aligns revenue with your variable costs.

Frequently Asked Questions

How do I calculate the cost per API call?

Take the total monthly cost of your AI services (including compute, storage, and egress) and divide by the number of API calls in that month. That gives you an average cost per call, but be sure to include fixed costs as well.

What’s a good unit cost target?

It depends on your business model. A common rule of thumb is that your AI cost per unit should be less than 10-20% of the revenue you earn per unit. If it’s higher, you need to optimize or raise prices.

Should I use a cheaper model even if it’s less accurate?

Only if the accuracy drop doesn’t hurt your product’s core value. Test with real users. Often, a smaller model can handle 90% of requests, and you can route the rest to a larger model.

How often should I review my unit costs?

Monthly is a good cadence. Costs and usage patterns change, and monthly reviews let you catch issues early without being too time-consuming.

Can I use open-source models to reduce costs?

Yes, if you have the infrastructure to host them. Self-hosting incurs compute and maintenance costs, but at scale it can be cheaper than per-token APIs. Do a break-even analysis before switching.

What if my usage is very spiky?

Use auto-scaling to match compute to demand. For API calls, you pay per use, so that’s fine. For self-hosted models, use serverless or spot instances to handle spikes without paying for idle capacity.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →