estimate_cost
Estimate AI model costs by supplying token counts for LLMs or unit counts for media models, such as images or seconds.
Instructions
Estimate the cost of using an AI model. For LLMs, provide token counts. For media models, provide unit counts. Example: estimate_cost({model_id: "fal-ai/flux-pro", usage: {images: 100}})
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model_id": "<model_id>",
"usage": "<usage>"
},
"name": "estimate_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | Yes | Usage parameters. LLMs: {input_tokens, output_tokens, requests}. Media: {units, images, seconds, requests} | |
| model_id | Yes | The model to estimate cost for |