What You'll Set Up
By the end of this guide, your AI agent will be able to generate images from text descriptions using OpenAI's image models. It can create product visuals, marketing graphics, concept art, and more — all from a simple conversation. Just describe what you want, and your agent produces the image.
This integration is perfect for teams that need quick visual content without waiting on a designer. Whether it's a social media graphic, a blog header, or a mockup to share with your team, your agent can generate it in seconds.
Before You Begin
Make sure you have:
- An OpenAI account with API access — Sign up at platform.openai.com if you don't have one
- API credits on your OpenAI account — Image generation uses your OpenAI API balance
- A Pipeworks workspace — Sign up at pipeworks.ai if you haven't already
OpenAI charges per image generated. Pricing varies by model and image size. Check the OpenAI pricing page for current rates. You can set spending limits in your OpenAI account to control costs.
Steps
Get your OpenAI API key
Go to platform.openai.com and sign in. Click on your profile icon in the top-right corner and select API Keys (or go directly to platform.openai.com/api-keys).
Click Create new secret key. Give it a name like "Pipeworks" and click Create. Copy the key immediately — OpenAI only shows it once. It starts with sk-.
Open your Pipeworks console
Log into your Pipeworks workspace and go to the Integrations page. Find OpenAI Image Generation in the list and click on it.
Enter your credentials
Paste your OpenAI API key into the API Key field and click Connect.
Pipeworks encrypts your key with AES-256-GCM before storing it. The plaintext key is never saved to disk and is only decrypted when your integration container starts.
Start the integration
Click Start to launch the OpenAI Image Generation integration container. This takes a few seconds. Once the status shows Running, your agent is ready to create images.
Test the connection
Use the Test button in your Pipeworks console to verify the connection. This sends a simple API call to OpenAI to confirm your key is valid and has the necessary permissions.
What Your Agent Can Do
Once connected, your AI agent has access to image generation tools for:
- Generate images from text — Describe any image in plain language and get a high-quality result
- Edit existing images — Modify parts of an image based on your instructions
- Multiple sizes — Generate images in different dimensions to fit your needs
- Batch creation — Generate several variations of an image to choose from
Be specific in your image descriptions for the best results. Instead of "a logo," try "a minimalist logo for a coffee shop with a steaming cup, using earth tones on a white background." The more detail you provide, the closer the result will be to what you envision.
Connecting from Your AI Agent
Add the Pipeworks tools endpoint to your agent's configuration. Here's an example for Claude Desktop:
{
"mcpServers": {
"pipeworks-openai-image-gen": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.pipeworks.ai/tools/openai-image-gen"]
}
}
}
Claude Desktop will prompt you to sign in through Pipeworks when you first connect. No access key needed.
Troubleshooting
Connection test fails? Make sure your API key starts with sk- and that you copied it in full. OpenAI keys are long — a partial paste is a common mistake.
"Insufficient quota" errors? Your OpenAI account needs API credits to generate images. Go to platform.openai.com/account/billing to check your balance and add credits if needed.
Container won't start? Make sure your integration is enabled. An admin needs to assign the OpenAI Image Generation integration to your workspace first.
Agent can't find tools? Verify your Pipeworks session is authenticated and that the integration status shows "Running" in your Pipeworks console.