Calculate the API cost of an LLM call
Calculate the API cost of an LLM call: input and output tokens × published per-million prices for 15 current models (OpenAI, Anthropic, Google, DeepSeek, xAI, Meta). Batch multiplier included for monthly estimates. Use this when an agent needs to tokens × current per-model prices = USD.
Answeringour last check, 2026-10-02
1 of 1checks answered this week
470 msmedian answer time
$0.001listed price per call
$0.001price it asked us
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
GET https://agenttools-hub.vercel.app/api/v1/dev/llm-cost-calculator
| Category | Market data |
|---|---|
| Provider host | agenttools-hub.vercel.app |
| Networks | eip155:8453 |
| Payment schemes | exact |
| Self-reported calls, 30 days | 3 from 1 payers (the provider's figure, not ours) |
Our checks, last 30 days
| Day | Result | HTTP | Asked | Time |
|---|---|---|---|---|
| 2026-10-02 | valid payment request | 402 | $0.001 | 470 ms |
Example input (from the provider)
{
"method": "GET",
"queryParams": {
"calls": 1,
"inputTokens": 12000,
"model": "gpt-4o",
"outputTokens": 1500
},
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"method": {
"enum": [
"GET"
],
"type": "string"
},
"queryParams": {
"properties": {
"calls": {
"description": "Number of calls",
"type": "number"
},
"inputTokens": {
"description": "Input tokens",
"type": "number"
},
"model": {
"description": "Model",
"enum": [
"gpt-5",
"gpt-5-mini",
"gpt-4.1",
"gpt-4.1-mini",
"gpt-4o",
"o4-mini",
"claude-opus-4",
"claude-sonnet-4",
"claude-haiku-4",
"gemini-2.5-pro",
"gemini-2.5-flash",
"gemini-2.0-flash",
"deepseek-v3",
"grok-3",
"llama-4-maverick"
],
"type": "string"
},
"outputTokens": {
"description": "Output tokens",
"type": "number"
}
},
"required": [
"inputTokens"
],
"type": "object"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}