Public API
An open REST API: current language model prices, their change history, budget-based model recommendations, and token/cost calculation. The same data the calculator uses.
/models— List models
Returns every supported model with current prices. Prices are per 1M tokens in the currency given by the currency field (usd or rub). The tokenizer_type field shows how tokens are counted: tiktoken (local), api_gigachat / api_yandex (via the provider API) or approximation (approximate estimate).
| providerstring | Filter by provider slug: openai, anthropic, google, gigachat, yandex, deepseek, meta, mistral |
| free_onlyboolean | Only models with free (local) tokenization. Defaults to false |
| toolsstring | Only models offering ALL the listed provider-hosted built-in tools (comma-separated): web_search, code_interpreter, file_search, image_generation, computer_use, mcp |
curl "https://api.llmoney.ru/api/v1/models?provider=openai"
{
"models": [
{
"id": "openai-gpt-5",
"provider": "openai",
"provider_display_name": "OpenAI",
"name": "gpt-5",
"display_name": "GPT-5",
"tokenizer_type": "tiktoken",
"tokenizer_config": { "encoding": "o200k_base" },
"input_price": 1.25,
"output_price": 10.0,
"cached_input_price": 0.125,
"currency": "usd",
"is_paid_api": false,
"supports_byok": true,
"context_window": 400000,
"description": null,
"knowledge_cutoff": "Apr 2025",
"builtin_tools": ["web_search", "code_interpreter", "file_search", "image_generation", "mcp"]
}
]
}/models/{model_id}— Model by ID
Returns a single model with its current price. If the model is not found, the response is 404 with a detail field.
| model_id*string | Model ID, e.g. openai-gpt-5 |
curl "https://api.llmoney.ru/api/v1/models/openai-gpt-5"
{
"id": "openai-gpt-5",
"provider": "openai",
"provider_display_name": "OpenAI",
"name": "gpt-5",
"display_name": "GPT-5",
"tokenizer_type": "tiktoken",
"tokenizer_config": { "encoding": "o200k_base" },
"input_price": 1.25,
"output_price": 10.0,
"cached_input_price": 0.125,
"currency": "usd",
"is_paid_api": false,
"supports_byok": true,
"context_window": 400000,
"description": null,
"knowledge_cutoff": "Apr 2025",
"builtin_tools": ["web_search", "code_interpreter", "file_search", "image_generation", "mcp"]
}/models/{model_id}/price-history— Model price history
Returns the history of model price changes in chronological order. The source field indicates where the record came from: seed (initial data), manual (manual update) or api (automatic sync).
| model_id*string | Model ID, e.g. openai-gpt-5 |
curl "https://api.llmoney.ru/api/v1/models/openai-gpt-5/price-history"
{
"model_id": "openai-gpt-5",
"entries": [
{
"date": "2025-08-07",
"input_price": 2.5,
"output_price": 20.0,
"cached_input_price": 0.25,
"source": "seed"
},
{
"date": "2026-07-17",
"input_price": 1.25,
"output_price": 10.0,
"cached_input_price": 0.125,
"source": "openrouter"
}
]
}/price-changes— Price change feed
Returns price changes across the entire catalog, newest first: what got cheaper, what got more expensive, by what percentage, and which source the price came from. A record appears only when the price actually changed. The kind values: drop (price decreased), rise (price increased), mixed (input and output moved in opposite directions), new (model added to the catalog).
| daysinteger | Window depth in days, 1–1825. Defaults to 90 |
| kindstring | all | changes (default, without model additions) | drop | rise | new |
| providerstring | Filter by provider slug |
| model_idstring | Filter by a single model |
| min_change_pctnumber | Hide changes smaller than the given percentage. Defaults to 0 |
| limitinteger | Maximum number of records, 1–500. Defaults to 100 |
curl "https://api.llmoney.ru/api/v1/price-changes?days=30&kind=drop"
{
"summary": {
"period_days": 30,
"total": 2,
"drops": 2,
"rises": 0,
"mixed": 0,
"new_models": 0,
"models_affected": 2
},
"changes": [
{
"model_id": "openai-gpt-5",
"model_name": "GPT-5",
"provider": "openai",
"provider_display_name": "OpenAI",
"currency": "usd",
"date": "2026-07-17T03:00:00+00:00",
"kind": "drop",
"source": "openrouter",
"input_price": 1.25,
"output_price": 10.0,
"cached_input_price": 0.125,
"previous_input_price": 2.5,
"previous_output_price": 20.0,
"previous_cached_input_price": 0.25,
"input_change_pct": -50.0,
"output_change_pct": -50.0,
"cached_change_pct": -50.0
}
]
}/recommend— Model selection by parameters
Returns a simplified list of models filtered by budget, context window and provider, sorted by the given criterion. The endpoint is designed for programmatic model selection by AI agents. The total_available field is the number of models that passed the filters before limit was applied.
| max_input_pricenumber | Maximum input token price per 1M tokens |
| max_output_pricenumber | Maximum output token price per 1M tokens |
| min_context_windowinteger | Minimum context window size in tokens |
| currencystring | Filter by billing currency: usd or rub |
| providerstring | Filter by provider slug, e.g. openai or gigachat |
| toolsstring | Only models offering ALL the listed provider-hosted built-in tools (comma-separated): web_search, code_interpreter, file_search, image_generation, computer_use, mcp |
| sort_bystring | Sort order: input_price (default), output_price or context_window (descending) |
| limitinteger | Maximum number of models in the response, 1 to 100. Defaults to 10 |
curl "https://api.llmoney.ru/api/v1/recommend?max_input_price=5¤cy=usd&sort_by=input_price&limit=3"
{
"models": [
{
"id": "openai-gpt-5-mini",
"provider": "openai",
"name": "gpt-5-mini",
"display_name": "GPT-5 Mini",
"input_price": 0.25,
"output_price": 2.0,
"cached_input_price": 0.025,
"currency": "usd",
"context_window": 400000,
"builtin_tools": ["web_search", "code_interpreter", "file_search", "image_generation", "mcp"]
}
],
"total_available": 42,
"filters_applied": {
"max_input_price": 5.0,
"currency": "usd",
"sort_by": "input_price",
"limit": 3
}
}/exchange-rate— USD exchange rate
Returns the current USD/RUB rate (rubles per 1 dollar) that the service uses to convert prices. The source field: cbr (Central Bank of Russia), cbr-mirror (mirror) or fallback (fallback value).
curl "https://api.llmoney.ru/api/v1/exchange-rate"
{
"rate": 78.42,
"source": "cbr",
"updated_at": "2026-07-06T11:30:00"
}/calculate— Token and cost calculation
Counts the number of tokens in the text and the processing cost for each model. Without model_ids the calculation runs over all models with free tokenization. For each model, results returns input_cost, output_cost, total_cost and the tokenizer used (tokenizer_used); the ≈ symbol in it means an approximate count.
| text*string | Text to count tokens in |
| model_idsstring[] | Model IDs. If omitted, all models with free tokenization are used |
| output_multipliernumber | Expected response size relative to the input. Defaults to 1.0 |
| cached_input_rationumber | Share of input tokens served from the prompt cache, 0 to 1. Defaults to 0 |
| toolsobject[] | Tool overhead estimation: an array of objects {type: code_interpreter | web_search | file_search | mcp | function, count, calls, def_tokens, call_tokens, result_tokens} |
curl -X POST "https://api.llmoney.ru/api/v1/calculate" \
-H "Content-Type: application/json" \
-d '{"text": "Привет, мир!", "model_ids": ["openai-gpt-5"]}'{
"input_length": 12,
"word_count": 2,
"results": [
{
"model_id": "openai-gpt-5",
"provider": "openai",
"provider_display_name": "OpenAI",
"model_name": "gpt-5",
"display_name": "GPT-5",
"tokens": 5,
"cached_tokens": 0,
"input_cost": 0.00000625,
"cached_input_cost": 0.0,
"effective_input_cost": 0.00000625,
"output_cost": 0.00005,
"total_cost": 0.00005625,
"currency": "usd",
"context_window": 400000,
"is_available": true,
"tokenizer_used": "o200k_base",
"tool_input_tokens": 0,
"tool_output_tokens": 0,
"tool_cost": 0.0
}
]
}/tokenize— Text tokenization
Splits the text into tokens using the chosen tiktoken encoding and returns each token with its ID. Suitable for visualizing tokenization and for exact counts for a specific OpenAI model.
| text*string | Text to tokenize |
| encodingstring | tiktoken encoding: cl100k_base (default), o200k_base, p50k_base or r50k_base |
curl -X POST "https://api.llmoney.ru/api/v1/tokenize" \
-H "Content-Type: application/json" \
-d '{"text": "Hello, world!", "encoding": "cl100k_base"}'{
"tokens": [
{ "id": 9906, "text": "Hello" },
{ "id": 11, "text": "," },
{ "id": 1917, "text": " world" },
{ "id": 0, "text": "!" }
],
"total_count": 4,
"encoding": "cl100k_base"
}/health— Health check
Service health check. The only endpoint outside the /api/v1 prefix — served from the domain root: https://api.llmoney.ru/health.
curl "https://api.llmoney.ru/health"
{
"status": "healthy"
}MCP server for AI agents
An agent in Claude Code, Cursor, or Windsurf checks prices, picks a model for a budget, and estimates request costs itself. No keys or registration needed.
For Cursor / Windsurf / Claude Desktop — add to the MCP server config:
{
"mcpServers": {
"llmoney": { "command": "npx", "args": ["-y", "llmoney-mcp"] }
}
}list_models— the catalog with current prices, filters, and usd/rub conversionrecommend_model— model recommendations for a budget and context sizeestimate_cost— request cost from text or a token countprice_changes— what got cheaper or pricier over a periodprice_history— a model's full price historyexchange_rate— USD→RUB rate (Central Bank of Russia)
Private endpoints
The /auth, /api-keys and /call endpoints serve the LLMoney web app itself: OAuth sign-in, storing user API keys (BYOK), and calling models on your behalf. They require authentication and are not part of the public API.
Machine-readable documentation
The full specification is generated automatically and always matches the current API version.
- Swagger UI — Interactive documentation — requests can be run right from the browser
- ReDoc — The same reference in an alternative format
- openapi.json — Machine-readable OpenAPI 3.1 specification
- llms.txt — API description for AI agents following the llms.txt convention