API Cost Estimation (Cost per Call)
How to estimate cost per request, include vendor costs, and avoid margin surprises.
Quick checklist
- Define the unit (call, request, message) and keep it consistent.
- Separate infra cost from vendor cost for visibility.
- Model at least two scenarios (p50 vs p90 request volume).
- Use a minimum fee if fixed overhead is meaningful.
- Validate costs against real billing data.
Step-by-step
- Estimate your blended infra cost per 1,000 calls.
- Add vendor pass-through cost per 1,000 calls (LLMs, enrichment, email/SMS).
- Add fixed overhead you need to recover (support, monitoring).
- Pick a target gross margin range.
- Validate outputs with CSV exports and shareable links.
Example scenarios
- Infra-only API: no vendor cost, focus on compute and storage.
- Vendor-heavy API: high pass-through cost per 1,000 calls.
- High-volume API: large call volume to test cost per call stability.
Common mistakes
- Ignoring third-party API costs until after pricing is published.
- Using peak costs instead of blended average costs.
- Omitting fixed overhead when pricing low-volume plans.