---
title: "AI Assistant OpenAI model provider | Nutrient"
canonical_url: "https://www.nutrient.io/guides/ai-assistant/service-configuration/model-providers/openai-provider/"
md_url: "https://www.nutrient.io/guides/ai-assistant/service-configuration/model-providers/openai-provider.md"
last_updated: "2026-06-08T15:30:30.263Z"
description: "Using the OpenAI API service is the simplest way to get set up. This service offers a wide range of configurations to track cost and throttle usage."
---

# OpenAI model provider

Using the OpenAI API service is the simplest way to get set up. This service offers a wide range of configurations to track cost, throttle usage, and manage access, depending on your needs. If you’re in the testing stage, we strongly recommend starting with OpenAI.

The OpenAI API has attained SOC 2 Type 2 compliance (see the [official announcement](https://trust.openai.com/?tcuUid=16a1f4e1-9120-45c1-96bd-5c1007f0f3d1)).

To get started, you’ll need to create an API key by following the [OpenAI API key](https://developers.openai.com/api/docs/quickstart/) guide.

Next, use the API key you’ve created to set the `OPENAI_API_KEY` environment variable in your Docker Compose file, or on the command line when using Docker directly. See the [configuration options](https://www.nutrient.io/guides/ai-assistant/service-configuration/docker-configuration.md) guide for more information about environment variables:

```yaml

services:
  ai-assistant:
    environment:
      - OPENAI_API_KEY=your-openai-api-key...

```

## Service configuration file

You may also customize the OpenAI models used in AI Assistant by creating a service configuration file, as explained in the [model-provider configuration](https://www.nutrient.io/guides/ai-assistant/service-configuration/ai-configuration.md) guide.

Our current suggestion for OpenAI is `gpt4o-mini`, along with an embedding model of `text-embedding-3-small`:

```yaml

version: "2"

providers:
  - name: "openai"
    apiKey: "your-openai-api-key" # Optional

models:
  - model: "openai:gpt4o-mini"
    labels: ["default-llm"]
  - model: "openai:text-embedding-3-small"
    labels: ["default-embedding"]

```

- **`providers`**:
  - **`name`** — The name of the provider. Set this to `openai`.
  - **`apiKey`** — The API key for the OpenAI service. You can retrieve your keys once you’ve created an instance. See the [OpenAI API key](https://developers.openai.com/api/docs/quickstart/) guide for more information.

- **`models`**:
  - **`model`** — The model in `provider:model` format.
  - **`labels`** — Use `default-llm` for your chat model and `default-embedding` for your embedding model.

## Pricing

As you’re providing your own OpenAI API key, you’ll be subject to all the costs related to using the OpenAI or Azure OpenAI service. We’ve created an interactive [LLM spend calculator](https://www.nutrient.io/sdk/ai-assistant/) to help you estimate your monthly costs.

## What determines your monthly cost?

AI Assistant usage is priced in three main categories, outlined below.

### Document ingestion

Each new document added to AI Assistant goes through an [ingestion](https://www.nutrient.io/guides/ai-assistant/document-ingestion/overview.md) process, which enables search, summarization, and Q&A. Documents are only ingested once, even if multiple users access them later.

Calculator inputs:

- **Number of new documents ingested per month**

- **Average document size** (for example, small invoices vs. large manuals)

### User interactions

Costs are also based on how users interact with documents — whether through summarization, Q&A, or deep research conversations.

Calculator inputs:

- **Number of active users**

- **Documents viewed by each user per month**

- **Level of engagement**:
  - **None** — No chat usage
  - **Low** — Occasional summaries or simple queries
  - **Medium** — Regular in-document conversations
  - **High** — Frequent follow-ups and deeper context
  - **Deep** — Analytical, multipart sessions

### Redaction (if enabled in your license)

If you’ve licensed the Redaction component, AI Assistant can help redact sensitive content from documents using LLMs.

Calculator inputs:

- **Number of documents redacted per month**

Redaction can be used on its own or in combination with other AI Assistant capabilities.

## Why use the LLM spend calculator?

Rather than estimate these costs manually, we highly recommend using our calculator to:

- Accurately factor in current OpenAI pricing

- Automatically apply the correct token estimates

- Get a detailed monthly cost breakdown

- Model different usage scenarios

You can find the calculator on the [AI Assistant overview](https://www.nutrient.io/sdk/ai-assistant/) page.
---

## Related pages

- [AWS Bedrock model provider](/guides/ai-assistant/service-configuration/model-providers/bedrock-provider.md)
- [Azure model provider](/guides/ai-assistant/service-configuration/model-providers/azure-provider.md)
- [OpenAI API-compatible provider](/guides/ai-assistant/service-configuration/model-providers/openai-api-compatible-providers.md)
- [Anthropic model provider](/guides/ai-assistant/service-configuration/model-providers/anthropic-provider.md)

