Back to Guides

Give your Claude image generation

beginnertechnicaltools

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

  1. Go to openai.com
  2. Click Sign Up (or Log In if you already have a ChatGPT account)
  3. Complete the sign-up process with your email

Step 2: Add Payment Method

  1. Once logged in, click on your profile icon (top right)
  2. Select Billing
  3. Click Add payment method
  4. Add your card details
  5. Add some credit (£5-10 is plenty to start—this will generate 25-50+ images)

Step 3: Create Your API Key

  1. In the left sidebar, click API Keys
  2. Click + Create new secret key
  3. Give it a name like "Zapier Image Gen"
  4. Click Create secret key
  5. 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

  1. Go to com
  2. Sign up for a free account

Step 2: Create a New Zap

  1. Click + Create then Zaps
  2. You'll see a screen with a trigger and action to set up

Step 3: Set Up the Trigger (Webhook)

  1. For the trigger, search for Webhooks by Zapier
  2. Select Catch Hook
  3. Click Continue
  4. Zapier will give you a webhook URL—copy this!

It looks like: https://hooks.zapier.com/hooks/catch/12345/abcde/

  1. 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"}

  1. Once they've sent it, click Test trigger in Zapier
  2. You should see the test data appear with a "prompt" field

Step 5: Add the OpenAI Action

  1. Click the + to add an action
  2. Search for OpenAI
  3. Select Generate Image
  4. Connect your OpenAI account using the API key you saved earlier
  5. For the Prompt field, click into it and select prompt from the webhook data
  6. Click Continue and Test step
  7. Wait for it to generate a test image (takes a few seconds)

Google Drive Option

Step 6 (Drive Version): Add the Google Drive Action

  1. Click + to add another action
  2. Search for Google Drive
  3. Select Upload File
  4. Connect your Google account
  5. For Drive, select My Google Drive
  6. For Folder, choose where you want images saved (or create a folder called "AI Images")
  7. For File, click into it and select Data URL from the OpenAI step
  8. For File Name, you can use the prompt or just leave it (Zapier will auto-name it)
  9. 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

  1. Click + to add another action
  2. Search for Discord
  3. Select Send Channel Message
  4. Connect your Discord account
  5. Select the Channel where you want images posted
  6. For Message Text, you can add the prompt or leave blank
  7. For File Attachment, click into it and select Data URL from the OpenAI step
  8. Click Test step—check your Discord channel!

Step 7: Publish Your Zap

  1. If the test image arrived in your Telegram, click Publish
  2. 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!