Compare LLM prices: my models' costs at a glance
Prices for Large Language Models change regularly. At the same time, costs vary considerably between models: input and output tokens are billed separately, context windows differ, and new variants continually appear alongside established models. Anyone using multiple APIs or AI models therefore needs a quick way to compare the relevant prices.
That is exactly why I built the OpenRouter Price Comparison. The tool does not display the entire model catalog with all available metadata, but focuses on the models I actually use. My selection and preferred sorting remain stored in the browser. As a result, my personalized comparison list is immediately available again the next time I visit.
Why use a dedicated LLM price comparison?
OpenRouter provides access to a large number of different language models and offers extensive information about them. However, for specifically monitoring the prices of the models I use regularly, the complete catalog is often more than I need in everyday work.
On a comprehensive platform, I might first have to sign in, select models again, and sort the view appropriately. My price comparison reduces this process to the essentials:
- no login required
- a personalized model selection instead of the complete catalog
- saved sorting by model name, input price, output price, or context length
- prices consistently shown in US dollars per one million tokens
- quick access to additional model details
- automatic OpenRouter data updates after no more than one hour
For example, this makes it easy to quickly check whether the cost of a model has changed before a large batch job, a model switch, or a new project.
How the application works technically
The application is deliberately lightweight and runs entirely in the browser. On startup, it queries the public model endpoint of the OpenRouter API:
https://openrouter.ai/api/v1/models
Among other data, the API returns model names, model IDs, context lengths, and per-token prices. To make comparisons easier, the tool converts the prices to one million tokens:
Price per 1 million tokens = API price per token × 1,000,000
Input and output prices are displayed separately. This is important because generated output tokens are considerably more expensive than input tokens for many models. A comparison based on a single price would therefore provide little meaningful information.
Personalized model selection with localStorage
The selected model IDs are stored in the browser’s localStorage. The same applies to the active sorting column and sorting direction. This allows the application to automatically reconstruct the most recently used view after a reload.
Three types of data are stored:
| Data type | Purpose |
|---|---|
| Selected model IDs | Restores the personalized comparison list |
| Sorting column and direction | Retains the preferred table view |
| OpenRouter model catalog | Reduces unnecessary API calls and speeds up startup |
The selection is therefore tied to the specific browser and device being used. It is not synchronized through a user account or transmitted to a separate server. Anyone who clears their browser data or uses another browser starts with an empty selection.
Current prices with a one-hour cache
The model catalog, including pricing information, is cached locally for up to one hour. As long as this cache remains valid, the page can load the data directly from the browser. This ensures short loading times and avoids making another request to the OpenRouter API on every page visit.
If the cache is more than one hour old, the application loads the current model catalog. The personalized selection is retained: the stored IDs are matched with the newly retrieved model data, so the table then shows the updated prices for the selected models.
If the API or internet connection is temporarily unavailable, the application can fall back to an existing, older cache. The status above the search field indicates whether the data was updated live, loaded from the cache, or provided offline.
Searching, selecting, and sorting models
The interface is designed around a short workflow:
- Search for a model name or model ID, such as
GPT,Claude, orGemini. - Select the appropriate model from the suggestion list.
- Add other models you use regularly.
- Sort the table by name, input price, output price, or context length.
- If needed, open the detail view for the description, modality, and maximum output length.
Once configured, simply revisit the page later. The selection and sorting are loaded from localStorage; if the data cache has expired, the application automatically retrieves current OpenRouter data.
What to consider when comparing prices
The raw token price is an important factor when choosing a model, but it is not the only one. For a realistic cost assessment, the following points should also be considered:
- The ratio of input to output tokens in your use case
- The context length required for prompts, documents, or conversation histories
- The model’s quality and reliability for the specific task
- Response speed and available providers
- potential additional costs, discounts, or different terms
A less expensive model may be sufficient for classification or simple extraction, while demanding coding, reasoning, or analysis tasks may justify a more powerful model. The price comparison helps make the cost aspect quickly visible; it does not replace your own benchmark.
Privacy and the limitations of local storage
The personalized model list is managed exclusively through browser storage. Neither registration nor a user account is required. This reduces the personal data transmitted and makes the tool straightforward to use.
However, localStorage is not a cross-device data store. The selection is not automatically synchronized or backed up and may be lost when website data is deleted. In addition, model information and prices come from the OpenRouter API. For billing and production cost calculations, the provider’s information applicable at the relevant time is therefore always authoritative.
Conclusion
The OpenRouter Price Comparison is designed as a focused tool for everyday use: it shows the prices of exactly the LLMs that are currently relevant, stores the selection and sorting locally, and regularly updates the underlying OpenRouter data. Instead of repeatedly working through a large model catalog, it provides a persistent, personalized comparison view without requiring a login.
This makes it possible to quickly check the input and output costs of GPT, Claude, Gemini, and other OpenRouter models before selecting, replacing, or increasing the production use of a model.
Frequently asked questions
How current are the displayed LLM prices?
OpenRouter model data is cached in the browser for up to one hour. Once that period has elapsed, the application retrieves current data from the OpenRouter API the next time it loads.
Are my selected models saved?
Yes. The model IDs and selected sorting are stored in the browser’s localStorage. They remain available after a normal reload or a later visit.
Do I need an OpenRouter account?
No. No login is required to use the price comparison. The model data is loaded through the publicly accessible API endpoint.
Which prices are compared?
The tool displays the prices supplied by OpenRouter for input and output tokens, converted to one million tokens. The table can also be sorted by context length and model name.
Is my data transmitted to a separate server?
No. The selection, sorting, and cache remain local in the browser. To retrieve the model catalog, the browser makes a direct request to the OpenRouter API.
Why don’t I see the same model list on another device?
The settings are stored in the browser’s local storage and are not synchronized through an account. Each browser and device therefore has its own selection.