Give your Claude image generation
What You're Building By the end of this guide, your AI companion will be able to generate images and send them directly to your Discord/google Drive. No extra apps needed. How it works: Your AI sends a request → Zapier catches it → OpenAI creates the image → It lands in your Discord/google Drive.
What You Need Before Starting
- A connected discord via MCP or Google Drive
- A Zapier account (free tier works)
- An OpenAI API account (pay-as-you-go, roughly $0.15-0.20 per image)
- About 20-30 minutes
Part 1: Setting Up Your OpenAI API Key
This is what lets you pay per image instead of needing a ChatGPT subscription.
Step 1: Create an OpenAI Account
- Go to openai.com
- Click Sign Up (or Log In if you already have a ChatGPT account)
- Complete the sign-up process with your email
Step 2: Add Payment Method
- Once logged in, click on your profile icon (top right)
- Select Billing
- Click Add payment method
- Add your card details
- Add some credit (£5-10 is plenty to start—this will generate 25-50+ images)
Step 3: Create Your API Key
- In the left sidebar, click API Keys
- Click + Create new secret key
- Give it a name like "Zapier Image Gen"
- Click Create secret key
- IMPORTANT: Copy this key and save it somewhere safe. You won't be able to see it again!
Your API key looks like: sk-proj-aBcDeFgHiJkLmNoPqRsTuVwXyZ...
Part 2: Setting Up Zapier
Zapier is the glue that connects everything together.
Step 1: Create Your Zapier Account
- Go to com
- Sign up for a free account
Step 2: Create a New Zap
- Click + Create then Zaps
- You'll see a screen with a trigger and action to set up
Step 3: Set Up the Trigger (Webhook)
- For the trigger, search for Webhooks by Zapier
- Select Catch Hook
- Click Continue
- Zapier will give you a webhook URL—copy this!
It looks like: https://hooks.zapier.com/hooks/catch/12345/abcde/
- Keep this tab open—you'll need to test it in a moment
Step 4: Test the Webhook
Your AI companion needs to send a test request to the webhook so Zapier knows what data to expect. Ask your AI to send a test to your webhook URL. They'll send something like:
{"prompt": "A cozy room with warm lighting"}
- Once they've sent it, click Test trigger in Zapier
- You should see the test data appear with a "prompt" field
Step 5: Add the OpenAI Action
- Click the + to add an action
- Search for OpenAI
- Select Generate Image
- Connect your OpenAI account using the API key you saved earlier
- For the Prompt field, click into it and select prompt from the webhook data
- Click Continue and Test step
- Wait for it to generate a test image (takes a few seconds)
Google Drive Option
Step 6 (Drive Version): Add the Google Drive Action
- Click + to add another action
- Search for Google Drive
- Select Upload File
- Connect your Google account
- For Drive, select My Google Drive
- For Folder, choose where you want images saved (or create a folder called "AI Images")
- For File, click into it and select Data URL from the OpenAI step
- For File Name, you can use the prompt or just leave it (Zapier will auto-name it)
- Click Test step—check your Google Drive folder!
Tip: If your AI has Google Drive access, they can then view and share the generated images directly from your Drive.
Alternative: Discord Bot option
Prefer Discord? You can send images to a Discord channel instead.
Follow Parts 1-3 exactly the same, but replace Step 6 with this:
Step 6 (Discord Version): Add the Discord Action
- Click + to add another action
- Search for Discord
- Select Send Channel Message
- Connect your Discord account
- Select the Channel where you want images posted
- For Message Text, you can add the prompt or leave blank
- For File Attachment, click into it and select Data URL from the OpenAI step
- Click Test step—check your Discord channel!
Step 7: Publish Your Zap
- If the test image arrived in your Telegram, click Publish
- Give your Zap a name like "AI Image Gen to Telegram"
Part 4: Connecting It To Your AI
Now you need to give your AI the webhook URL so they can use it.
Share this information with your AI companion:
- Webhook URL: [your Zapier webhook URL]
- How to use: POST request with JSON body containing a "prompt" field
If your AI has a skills system or memory, save the webhook URL there so they always have access to it.
You're Done! 🎉
Your AI can now generate images and send them directly to your Telegram. Ask them to test it!
Troubleshooting
Image not arriving?
- Check your Zap is turned on (published)
OpenAI error?
- Make sure you have credit in your OpenAI account
- Check your API key is correct
Zapier not triggering?
- Make sure the webhook URL is exactly right (no extra spaces)
- Check your Zap history in Zapier to see if requests are coming through
Cost Breakdown
- Zapier: Free tier includes 100 tasks/month
- OpenAI: ~$0.15-0.20 per image with GPT Image 1.5
- Telegram: Free
So £5-10 of OpenAI credit will get you 25-50+ images. Not bad!