# OpenRouter API

> OpenRouter returns AI model details, prices, and hosting options as a workflow and API.

OpenRouter lists public models with prices, context sizes, supported inputs, and release dates; filter or sort results. Get model returns details, prices, and hosting options; enter a model name, OpenRouter link, or slug.

- Page: https://fous.com/tools/openrouter
- Handle: `@openrouter`
- Category: [AI](https://fous.com/tools/category/ai)
- Source website: https://openrouter.ai
- Last verified: Sep 29, 2026

## Methods

### Get model

Operation `get_model`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get a model’s prices, limits, supported inputs, release date, and hosting providers from its name or OpenRouter link. Prices are base USD rates per million tokens; provider uptime is the reported one-day percentage when available.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `model` | string | yes | `"Claude Sonnet 4.5"` | Model name, OpenRouter model link, or model slug, for example Claude Sonnet 4.5. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "model"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "Model name, OpenRouter model link, or model slug, for example Claude Sonnet 4.5.",
      "examples": [
        "Claude Sonnet 4.5",
        "Llama 3.3 70B",
        "https://openrouter.ai/models/openai/gpt-5"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "model": "Claude Sonnet 4.5"
    },
    {
      "model": "Llama 3.3 70B"
    },
    {
      "model": "https://openrouter.ai/models/openai/gpt-5"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `provider` | string | `"Anthropic"` | Organization offering the model. |
| `providers` | array |  | Available hosting options and their prices, context windows, and one-day uptime where reported. A host may have multiple options. |
| `providers[].provider_name` | string | `"Claude Platform on AWS"` |  |
| `providers[].uptime_percent` | number or null | `99.98659004366617` |  |
| `providers[].context_length_tokens` | integer or null | `1000000` |  |
| `providers[].input_price_usd_per_million_tokens` | number or null | `3` |  |
| `providers[].output_price_usd_per_million_tokens` | number or null | `15` |  |
| `model_name` | string | `"Anthropic: Claude Sonnet 4.5"` | Model’s display name. |
| `model_slug` | string | `"anthropic/claude-sonnet-4.5"` | OpenRouter model identifier. |
| `description` | string or null | `"Claude Sonnet 4.5 is Anthropic’s most advanced Sonnet model to date, optimized for real-world agents and coding workflo` | Published model summary. |
| `release_date` | string or null | `"2025-09-29"` | Model listing release date (YYYY-MM-DD). |
| `model_page_link` | string | `"https://openrouter.ai/models/anthropic/claude-sonnet-4.5"` | OpenRouter model page. |
| `supported_inputs` | array |  | Supported input types. |
| `context_length_tokens` | integer or null | `1000000` | Maximum context window in tokens. |
| `maximum_output_tokens` | integer or null | `64000` | Maximum output in tokens. |
| `input_price_usd_per_million_tokens` | number or null | `3` | Base input price in USD per million tokens. |
| `output_price_usd_per_million_tokens` | number or null | `15` | Base output price in USD per million tokens. |

**Example input**

```json
{
  "model": "Claude Sonnet 4.5"
}
```

**Example output**

```json
{
  "provider": "Anthropic",
  "providers": [
    {
      "provider_name": "Claude Platform on AWS",
      "uptime_percent": 99.98659004366617,
      "context_length_tokens": 1000000,
      "input_price_usd_per_million_tokens": 3,
      "output_price_usd_per_million_tokens": 15
    },
    {
      "provider_name": "Azure",
      "uptime_percent": 95.1048951048951,
      "context_length_tokens": 200000,
      "input_price_usd_per_million_tokens": 3,
      "output_price_usd_per_million_tokens": 15
    },
    {
      "provider_name": "Amazon Bedrock",
      "uptime_percent": 99.88574415479586,
      "context_length_tokens": 1000000,
      "input_price_usd_per_million_tokens": 3,
      "output_price_usd_per_million_tokens": 15
    }
  ],
  "model_name": "Anthropic: Claude Sonnet 4.5",
  "model_slug": "anthropic/claude-sonnet-4.5",
  "description": "Claude Sonnet 4.5 is Anthropic’s most advanced Sonnet model to date, optimized for real-world agents and coding workflows. It delivers state-of-the-art performance on coding benchmarks such as SWE-ben…",
  "release_date": "2025-09-29",
  "model_page_link": "https://openrouter.ai/models/anthropic/claude-sonnet-4.5",
  "supported_inputs": [
    "text",
    "image",
    "file"
  ],
  "context_length_tokens": 1000000,
  "maximum_output_tokens": 64000,
  "input_price_usd_per_million_tokens": 3,
  "output_price_usd_per_million_tokens": 15
}
```

### List models

Operation `list_models`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

List public OpenRouter models with per-million-token prices, context size, input types, release date, and model page. Sort by newest, input price, or popularity; unavailable prices are null. Input types list text, image, audio and file only.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"newest"` | Order of models, such as cheapest for lowest input token price first. |
| `query` | string | no | `"vision"` | Provider name or model keyword, such as Anthropic or vision. Leave blank for all models. |
| `max_results` | integer | no | `4` | Maximum models to return, such as 50. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "sort": {
      "enum": [
        "newest",
        "cheapest",
        "most_used"
      ],
      "type": "string",
      "default": "newest",
      "description": "Order of models, such as cheapest for lowest input token price first.",
      "examples": [
        "newest",
        "cheapest",
        "most_used"
      ]
    },
    "query": {
      "type": "string",
      "default": "",
      "description": "Provider name or model keyword, such as Anthropic or vision. Leave blank for all models.",
      "examples": [
        "vision",
        "Anthropic",
        "unlikely-no-matches-xyzabc"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 500,
      "minimum": 1,
      "description": "Maximum models to return, such as 50.",
      "x-fous-developer": true,
      "examples": [
        4,
        5,
        500
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sort": "newest",
      "query": "vision",
      "max_results": 4
    },
    {
      "sort": "cheapest",
      "query": "Anthropic",
      "max_results": 5
    },
    {
      "sort": "most_used",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `models` | array |  | Matching models in the requested order. |
| `models[].provider` | string | `"DeepSeek"` | Model provider. |
| `models[].model_name` | string | `"DeepSeek: DeepSeek V4 Flash Vision Exp"` | Display name of the model. |
| `models[].model_slug` | string | `"deepseek/deepseek-v4-flash-vision-exp"` | OpenRouter model slug. |
| `models[].release_date` | string or null | `"2026-08-21"` | Model listing release date. |
| `models[].model_page_link` | string | `"https://openrouter.ai/models/deepseek/deepseek-v4-flash-vision-exp"` | Page for this model on OpenRouter. |
| `models[].supported_inputs` | array |  | Supported text, image, audio, and file inputs. |
| `models[].context_length_tokens` | integer or null | `1048576` | Maximum context size in tokens, or null if unknown. |
| `models[].input_price_usd_per_million_tokens` | number or null | `0.2156` | Input price in USD for one million tokens, or null if unspecified. |
| `models[].output_price_usd_per_million_tokens` | number or null | `0.6468` | Output price in USD for one million tokens, or null if unspecified. |

**Example input**

```json
{
  "sort": "newest",
  "query": "vision",
  "max_results": 4
}
```

**Example output**

```json
{
  "models": [
    {
      "provider": "DeepSeek",
      "model_name": "DeepSeek: DeepSeek V4 Flash Vision Exp",
      "model_slug": "deepseek/deepseek-v4-flash-vision-exp",
      "release_date": "2026-08-21",
      "model_page_link": "https://openrouter.ai/models/deepseek/deepseek-v4-flash-vision-exp",
      "supported_inputs": [
        "text",
        "image"
      ],
      "context_length_tokens": 1048576,
      "input_price_usd_per_million_tokens": 0.2156,
      "output_price_usd_per_million_tokens": 0.6468
    },
    {
      "provider": "Qwen",
      "model_name": "Qwen: Qwen3.8 27B",
      "model_slug": "qwen/qwen3.8-27b",
      "release_date": "2026-08-14",
      "model_page_link": "https://openrouter.ai/models/qwen/qwen3.8-27b",
      "supported_inputs": [
        "text",
        "image"
      ],
      "context_length_tokens": 1000000,
      "input_price_usd_per_million_tokens": 0.0607,
      "output_price_usd_per_million_tokens": 4.4
    },
    {
      "provider": "Qwen",
      "model_name": "Qwen: Qwen3.8 27B (free)",
      "model_slug": "qwen/qwen3.8-27b:free",
      "release_date": "2026-08-14",
      "model_page_link": "https://openrouter.ai/models/qwen/qwen3.8-27b:free",
      "supported_inputs": [
        "text",
        "image"
      ],
      "context_length_tokens": 262144,
      "input_price_usd_per_million_tokens": 0,
      "output_price_usd_per_million_tokens": 0
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@openrouter",
  "visibility": "public",
  "operation": "get_model",
  "version": 1,
  "input": {
    "model": "Claude Sonnet 4.5"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@openrouter\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_model\",\n  \"version\": 1,\n  \"input\": {\n    \"model\": \"Claude Sonnet 4.5\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@openrouter",
  "visibility": "public",
  "operation": "get_model",
  "version": 1,
  "input": {
    "model": "Claude Sonnet 4.5"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/openrouter`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_model`: Get model. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_models`: List models. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-openrouter https://api.fous.com/mcp/tools/openrouter --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare model input and output prices
- Find models by provider or supported input type
- Review context sizes before selecting a model
- Compare hosting options and reported uptime
- Track model listing release dates

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this OpenRouter tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a OpenRouter account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from openrouter.ai when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### Which models support image input?

Use List models and check the supported inputs for image.

### What does a model cost per million tokens?

Get model returns base input and output prices; List models includes these prices for public models.

### Which providers host a model?

Get model returns hosting options with prices, context windows, and one-day uptime where reported.

## Related

- [Hugging Face API](https://fous.com/tools/hugging-face.md): Hugging Face returns public model, dataset, and demo search results, model details, or weekly trending models; unpublished information may be missing, and demo availability can change.
- [LMArena API](https://fous.com/tools/lmarena.md): Human-vote leaderboards for AI models across text, image, video, search, and web development.
- [Polymarket API](https://fous.com/tools/polymarket.md): Polymarket shows searchable markets with search-time odds and sometimes-unavailable 24-hour volume, ranks open markets by trading, and tracks chances over time, sometimes without recent points.
- [PriceRunner API](https://fous.com/tools/pricerunner.md): Compare prices for products offered by online shops.
- [Open Library API](https://fous.com/tools/open-library.md): Open Library returns book search results, catalog details, and author works; availability reflects listed editions, not current loan availability, and catalog details may be missing.
- [Shopify API](https://fous.com/tools/shopify.md): Shopify provides public products, prices, and availability from Shopify-powered stores, reflecting storefront information that may be restricted by some stores.
- [OpenTable API](https://fous.com/tools/opentable.md): OpenTable returns bookable tables within two hours or near requested times, plus public restaurant profiles; availability changes, and some profile details may be missing.
- [idealo API](https://fous.com/tools/idealo.md): Compare online shop offers for products on idealo.
- [All AI tools](https://fous.com/tools/category/ai)
