Skip to main content
POST
/
models
/
pricing
/
estimate
curl --request POST \
--url https://api.fal.ai/v1/models/pricing/estimate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"estimate_type": "historical_api_price",
"endpoints": {
"fal-ai/flux/dev": {
"call_quantity": 100
},
"fal-ai/flux/schnell": {
"call_quantity": 50
}
}
}'
{
"estimate_type": "historical_api_price",
"total_cost": 3.75,
"currency": "USD"
}

Authorizations

Authorization
string
header
required

Admin API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_ADMIN_API_KEY

Body

application/json
  • Option 1
  • Option 2

Historical API price estimate: Calculates cost based on historical pricing per API call. Useful for estimating costs based on actual usage patterns.

estimate_type
enum<string>
required

Estimate type: historical API pricing based on past usage patterns

Available options:
historical_api_price
endpoints
object
required

Map of endpoint IDs to call quantities

Response

Cost estimates calculated successfully

Cost estimation response with total cost

estimate_type
enum<string>
required

The type of estimate that was performed

Available options:
historical_api_price,
unit_price
total_cost
number
required

Total estimated cost across all endpoints

Required range: x >= 0
currency
string
required

Three-letter currency code (ISO 4217, e.g., 'USD')

Required string length: 3