Skip to main content

OpenAI Provider

Use OpenAI’s GPT models including GPT-4o, GPT-4, and GPT-3.5 with PraisonAI TypeScript.

Environment Variables

Supported Modalities

Quick Start

1

Simple Usage

2

With Configuration

Adjust provider credentials and model settings for production — see the sections above.

Available Models

Advanced Configuration

With Tools

Streaming

Multi-Agent Workflow

Troubleshooting

Invalid API Key

Solution: Verify your OPENAI_API_KEY is set correctly and has not expired.

Rate Limits

Solution: Implement retry logic or upgrade your OpenAI plan.

Model Not Found

Solution: Check the model name is correct. Use gpt-4o-mini instead of gpt-4-mini.

OpenAI CLI Usage

OpenAI CLI Usage

Providers Overview

Providers Overview