> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatbotplatform.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter MCP Server

> AI model recommendations, capability filtering, and comprehensive model information from OpenRouter's catalog.

## Summary

The OpenRouter MCP server helps you select the right AI model for your use case. Get recommendations based on vision support, audio support, tool calling, budget tier, and context length requirements. Search the model catalog with fuzzy matching and get detailed pricing and capability information.

## Authentication

**No authentication required.** This server uses publicly available data from OpenRouter's API.

```bash theme={null}
# No auth needed
curl https://app.chatbotplatform.io/mcp/time/call/recommend-model
```

## Use Cases

### Finding a Budget Model with Vision Support

**User:** "I need a cheap model that can analyze images"

**Tool Calls:**

1. `recommend-model` with `require_vision: true`, `preferred_tier: "Budget"` → Returns budget-friendly vision models

**Result:** Recommendations like "google/gemini-2.0-flash-001" with pricing, context length, and reasoning for the choice

***

### Choosing a Model for Code Review

**User:** "What's the best model for reviewing code? I need function calling."

**Tool Calls:**

1. `recommend-model` with `use_case: "code review"`, `require_tools: true` → Returns models optimized for code tasks with tool support

**Result:** Models like "anthropic/claude-sonnet-4" with detailed comparison of pricing and capabilities

***

### Searching for a Specific Model

**User:** "What's the pricing for GPT-4o?"

**Tool Calls:**

1. `search-models` with query "gpt-4o" → Finds matching models
2. `get-model-details` with model\_id "openai/gpt-4o" → Full pricing and capability details

**Result:** Complete pricing breakdown, context window, supported features, and usage examples

## Available Tools

### recommend-model

Get AI model recommendations based on your requirements.

| Parameter               | Type    | Required | Description                                                                                                      |
| ----------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `use_case`              | string  | No       | Describe your use case (e.g., "code review", "customer support", "document analysis") for better recommendations |
| `preferred_tier`        | string  | No       | Pricing tier: "Budget" (\< $1/1M), "Standard" ($1-5/1M), or "Premium" (> \$5/1M)                                 |
| `require_vision`        | boolean | No       | Set to true if the model needs to analyze images or screenshots (default: false)                                 |
| `require_audio`         | boolean | No       | Set to true if the model needs to process audio input (default: false)                                           |
| `require_tools`         | boolean | No       | Set to true if the model needs function/tool calling support (default: true)                                     |
| `min_context_length`    | integer | No       | Minimum context length in tokens (e.g., 128000 for 128K, 1000000 for 1M)                                         |
| `max_price_per_million` | number  | No       | Maximum price per 1M input tokens in USD (e.g., 1.0 for \$1/1M)                                                  |
| `limit`                 | integer | No       | Number of recommendations to return (1-20, default: 5)                                                           |

**Returns:**

* Top matching models with detailed reasoning
* Comparison table of pricing, context length, and capabilities
* Best use case for each recommended model

**Example:**

```
Input:
  use_case: "customer support with image handling"
  require_vision: true
  preferred_tier: "Standard"
  require_tools: true

Output:
  1. google/gemini-2.0-flash-001
     Tier: Budget
     Price: $0.10/$0.30 per 1M tokens
     Context: 1M tokens
     Reason: Excellent balance of vision, tools, and cost

  2. openai/gpt-4o
     Tier: Standard
     Price: $2.50/$10.00 per 1M tokens
     Context: 128K tokens
     Reason: Industry-leading vision quality
```

<Callout type="tip">
  **Pricing Tiers:**

  * **Budget:** \< \$1 per 1M input tokens (great for high volume)
  * **Standard:** \$1-5 per 1M input tokens (balanced performance)
  * **Premium:** > \$5 per 1M input tokens (highest quality)
</Callout>

***

### list-models

List all available AI models from OpenRouter, optionally filtered by capabilities.

| Parameter            | Type    | Required | Description                                                          |
| -------------------- | ------- | -------- | -------------------------------------------------------------------- |
| `tier`               | string  | No       | Filter by pricing tier: "Budget", "Standard", or "Premium"           |
| `require_tools`      | boolean | No       | Only show models with tool/function calling support (default: false) |
| `require_vision`     | boolean | No       | Only show models with image/vision input support (default: false)    |
| `require_audio`      | boolean | No       | Only show models with audio input support (default: false)           |
| `min_context_length` | integer | No       | Minimum context length in tokens (e.g., 128000 for 128K)             |
| `limit`              | integer | No       | Maximum models to return (1-200, default: 50)                        |

**Returns:** Models organized by pricing tier with tables showing name, price, context length, and supported capabilities.

**Example:**

```
Input:
  tier: "Budget"
  require_tools: true
  require_vision: true

Output:
  Budget Tier (< $1.00 per 1M input tokens):

  | Model | Input Price | Context | Tools | Vision | Audio |
  |-------|-------------|---------|-------|--------|-------|
  | google/gemini-2.0-flash-001 | $0.10 | 1M | ✓ | ✓ | ✗ |
  | google/gemini-2.0-flash-thinking-exp:free | $0.00 | 32K | ✓ | ✓ | ✗ |
```

<Callout type="info">
  **Empty Tiers:** Tiers with no matching models are automatically removed from the output.
</Callout>

***

### get-model-details

Get detailed information about a specific model by its ID.

| Parameter  | Type   | Required | Description                                                                                             |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------------------------- |
| `model_id` | string | Yes      | OpenRouter model ID (e.g., "anthropic/claude-sonnet-4", "openai/gpt-4o", "google/gemini-2.0-flash-001") |

**Returns:**

* Provider and tier information
* Modality (text, text+vision, text+audio)
* Pricing per 1M tokens with example cost calculation
* Capabilities (tools, vision, audio)
* Context window with approximate word and page counts
* Usage example

**Example:**

```
Input: model_id: "anthropic/claude-sonnet-4"

Output:
  Model: claude-sonnet-4
  Provider: Anthropic
  Tier: Premium
  Modality: Text + Vision

  Pricing (per 1M tokens):
  - Input: $3.00
  - Output: $15.00
  - Example: 10K tokens in, 1K tokens out = $0.045

  Capabilities:
  - Tool/Function Calling: Yes
  - Vision/Image Input: Yes
  - Audio Input: No

  Context Window: 200,000 tokens
  - Approx. 150,000 words
  - Approx. 600 pages

  Usage Example:
  POST /api/v1/agent-loops
  {
    "model": "anthropic/claude-sonnet-4",
    "messages": [...]
  }
```

<Callout type="warning">
  **Model Not Found:** If the model\_id doesn't exist, the tool returns an error with suggestions for similar models.
</Callout>

***

### search-models

Search for AI models using fuzzy matching across names, IDs, providers, and descriptions.

| Parameter | Type    | Required | Description                                                |
| --------- | ------- | -------- | ---------------------------------------------------------- |
| `query`   | string  | Yes      | Search query - supports partial matches and typo tolerance |
| `limit`   | integer | No       | Maximum results to return (1-100, default: 20)             |

**Returns:** Matching models in table format with provider, tier, pricing, context length, and capabilities.

**Example:**

```
Input: query: "claude son"

Output:
  | Model | Provider | Tier | Input Price | Context | Tools | Vision | Audio |
  |-------|----------|------|-------------|---------|-------|--------|-------|
  | anthropic/claude-sonnet-4 | Anthropic | Premium | $3.00 | 200K | ✓ | ✓ | ✗ |
  | anthropic/claude-3.5-sonnet | Anthropic | Premium | $3.00 | 200K | ✓ | ✓ | ✗ |
```

**Search Fields:**

* Model name (e.g., "claude", "gpt", "gemini")
* Model ID (e.g., "anthropic/claude-sonnet-4")
* Provider name (e.g., "openai", "anthropic", "google")
* Model description

<Callout type="tip">
  **Typo Tolerance:** The fuzzy search handles typos and partial matches. Try "claud" or "gpt4o" and you'll still find the right models.
</Callout>

***

## Common Workflows

### Choosing a Model for a New Project

<Steps>
  <Step title="Define Requirements">
    Determine if you need vision, audio, tools, specific context length, or budget constraints
  </Step>

  <Step title="Get Recommendations">
    Use `recommend-model` with your requirements and use case
  </Step>

  <Step title="Review Details">
    Use `get-model-details` for top recommendations to compare pricing and features
  </Step>

  <Step title="Select Model">
    Choose based on the balance of capabilities, performance, and cost
  </Step>
</Steps>

### Finding Models Within Budget

<Steps>
  <Step title="Set Budget Constraint">
    Use `list-models` with `tier: "Budget"` or set `max_price_per_million`
  </Step>

  <Step title="Filter by Capabilities">
    Add `require_vision`, `require_tools`, or `require_audio` as needed
  </Step>

  <Step title="Compare Options">
    Review the filtered list and use `get-model-details` for specific models
  </Step>
</Steps>

### Exploring Model Capabilities

<Steps>
  <Step title="Search by Name">
    Use `search-models` with the model name or provider
  </Step>

  <Step title="Get Full Details">
    Use `get-model-details` with the exact model\_id from search results
  </Step>

  <Step title="Compare Alternatives">
    Use `recommend-model` with similar requirements to find alternatives
  </Step>
</Steps>

***

## Model Capability Reference

### Tool/Function Calling

Models with tool support can call external functions to fetch data or perform actions. Essential for:

* Agentic workflows
* Real-time data access
* Integration with external APIs

**Models:** Most Claude, GPT, and Gemini models support tools.

### Vision/Image Input

Models with vision can analyze images, screenshots, charts, and diagrams. Useful for:

* Document analysis
* Image-based Q\&A
* UI/UX feedback
* Visual content moderation

**Models:** GPT-4o, Claude Sonnet/Opus, Gemini Flash/Pro support vision.

### Audio Input

Models with audio can process spoken audio. Useful for:

* Transcription
* Voice assistants
* Audio content analysis

**Models:** Limited availability - check specific model details.

### Context Length

Determines how much text the model can process at once:

* **32K tokens** (\~24K words, \~96 pages): Suitable for short documents
* **128K tokens** (\~96K words, \~384 pages): Good for medium documents and conversations
* **200K tokens** (\~150K words, \~600 pages): Great for long documents
* **1M+ tokens** (\~750K words, \~3000 pages): Handles entire codebases or books

***

## Tips & Best Practices

* **Start with use case** in `recommend-model` for better context-aware recommendations
* **Budget tier doesn't mean low quality** - models like Gemini 2.0 Flash offer excellent performance at budget pricing
* **Context length matters** - if you're processing large documents, filter by `min_context_length`
* **Check pricing carefully** - output tokens are typically more expensive than input tokens
* **Tool support is crucial** for Agentic Loops - enable `require_tools: true` when building autonomous workflows
* **Use fuzzy search** when you're not sure of the exact model name

***

<Card title="API Reference" icon="code" href="https://app.chatbotplatform.io/openapi">
  View the complete API specification for OpenRouter MCP server endpoints
</Card>
