Skip to main content
This page preserves the v2.7.4 DalleTools example as a legacy reference.
DALL-E 2 and DALL-E 3 were removed from the OpenAI API on May 12, 2026. See OpenAI API deprecations. This DalleTools example is retained as a legacy reference. Use OpenAITools with GPT Image 2 in Image Generation Agent.

Legacy Source

This example expected the openai package and an OPENAI_API_KEY. Its DalleTools calls no longer run because DALL-E 2 and DALL-E 3 were removed from the OpenAI API on May 12, 2026.

Current Alternative

Follow Image Generation Agent to generate and save images with OpenAITools and GPT Image 2. For details, see Dalle cookbook.