v1
latestOpenAPI 3.1.02026-08-042453938.9 KBCharges
Estimate costs from hypothetical usage
Estimate costs from hypothetical usage without creating charges.
Takes a list of usage items (type + quantity) and calculates what they would cost based on your pricing plans. Useful for "what-if" scenarios, budget planning, or previewing costs before usage occurs.
Use cases:
- Pre-execution cost preview for AI agents
- Budget planning with different pricing scenarios
- Customer-facing cost calculators
- Comparing pricing strategies side by side
post/v1/cost-estimate/hypothetical
Request body
Example request
{
"items": [
{
"usageType": "api_call",
"quantity": 10000,
"unitPriceOverride": "0.005"
}
],
"defaultUnitPrice": "0.001",
"customPricing": {
"api_call": "0.005",
"token": "0.0001"
}
}Response
Cost estimate with line item breakdown