Overview

OpenAIImageGenService provides high-quality image generation capabilities using OpenAI’s DALL-E models. It transforms text prompts into images with various size options and model configurations, offering both artistic and photorealistic image creation capabilities.

Installation

To use OpenAI image generation services, install the required dependencies:
pip install "pipecat-ai[openai]"

Prerequisites

OpenAI Account Setup

Before using OpenAI image generation services, you need:
  1. OpenAI Account: Sign up at OpenAI Platform
  2. API Key: Generate an OpenAI API key from your account dashboard
  3. Model Access: Ensure access to DALL-E models
  4. HTTP Session: Configure aiohttp session for image downloading

Required Environment Variables

  • OPENAI_API_KEY: Your OpenAI API key for authentication