# OpenRouter · Search models

Get developer and code data with OpenRouter · Search models from Alexandria through one Spiral API key. Start here to find a model slug and permaslug, e.g. `q=jev, output_modalities=decisions` to check whether the TypeSafe Jev decision model is listed; then call get_model / get_model_endpoints / get_model_pricing. It runs in the background and returns structured JSON. Pay as you go, with no subscription.

- Provider: Alexandria
- Category: Developer
- Runs: In the background
- Returns: json
- Tool id: `alexandria` / `openrouter-ai/model-marketplace/search_models`
- Page: https://spiral.ai/tools/alexandria/openrouter-ai/model-marketplace/search_models

## Pricing

$0.00873 per call.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 5 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `q` | text |  | — | Free-text match on model name or slug. |
| `zdr` | true or false |  | — | Only models with a zero-data-retention endpoint. |
| `arch` | text |  | — | Model family filter, e.g. `GPT`, `Claude`, `Llama`. |
| `sort` | one of | most-popular, newest, top-weekly, pricing-low-to-high, pricing-high-to-low, context-high-to-low, throughput-high-to-low, latency-low-to-high, intelligence-high-to-low, coding-high-to-low, agentic-high-to-low, design-arena-elo-high-to-low | — | Server-side order. |
| `limit` | number | 1 to 100 | 25 | limit |
| `offset` | number | 0 to … | 0 | Records to skip; use `next_offset` from the previous page. |
| `region` | one of | eu, us | — | Only models with endpoints in this data region. |
| `category` | one of | programming, roleplay, marketing, marketing/seo, technology, science, translation, legal, finance, health, trivia, academia | — | Use-case category filter. Cannot be combined with `supported_parameters` (the API rejects that pair). |
| `max_price` | number | 0 to … | — | Maximum prompt price in USD per million tokens (0 lists free models). |
| `min_price` | number | 0 to … | — | Minimum prompt price in USD per million tokens. |
| `providers` | text |  | — | Comma-separated hosting provider slugs, e.g. `typesafe`, `openai,azure`. Pattern: ^[a-z0-9-]+(,[a-z0-9-]+)*$. |
| `min_context` | number | 1 to … | — | Minimum context length in tokens. |
| `model_authors` | text |  | — | Comma-separated author slugs, e.g. `typesafe`, `openai`. Pattern: ^[a-z0-9-]+(,[a-z0-9-]+)*$. |
| `input_modalities` | text |  | — | Comma-separated input modalities: text, image, audio, file. Pattern: ^(all\|[a-z]+(,[a-z]+)*)$. |
| `output_modalities` | text |  | — | Comma-separated output modalities (text, image, embeddings, audio, video, rerank, decisions, speech, transcription) or `all`. The API defaults to `text`. Pattern: ^(all\|[a-z]+(,[a-z]+)*)$. |
| `supported_parameters` | list |  | — | Only models whose endpoints support every listed parameter, e.g. `tools`, `structured_outputs`. |

## Example

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "openrouter-ai/model-marketplace/search_models",
    "input": {
      "q": "<q>"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=alexandria&model=openrouter-ai%2Fmodel-marketplace%2Fsearch_models

## Common questions

### OpenRouter · Search models

**How much does OpenRouter · Search models cost?**

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use OpenRouter · Search models through an API?**

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "openrouter-ai/model-marketplace/search_models"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with Alexandria to use OpenRouter · Search models?**

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

**Can my AI agent use OpenRouter · Search models?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

