Enabling AI in Docs

Enabling AI in Docs

ONLYOFFICE lets you connect AI models and use them right in the editors. The AI Tools tab gives you access to all AI features, and you can assign specific tasks to different models depending on what each model can do.

AI tools are built into the editors, so you don't need to install any plugins. However, for security reasons, no AI model is connected by default. To start using AI features, connect a model of your choice as described below.

If the AI Tools tab is not displayed on the top toolbar, go to the Plugins tab, click Background Plugins, and make sure the AI Tools switch is turned on.

AI Tools tab
Step 1. Connecting an AI model

You can connect a model from an AI provider using an API key, or a locally hosted model. There are two places where you can do this: the AI Settings window and the AI Chat panel.

Via the AI Settings window

  1. Go to the AI Tools tab and click Settings. The AI Settings window will open on the AI Models tab.
  2. Click Add Model.
  3. Select a Provider and enter your API key.
  4. Click Add Model again to save the model.
Adding an AI model in the AI Settings window

Via the AI Chat panel

  1. Go to the AI Tools tab and click AI Chat. The AI Chat panel will open on the right.
  2. If no model is connected yet, the panel will prompt you to connect one. Select a Provider and enter your API key.
  3. Click Add Model.
Connecting an AI model in the AI Chat panel

In both cases, you only need to fill in two fields: Provider and API key. The other fields are filled in automatically.

  • Provider — select an AI provider from the list. To use a provider that is not on the list, click Import Custom Provider.
  • API key — enter the API key you received from your provider. If you don't have one, click the Get API key link to open the key creation page of the selected provider.
  • Base URL — filled in automatically when you select a provider. Change it only if you use a custom provider or a locally hosted model.
  • Model — this list is unavailable until you enter a valid API key. Once the key is accepted, a model is selected automatically. You can choose a different one from the list.
  • Profile name — filled in automatically. You can replace it with any name you like.

If the API key is not valid, an error message appears under the API key field, and the Add Model button remains unavailable. Check the key and enter it again.

Step 2. Assigning models to tasks

Once your model is connected, assign it to tasks:

  1. Go to the AI Tools tab and click Settings.
  2. Switch to the Model Assignment tab.
  3. Select a model for each task. If you have connected several models, you can use a different model for each task.
Not all models support all tasks. If you assign a model to a task it doesn't support, errors may occur.
Assigning AI models to tasks

The AI Settings window also has the MCP Servers and Web search tabs, where you can connect MCP servers and set up web search for your AI assistant.

Step 3. Using AI

Now you can use AI features by selecting the corresponding options on the AI Tools tab:

  • AI Chat — ask questions about your document, generate new text, or improve existing content.
  • Create Quick AI Action — create your own action with a custom prompt and add it to the toolbar.
  • Summarization — summarize long passages of text.
  • Translation — translate the selected text into the language of your choice.
  • Create AI assistant — set up an assistant for your own tasks.
  • Show all results — view the results generated by AI.
  • Grammar & Spelling — check your text and review the suggested corrections.

For more details on the available AI features, refer to the AI User Guides section.

Using AI when working with macros
Warning The code is processed by an AI service of your choosing. Data leaks or unexpected code modifications may occur. ONLYOFFICE assumes no responsibility for any completions that may contain errors or omissions, as well as for any harassing and inappropriate content. The information contained in the completions is generated by an AI service of the user's choosing and is provided on an "as is" basis without additional filtering from ONLYOFFICE.

AI can help you create and convert macros. To access these features:

  1. Go to the View tab and click the Macros button on the top toolbar. The Macros window will open.
  2. Click the AI button in the top left corner of the window and select one of the options:
    • Create from description — describe what the macro should do, and your AI assistant will generate it.
    • Convert from VBA — paste your VBA code into the Convert macros from VBA window, and it will be converted into a macro.
If you have not configured your AI assistant yet, you will be prompted to do so. Follow Step 1 and Step 2 of this guide to configure it.

To learn more about macros, please refer to our API Documentation.

Article with the tag:
Browse all tags