LLM Cost Quote
Text or token counts in, cost per model out, cheapest first, from OpenRouter's public price list with a price-fetched-at timestamp. Applies time-of-day pricing. Not charged if the price list is unavailable or no model matches.
Price: $0.0034 per call, USDC on Base (x402). Also available as the MCP tool llm_cost_quote at https://grokzilla.shop/mcp.
Text (token count approximated with our cl100k counter) or input_tokens in, cost per model out, cheapest first, from OpenRouter's public /api/v1/models price list (no key). price_fetched_at says when the prices were read (cached up to 10 minutes). Time-of-day and weekday prices OpenRouter publishes are applied for the current UTC time. Dynamic-price routers are excluded.
Call
POST /api/skills/llm-cost-quote
{"input_tokens": 3000, "output_tokens": 400, "models": ["openai/gpt-4o-mini", "google/gemini-2.5-flash"]}
text(optional): stringinput_tokens(optional): integeroutput_tokens(optional, default500): integermodels(optional): arraytop(optional, default10): integerinclude_free(optional, defaultfalse): booleanrequest_id(optional): Optional idempotency key. Echoed back; a credit-pack redemption with the same request_id and body is charged once.
Not charged
Every non-200 has charged: false and is never settled.
422 invalid_params/400 invalid_params: body fails the schema (checked before the 402).400before payment: neither or both oftextandinput_tokens, malformed model ids.422 no_matching_models: none of the requested models has a fixed price on OpenRouter.503 price_list_unavailable.
Response (paid 200)
Same envelope on every data service: ok, service, version, summary, data, confidence, sources, generated_at, data_as_of, charged, warnings, next.
{
"ok": true,
"skill": "llm_cost_quote",
"service": "llm_cost_quote",
"version": "1.0.0",
"summary": "cheapest: openai/gpt-4o-mini $0.00069 for 3000 in + 400 out tokens",
"data": {
"input_tokens": 3000,
"output_tokens": 400,
"token_source": "caller-supplied input_tokens",
"models_considered": 2,
"quotes": [
{
"model": "openai/gpt-4o-mini",
"name": "OpenAI: GPT-4o-mini",
"cost_usd": "0.00069",
"input_usd_per_mtok": "0.15",
"output_usd_per_mtok": "0.6",
"context_length": 128000,
"fits_context": true,
"time_based_price": false
},
{
"model": "google/gemini-2.5-flash",
"name": "Google: Gemini 2.5 Flash",
"cost_usd": "0.0019",
"input_usd_per_mtok": "0.3",
"output_usd_per_mtok": "2.5",
"context_length": 1048576,
"fits_context": true,
"time_based_price": false
}
],
"missing_models": [],
"price_fetched_at": "2026-10-17T11:12:57Z",
"currency": "USD"
},
"confidence": 0.97,
"sources": [
{
"name": "OpenRouter public models list",
"url": "https://openrouter.ai/api/v1/models",
"fetched_at": "2026-10-17T11:12:57Z"
}
],
"generated_at": "2026-10-17T11:12:57Z",
"data_as_of": "2026-10-17T11:12:57Z",
"charged": true,
"warnings": [],
"next": [
"token_count"
]
}