OpenRouter x Exa

OpenRouter x Exa

Bringing real-time web data to 400+ LLM models

case-study


How do you connect 400+ LLMs to the web in one go?

OpenRouter users routinely asked for answers that cite fresh sources (news, docs, GitHub READMEs, etc.), and had to build custom solutions if they wanted their models to be connected to the web. OpenRouter partnered with Exa as the sole search engine powering live web data sources to all its models.

About OpenRouter

OpenRouter is an open, model‑agnostic routing layer used by hundreds of thousands of developers and ML teams monthly. One endpoint lets users swap between GPT‑4o, Claude‑3.5, Gemma‑2‑20B and hundreds more while keeping auth, rate‑limits and billing in one place. In 2024 the service handled billions of tokens for ~1M registered users.

The Challenge

Shipping web search for all users and all 400+ models meant meeting five non‑negotiable requirements:

Exa met every requirement.

In less than 1 month, we went from intro chat to having Exa's search fully deployed into production - powering all of OpenRouter's web search capabilities.

Why Exa

Grading comparison chart

How it works

The request:

{ "model": "openai/gpt-4.1", "plugins": [{ "id": "web" }], "messages": [ { "role": "user", "content": "What are the latest developments in quantum computing?" } ], }

The response:

{ "message": { "role": "assistant", "content": "Here's the latest news I found: ...", "annotations": [ { "type": "url_citation", "url_citation": { "url": "https://www.example.com/web-search-result", "title": "Title of the web search result", "content": "Content of the web search result", // Added by OpenRouter if available "start_index": 100, // The index of the first character of the URL citation in the message. "end_index": 200 // The index of the last character of the URL citation in the message. } } ] } }

Under the hood the web plugin:

  1. Sends the user string to Exa (max_results = 5 by default).
  2. Wraps the returned snippets in a system message.
  3. Passes both query and context to the target model.

Developers benefit from:

Here are the OpenRouter docs: openrouter.ai/docs/features/web-search

Early Results

In just a few months, over 2.36M queries have been powered by OpenRouter + Exa. We're excited to see all the new apps that are possible!

"OpenRouter has a laser focus on bringing a great developer experience to all language models, and Exa is the best way we've found for grounding AI in the real world in a model-agnostic way."

- Alex Atallah, OpenRouter CEO