# OpenAI

:::info
**Note:** This integration is available in the Business + Enterprise editions from v0.75.1 onwards

:::

 ![AI answers in Outline](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/292079f8-0319-4111-bb5b-315e8ae8f14e/36a6b860-5c4b-42ed-aa3b-6f0d094b9ce6/image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20260905%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260905T161500Z&X-Amz-Expires=86400&X-Amz-Signature=af39c0cb04198980327bbd4f50e947d41c102f413038afb46474c01833f5f5f6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =3360x329")

The [OpenAI](https://openai.com/) integration will allow for various AI functionality around the Outline workspace. Today, it enables “[AI answers](https://www.getoutline.com/changelog/ai-answers)” to questions by semantically indexing your knowledge, retrieving related documents in realtime, and generating direct answers to questions using their content.

# Setup

## OpenAI

* Sign up for an OpenAI account, [create an API key](https://platform.openai.com/api-keys) and add it to the server environment under `OPENAI_API_KEY`.
* You will need a database with the [pgvector](https://github.com/pgvector/pgvector) extension installed to store the search index. This can be a new database, or the same database you use for other Outline data. If you’re using a separate database then an additional `DATABASE_URL_VECTOR` environment config should be provided to tell Outline where to find this database.
* Restart the application server, Under **Settings → AI → AI Answers** you can now enable the integration which will automatically begin indexing content.

## Azure AI Foundry

* Create a new Resource in [Azure AI Foundry](https://ai.azure.com/). Copy the API key and endpoint.
* Under “[Model catalog](https://ai.azure.com/resource/models)” in the left side nav make sure to deploy both `gtp-4o-mini` and `text-embedding-ada-002` models with their default names.
* Set the following environment variables in Outline:
  * `OPENAI_URL=https://<your deployment>.openai.azure.com/openai/`
  * `OPENAI_API_KEY=<your API key>`
  * `OPENAI_API_VERSION=2024-10-21`


* You will need a database with the [pgvector](https://github.com/pgvector/pgvector) extension installed to store the search index. This can be a new database, or the same database you use for other Outline data. If you’re using a separate database then an additional `DATABASE_URL_VECTOR` environment config should be provided to tell Outline where to find this database.
* Restart the application server, Under **Settings → AI → AI Answers** you can now enable the integration which will automatically begin indexing content.

# Privacy and limitations

* AI answers are limited to information contained in documents that the logged in user has access to.
* The initial indexing may take a few seconds or a few minutes depending on your OpenAI rate limit and the number of documents in your knowledge base.
* Content inside attachments will not yet be indexed.

---

**Documents**

- [License restrictions](https://docs.getoutline.com/s/hosting/doc/license-restrictions-f9aq6uEL3H)
- [Requirements](https://docs.getoutline.com/s/hosting/doc/requirements-ULdYnwi4wG)
- [Installation methods](https://docs.getoutline.com/s/hosting/doc/installation-methods-pSvgz9j0QC)
- [Configuration](https://docs.getoutline.com/s/hosting/doc/configuration-509J4lAzjo)
- [Business + Enterprise](https://docs.getoutline.com/s/hosting/doc/business-enterprise-rv0715NxO3)
- [Backups](https://docs.getoutline.com/s/hosting/doc/backups-KZtPOADCHG)
- [Troubleshooting](https://docs.getoutline.com/s/hosting/doc/troubleshooting-HXckrzCqDJ)