Skip to main content
The openaiimage MCP adapter connects to the OpenAI Images API. Generate images from text prompts, edit existing images with instructions, and create variations — returning base64-encoded assets for downstream storage, email, or social publishing.

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

1

Get an OpenAI API key

Create a key at platform.openai.com. Ensure your organization can use image models.
2

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.
3

Add openaiimage MCP instance

Go to MCP, click Add instance for openaiimage, wire your connection on Instance config, set the profile active, and save.
4

Generate a test image

Run mcp_callopenai_text_to_image with a short prompt to confirm billing and model access.
See Authentication for binding connections to MCP instances.

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_image with style instructions.
  • A/B variantsopenai_image_variation on approved hero image → human_task picks winner.
  • Report illustrations — Workflow data → LLM prompt → image embedded in PDF via Browserless.

Tools

Example

Generate a social image from an LLM-crafted prompt:

Configuration

Troubleshooting