---
title: OpenAI
---

<!-- THIS FILE IS AUTO-GENERATED BY website/scripts/generate-model-docs.js. DO NOT EDIT MANUALLY. -->

# OpenAI

Use `openai/<model>` with VoltAgent's model router.

## Quick start

```ts
import { Agent } from "@voltagent/core";

const agent = new Agent({
  name: "openai-agent",
  instructions: "You are a helpful assistant",
  model: "openai/gpt-4o-mini",
});
```

## Environment variables

- `OPENAI_API_KEY`

## Provider package

`@ai-sdk/openai`

## Default base URL

Not listed.

You can override the base URL by setting `OPENAI_BASE_URL`.

## Provider docs

- https://platform.openai.com/docs/models

## Models

<details>
  <summary>Show models (40)</summary>

- codex-mini-latest
- gpt-3.5-turbo
- gpt-4
- gpt-4-turbo
- gpt-4.1
- gpt-4.1-mini
- gpt-4.1-nano
- gpt-4o
- gpt-4o-2024-05-13
- gpt-4o-2024-08-06
- gpt-4o-2024-11-20
- gpt-4o-mini
- gpt-5
- gpt-5-chat-latest
- gpt-5-codex
- gpt-5-mini
- gpt-5-nano
- gpt-5-pro
- gpt-5.1
- gpt-5.1-chat-latest
- gpt-5.1-codex
- gpt-5.1-codex-max
- gpt-5.1-codex-mini
- gpt-5.2
- gpt-5.2-chat-latest
- gpt-5.2-codex
- gpt-5.2-pro
- o1
- o1-mini
- o1-preview
- o1-pro
- o3
- o3-deep-research
- o3-mini
- o3-pro
- o4-mini
- o4-mini-deep-research
- text-embedding-3-large
- text-embedding-3-small
- text-embedding-ada-002

</details>
