Estimate Model API Cost
rai_cost_estimateEstimate the USD cost of a model API call from token counts by specifying model, provider, input tokens, and output tokens.
Instructions
Estimate the USD cost of a model API call from token counts.
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": "<model>",
"provider": "<provider>",
"input_tokens": "<input_tokens>",
"output_tokens": "<output_tokens>"
},
"name": "rai_cost_estimate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model name, e.g. gpt-4o | |
| provider | Yes | Provider: openai | anthropic | google | mistral | |
| input_tokens | Yes | ||
| output_tokens | Yes |