OpenRouter

OpenRouter is an AI routing platform. It gives access to many models from different providers using one API key. You don’t need separate keys for each provider.

This is a step-by-step guide on installing and configuring OpenRouter for ONLYOFFICE Docs and ONLYOFFICE DocSpace.

Configuring OpenRouter for ONLYOFFICE Desktop Editors

ONLYOFFICE Docs 9.2 introduces a built-in AI agent that helps you generate and summarize documents, manage files, analyze content, and much more.

  1. Open the AI Agent in ONLYOFFICE Desktop Editors.
  2. Click on Add provider and choose OpenRouter from the drop-down list.
  3. Give a name to your Agent.
  4. Input your API key in the provided field. The API key is issued by the AI provider and can be generated on the OpenRouter official website.
  5. Click Save.
OpenRouter in ONLYOFFICE Desktop EditorsOpenRouter in ONLYOFFICE Desktop Editors

Now OpenRouter is available for your AI agents. You can also switch between different AI models at any time using the AI Agent menu on the home page.

Configuring OpenRouter for ONLYOFFICE DocSpace

Starting with version 3.6, ONLYOFFICE DocSpace comes with built-in AI agents to facilitate working with documents.

Step 1. Add OpenRouter as your AI provider
  1. Go to SettingsAI SettingsAdd AI provider.
  2. In the drop-down list, select OpenRouter.
  3. Pick a name for your Agent.
  4. Input your API key in the provided field. The API key is issued by the AI provider and can be generated on the OpenRouter official website.
  5. Click Save.
OpenRouter in ONLYOFFICE DocSpaceOpenRouter in ONLYOFFICE DocSpace
Step 2. Enable the MCP server

AI agents need an MCP server to work inside DocSpace.

  1. Open the MCP servers section.
  2. You can use the built-in ONLYOFFICE DocSpace MCP Server or connect your own.
MCP servers settingsMCP servers settings
Step 3. Configure Web Search and Knowledge Base

This is an optional but recommended step.

To allow agents to use live web data:

  1. Open the SettingsAI SettingsWeb Search.
  2. Choose the Web Search Engine from the drop-down list.
  3. Enter the API Key in the corresponding field.
  4. Click Save.
Web Search settingsWeb Search settings

Please refer to the following article to learn more about Web Search.

To enable the knowledge base:

  1. Open the SettingsAI SettingsKnowledge.
  2. In the Provider list, choose OpenRouter.
  3. Enter the API Key in the corresponding field.
  4. Click Save.
Knowledge settingsKnowledge settings

Please refer to the following article to learn more about Knowledge bases.

Step 4. Create your AI agent
  1. Open AI agents → click the Create a new agent button.
  2. Enter the following details:
    • Name
    • Cover image
    • Tags
    • Provider name and AI model
    • AI instructions describing the agent's purpose
    • MCP tools
  3. Click Create.
Open Router - creating an agentOpen Router - creating an agent

Configuring OpenRouter for ONLYOFFICE Docs editors

You can also use OpenRouter in ONLYOFFICE Docs online editors to assist in content-related tasks.

  1. Follow this guide for general configuration.
  2. Once the plugin is installed, add AI models. Go to the AI tab and open the Settings.
  3. Select Edit AI models in the bottom left corner of the window and click Add.
  4. In the window that appears, select OpenRouter from the drop-down list.
  5. Input your API key in the provided field. The API key is issued by the AI provider and can be generated on the OpenRouter official website.
  6. Select any OpenRouter model (OpenAI, Anthropic, Meta, DeepSeek, etc.) and assign it to various tasks listed under Use model for.
  7. Click OK. The model will appear in the AI Models list.

    Click OK again.

  8. In the AI Configuration window, select the model you want to use to perform the various tasks.
  9. Access the AI features through the AI tab or by selecting text and right-clicking it to open the context menu.

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags