estimate_self_host
Calculate the USD cost per 1M tokens to self-host a model on rented GPUs and optionally compare that cost against API pricing.
Instructions
Estimate the USD cost per 1M tokens of self-hosting a model on rented GPUs.
cost_per_1M = gpu_hourly_usd / (tokens_per_second * 3600 * utilization) * 1,000,000
Args: tokens_per_second: Sustained aggregate throughput of the deployment (all concurrent requests together), in generated tokens per second. gpu_hourly_usd: Total hourly cost of the GPUs serving that throughput (e.g. 8 x price). utilization: Fraction of paid hours actually spent serving traffic, in (0, 1]. Default 1.0. compare_models: Optional OpenRouter model ids (unique substrings work) to compare against their API input/output prices per 1M tokens.
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": {
"tokens_per_second": "<tokens_per_second>",
"gpu_hourly_usd": "<gpu_hourly_usd>"
},
"name": "estimate_self_host"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| utilization | No | ||
| compare_models | No | ||
| gpu_hourly_usd | Yes | ||
| tokens_per_second | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||