> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/integration-examples/workplace-apps/nextcloud-assistant.md).

# Nextcloud Assistant

Use Cortecs models with Nextcloud Assistant

[Nextcloud Assistant](https://docs.nextcloud.com/server/stable/admin_manual/ai/app_assistant.html) adds AI writing, summaries, and chat to Nextcloud. Connect it to Cortecs through the **OpenAI and LocalAI integration** app.

{% hint style="info" %}
Before you begin, create a Cortecs API key by following the [Member quickstart](/member-quickstart.md) and choose a text model from the [model catalog](https://cortecs.ai/serverlessModels).
{% endhint %}

## 1. Enable the apps

In Nextcloud, open **Apps**, search for [Nextcloud Assistant](https://github.com/nextcloud/assistant) and [OpenAI and LocalAI integration](https://github.com/nextcloud/integration_openai), then install and enable both.

## 2. Connect to Cortecs

Open **Administration settings → Artificial intelligence** and configure the OpenAI and LocalAI integration:

| Field                           | Value                                         |
| ------------------------------- | --------------------------------------------- |
| Service URL                     | `https://api.cortecs.ai/v1`                   |
| Authentication                  | **API key**                                   |
| API key                         | Your Cortecs API key                          |
| Text completion endpoint        | **Chat completions**                          |
| Default completion model to use | Your chosen Cortecs model from the model list |

Keep `/v1` in the service URL. The app adds the request path automatically.

## 3. Try Assistant

If multiple AI providers are installed, select the OpenAI and LocalAI integration for the text tasks you want to use in the AI administration settings. Open Assistant and submit a short text-generation or summary task.

For background-job setup and troubleshooting, see the [Nextcloud Assistant administration guide](https://docs.nextcloud.com/server/stable/admin_manual/ai/app_assistant.html). For integration settings, see the [OpenAI and LocalAI integration 4.2 documentation](https://github.com/nextcloud/integration_openai/tree/v4.2.0#-configuration).
