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.

✓ no keys or registration✓ JSON (UTF-8)✓ prices per 1M tokens · usd / rub
Base URL
https://api.llmoney.ru/api/v1
Quick start
curl "https://api.llmoney.ru/api/v1/models"
GET/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).

Query parameters
providerstringFilter by provider slug: openai, anthropic, google, gigachat, yandex, deepseek, meta, mistral
free_onlybooleanOnly models with free (local) tokenization. Defaults to false
toolsstringOnly models offering ALL the listed provider-hosted built-in tools (comma-separated): web_search, code_interpreter, file_search, image_generation, computer_use, mcp
Example request
curl "https://api.llmoney.ru/api/v1/models?provider=openai"
Example response
{
  "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"]
    }
  ]
}
GET/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.

Path parameters
model_id*stringModel ID, e.g. openai-gpt-5
Example request
curl "https://api.llmoney.ru/api/v1/models/openai-gpt-5"
Example response
{
  "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"]
}
GET/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).

Path parameters
model_id*stringModel ID, e.g. openai-gpt-5
Example request
curl "https://api.llmoney.ru/api/v1/models/openai-gpt-5/price-history"
Example response
{
  "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"
    }
  ]
}
GET/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).

Query parameters
daysintegerWindow depth in days, 1–1825. Defaults to 90
kindstringall | changes (default, without model additions) | drop | rise | new
providerstringFilter by provider slug
model_idstringFilter by a single model
min_change_pctnumberHide changes smaller than the given percentage. Defaults to 0
limitintegerMaximum number of records, 1–500. Defaults to 100
Example request
curl "https://api.llmoney.ru/api/v1/price-changes?days=30&kind=drop"
Example response
{
  "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
    }
  ]
}
GET/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.

Query parameters
max_input_pricenumberMaximum input token price per 1M tokens
max_output_pricenumberMaximum output token price per 1M tokens
min_context_windowintegerMinimum context window size in tokens
currencystringFilter by billing currency: usd or rub
providerstringFilter by provider slug, e.g. openai or gigachat
toolsstringOnly models offering ALL the listed provider-hosted built-in tools (comma-separated): web_search, code_interpreter, file_search, image_generation, computer_use, mcp
sort_bystringSort order: input_price (default), output_price or context_window (descending)
limitintegerMaximum number of models in the response, 1 to 100. Defaults to 10
Example request
curl "https://api.llmoney.ru/api/v1/recommend?max_input_price=5&currency=usd&sort_by=input_price&limit=3"
Example response
{
  "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
  }
}
GET/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).

Example request
curl "https://api.llmoney.ru/api/v1/exchange-rate"
Example response
{
  "rate": 78.42,
  "source": "cbr",
  "updated_at": "2026-07-06T11:30:00"
}
POST/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.

Request body (JSON)
text*stringText to count tokens in
model_idsstring[]Model IDs. If omitted, all models with free tokenization are used
output_multipliernumberExpected response size relative to the input. Defaults to 1.0
cached_input_rationumberShare 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}
Example request
curl -X POST "https://api.llmoney.ru/api/v1/calculate" \
  -H "Content-Type: application/json" \
  -d '{"text": "Привет, мир!", "model_ids": ["openai-gpt-5"]}'
Example response
{
  "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
    }
  ]
}
POST/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.

Request body (JSON)
text*stringText to tokenize
encodingstringtiktoken encoding: cl100k_base (default), o200k_base, p50k_base or r50k_base
Example request
curl -X POST "https://api.llmoney.ru/api/v1/tokenize" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello, world!", "encoding": "cl100k_base"}'
Example response
{
  "tokens": [
    { "id": 9906, "text": "Hello" },
    { "id": 11, "text": "," },
    { "id": 1917, "text": " world" },
    { "id": 0, "text": "!" }
  ],
  "total_count": 4,
  "encoding": "cl100k_base"
}
GET/health

— Health check

Service health check. The only endpoint outside the /api/v1 prefix — served from the domain root: https://api.llmoney.ru/health.

Example request
curl "https://api.llmoney.ru/health"
Example response
{
  "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.

claude mcp add llmoney -- npx -y llmoney-mcp

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 conversion
  • recommend_model— model recommendations for a budget and context size
  • estimate_cost— request cost from text or a token count
  • price_changes— what got cheaper or pricier over a period
  • price_history— a model's full price history
  • exchange_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.