Prerequisites
- An OpenAI account with API access and billing enabled
- An OpenAI API key with Images API permissions
- For edit/variation: source images as base64 PNG (DALL-E 2) or supported formats for gpt-image-1
- project_contributor access in AgentRuntime
Connect in AgentRuntime
Get an OpenAI API key
Create a key at platform.openai.com. Ensure your organization can use image models.
Create a connection
Go to Connections and click New custom connection to create an API key connection with
APIKey. Optionally set DefaultModel (e.g. gpt-image-1 or dall-e-3) and APIBase.Add openaiimage MCP instance
Go to MCP, click Add instance for openaiimage, wire your connection on Instance config, set the profile active, and save.
What you can build
- Marketing assets — LLM writes creative brief →
openai_text_to_image→ upload to Google Drive or S3. - Product mockups — Reference screenshot base64 →
openai_edit_imagewith style instructions. - A/B variants —
openai_image_variationon approved hero image → human_task picks winner. - Report illustrations — Workflow data → LLM prompt → image embedded in PDF via Browserless.
Tools
| Tool | Description |
|---|---|
openai_text_to_image | Generate images from a text prompt (gpt-image-1, DALL-E 3, DALL-E 2) |
openai_edit_image | Edit an image with a prompt; optional mask for inpainting |
openai_image_variation | Create variations of a source PNG (DALL-E 2 only) |
Example
Generate a social image from an LLM-crafted prompt:Configuration
| Key | Required | Description |
|---|---|---|
APIKey | Yes | OpenAI API key |
DefaultModel | No | Default model when tools omit model |
APIBase | No | OpenAI API base URL |
Troubleshooting
| Issue | Fix |
|---|---|
| Content policy rejection | Revise prompt; avoid disallowed content per OpenAI usage policies |
| Model not available | Confirm account access to gpt-image-1 or dall-e-3; fall back to dall-e-2 |
| Variation fails | Variations require DALL-E 2 and a square PNG under size limits |
| Large payloads | Images return as base64; store externally rather than passing through many workflow steps |
Related
- Integrations quickstart
- Gemini Images connector — Google image generation
- Connector catalog
- Troubleshooting