> ## Documentation Index
> Fetch the complete documentation index at: https://doc.rapida.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI

> Configure OpenAI GPT models in integration-api.

The OpenAI caller uses the OpenAI Go SDK. Credentials are read from the vault. Streaming uses Server-Sent Events with per-token `onStream` callbacks.

**Provider directory:** `api/integration-api/internal/caller/openai/`

***

## Vault Credential

| Key | Description |
| - | - |
| `key` | OpenAI API key from [platform.openai.com/api-keys](https://platform.openai.com/api-keys) |

***

## Setup

**1. Get an OpenAI API key**

Sign in at [platform.openai.com](https://platform.openai.com) → **API Keys → Create new secret key**.

**2. Add to Rapida vault**

In the Rapida dashboard → **Credentials → Create Credential**, select provider **OpenAI**, enter `key` = your API key.

**3. Configure the assistant LLM**

In the assistant settings → **LLM Provider**, select **OpenAI** and set model parameters:

```json theme={null}
{
  "model.name": "gpt-4o",
  "model.temperature": 0.7,
  "model.max_tokens": 200,
  "model.tool_choice": "auto"
}
```

***

## Supported Models

| Model | Context | Notes |
| - | - | - |
| `gpt-4o` | 128k | Best balance of speed and capability |
| `gpt-4o-mini` | 128k | Fastest, lowest cost |
| `gpt-4-turbo` | 128k | High-capability |
| `gpt-4` | 8k | Legacy |
| `gpt-3.5-turbo` | 16k | Low cost |

***

## Model Parameters

| Key | Supported | Notes |
| - | - | - |
| `model.name` | ✅ | Required |
| `model.temperature` | ✅ | 0.0–2.0 |
| `model.max_tokens` | ✅ | |
| `model.top_p` | ✅ | |
| `model.stop` | ✅ | Array of stop sequences |
| `model.tool_choice` | ✅ | `auto`, `none`, `required` |
| `model.frequency_penalty` | ✅ | -2.0–2.0 |
| `model.presence_penalty` | ✅ | -2.0–2.0 |
| `model.seed` | ✅ | Deterministic output |
| `model.response_format` | ✅ | `json_object`, `text` |
| `model.reasoning_effort` | ✅ | `low`, `medium`, `high` (o-series models) |

***

> [card] [Anthropic](https://doc.rapida.ai/opensource/services/integration-api/llm/anthropic.md)
>
> Claude models

> [card] [LLM Overview](https://doc.rapida.ai/opensource/services/integration-api/llm/overview.md)
>
> All providers and ChatCompletionOptions


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.