OpenAI Vision API - HTTP 400 Error: "Error while downloading" - Dynamic URL issue

Hi everyone,

I’m stuck with a HTTP 400 error while using OpenAI GPT-4o-mini Vision via the API Connector.

The Issue: The API returns: "message": "Error while downloading" and "code": "invalid_image_url".

The strange part: 1. If I copy the dynamic URL generated by Bubble and paste it manually into the API Connector as a static value, it works perfectly. [cite: 2025-12-06] 2. When the workflow runs dynamically, it fails with the 400 error.

What I’ve checked:

  • Privacy rules: The image is publicly visible.

  • URL format: I’m adding https: before the Bubble URL.

  • The URL looks like this in the error log: //99cb1f174a18a0cf...cdn.bubble.io/...

It seems like OpenAI has trouble “fetching” the image from the dynamic link even though the link is valid. Has anyone faced this “Error while downloading” specifically with Bubble’s AWS/CDN storage?

Thanks for your help!

Check if the dynamic url starts with ‘https:‘. I faced a similar issue and i had to append the ‘https:‘ to the dynamic url.

This is a Bubble quirk more than an OpenAI issue. When you pass the image dynamically, Bubble often outputs a protocol-relative URL like //cdn.bubble.io/``.... Browsers handle that fine, but OpenAI doesn’t, so it throws the “invalid_image_url / error while downloading” error.

That’s why it works when you paste the URL manually with https://, but fails in the workflow. The fix is to force Bubble to send a full absolute URL as text. Take the image’s URL, format it as text, and prepend https: so OpenAI always receives https://cdn.bubble.io/``....

Also double-check the file is truly public, since short-lived or signed URLs can cause the same error. Once you pass a clean HTTPS URL, it should work consistently.