Top models
top_modelsSort AI models by input/output price, context window, context per dollar, or release date to compare options and select the right one.
Instructions
Rank models by one criterion: cheapest input/output price per million tokens, largest context window, most context per input dollar, or newest release. Supports the same filters as find_models.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return. | |
| query | No | Case-insensitive substring match against model name or id, e.g. 'sonnet' or 'gpt-5'. | |
| sortBy | Yes | Ranking criterion: 'cheapest_input'/'cheapest_output' (USD per million tokens), 'largest_context' (tokens), 'context_per_dollar' (tokens per USD of input), or 'newest' (release date). Models missing that data are excluded. | |
| provider | No | Restrict to one provider id, e.g. 'anthropic'. | |
| minContext | No | Minimum context window size in tokens. | |
| maxInputCost | No | Maximum input cost per million tokens (USD). | |
| requireToolCall | No | Only models with tool/function calling support. | |
| requireReasoning | No | Only models with extended reasoning support. | |
| requireAttachment | No | Only models that accept file/image attachments. |