Responses API image upload error (worked before)

Hello,
As of this morning, i can not pass image_url to the responses api.
API calls that have been working before (passing publick image URLS) are thrwoing this error.
error message

BadRequestError: Error code: 400 - {'error': {'message': 'Failed to download file from https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg.', 'type': 'invalid_request_error', 'param': 'url', 'code': 'invalid_value'}}

The same error is happening when making custom n8n HTTP request (flow worked fine before)
Using python openai package (exact same code snipet shared in tutorial with image input)

code:

from openai import OpenAI
client = OpenAI()

response = client.responses.create(
    model="gpt-4.1",
    input=[
        {
            "role": "user",
            "content": [
                { "type": "input_text", "text": "what is in this image?" },
                {
                    "type": "input_image",
                    "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
                }
            ]
        }
    ]
)

print(response)

Notes:
urls are publicly avaivable
Tried with publick gdrive download link (link works with in incognito mode)
prior to that i already ran !pip install --upgrade openai
Can you please advise if:

  • There is a known issue with content input as image_url?
  • Any recent changes to API behavior regarding remote file fetching?
  • Additional debugging steps I can take?

Thank you!

4 Likes

We are experiencing the same issue when using the OpenAI package in a Node.js project.
The project had been working fine for about a month, but the problem started occurring today.

1 Like

Same for us unfortunately. Image links not working in Agents SDK (responses API) and I’ve verified they are also not working in the playground. New behaviour as of this morning

1 Like

Chat Completions: a happy endpoint

  • We only discover that o3-pro is pointlessly blocked on Chat Completions.

  • I got this nonsense out of Chat Completions with o3-mini with internet URL:

openai.BadRequestError: Error code: 400 - {'error': {'message': "Invalid image URL: 'messages[0].content[0].image_url.url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got a value without the 'data:' prefix.", 'type': 'invalid_request_error', 'param': 'messages[0].content[0].image_url.url', 'code': 'invalid_value'}}

The API is supposed to detect either an internet URL or a data URI in the string.

What should be returned is the same error reached by sending base64:

openai.BadRequestError: Error code: 400 - {'error': {'message': 'Invalid content type. image_url is only supported by certain models.', 'type': 'invalid_request_error', 'param': 'messages.[0].content.[1].type', 'code': None}}


Further requests got working responses with all models, by URL or by base64. This or the first post’s. So it is not some new rule of a site blocking OpenAI with robots.txt or blocking outright.

if you_have_a_URL:
    # Use a remote image URL for the test
    user_message = [
        {
            "role": "user",
            "content": [
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://avatars.githubusercontent.com/u/1?v=4"
                    },
                },
                {"type": "text", "text": "describe the content of images"},
            ],
        }
    ]
--- Testing Model: o3-2025-04-16 ---
  Input Tokens: 236
  Response: The image is a well-lit portrait set against a dark, neutral background:  • A ma
  [elapsed: 6.1 seconds]
--- Testing Model: o4-mini-2025-04-16 ---
  Input Tokens: 399
  Response: The image is a close-up studio portrait of an adult man. He has short, wavy brow
  [elapsed: 3.0 seconds]
--- Testing Model: gpt-4.1-2025-04-14 ---
  Input Tokens: 267
  Response: The image shows a man with short, curly brown hair and light facial hair. He is 
  [elapsed: 2.8 seconds]
--- Testing Model: gpt-4.1-mini-2025-04-14 ---
  Input Tokens: 378
  Response: The image shows a man with short, curly brown hair and light facial hair. He has
  [elapsed: 1.5 seconds]
--- Testing Model: gpt-4.1-nano-2025-04-14 ---
  Input Tokens: 567
  Response: This is a portrait photograph of a man with short, curly dark hair and a light b
  [elapsed: 5.5 seconds]
--- Testing Model: gpt-4.5-preview-2025-02-27 ---
  Input Tokens: 267
  Response: The image shows a portrait of a man with short, curly brown hair and a slight be
  [elapsed: 5.5 seconds]
--- Testing Model: o1-2024-12-17 ---
  Input Tokens: 236
  Response: The image shows a man facing the camera against a dark background. He appears to
  [elapsed: 8.6 seconds]
--- Testing Model: gpt-4o-2024-11-20 ---
  Input Tokens: 267
  Response: The image shows a man with short, curly dark hair and a beard. He is wearing a d
  [elapsed: 1.8 seconds]
--- Testing Model: gpt-4o-2024-08-06 ---
  Input Tokens: 267
  Response: The image shows a man with short, curly hair and a beard. He is wearing a dark t
  [elapsed: 2.7 seconds]
--- Testing Model: gpt-4o-mini-2024-07-18 ---
  Input Tokens: 8512
  Response: The image features a man with short, curly hair and a light beard, smiling at th
  [elapsed: 2.1 seconds]
--- Testing Model: gpt-4o-2024-05-13 ---
  Input Tokens: 267
  Response: The image shows a man with short, curly dark hair and a light beard. He is weari
  [elapsed: 1.6 seconds]
--- Testing Model: gpt-4-turbo-2024-04-09 ---
  Input Tokens: 267
  Response: The image shows a close-up portrait of a man with a friendly expression. He has 
  [elapsed: 6.2 seconds]
--- All tests complete. ---

Responses, “works for me”…

I produced a similar script using Responses and the internet URL, all successful just now.

--- Testing Model: o3-pro-2025-06-10 ---
  Input Tokens: 266
  Response: The image shows a head-and-shoulders portrait of an adult man with short, curly 
  [elapsed: 23.9 seconds]
--- Testing Model: o3-2025-04-16 ---
  Input Tokens: 236
  Response: The image shows a man with short, curly brown hair and light facial stubble. He 
  [elapsed: 8.3 seconds]
--- Testing Model: o4-mini-2025-04-16 ---
  Input Tokens: 399
  Response: The image is a tightly framed head-and-shoulders portrait of an adult man agains
  [elapsed: 8.1 seconds]
--- Testing Model: gpt-4.1-2025-04-14 ---
  Input Tokens: 267
  Response: The image shows a man with short, curly brown hair and light skin. He has green 
  [elapsed: 2.9 seconds]
--- Testing Model: gpt-4.1-mini-2025-04-14 ---
  Input Tokens: 378
  Response: The image shows a man with short, curly brown hair and light facial hair. He is 
  [elapsed: 3.8 seconds]
--- Testing Model: gpt-4.1-nano-2025-04-14 ---
  Input Tokens: 567
  Response: The image features a man with short, curly dark hair and a light beard. He is sm
  [elapsed: 1.6 seconds]
--- Testing Model: gpt-4.5-preview-2025-02-27 ---
  Input Tokens: 267
  Response: The image is a portrait of a man with short, curly brown hair and a slight beard
  [elapsed: 7.6 seconds]
--- Testing Model: o1-2024-12-17 ---
  Input Tokens: 44
  Response: It appears to be a portrait-style photo of an adult male viewed from the shoulde
  [elapsed: 12.3 seconds]
--- Testing Model: gpt-4o-2024-11-20 ---
  Input Tokens: 267
  Response: The image shows a man with short, curly dark hair and a beard, wearing a dark-co
  [elapsed: 2.4 seconds]
--- Testing Model: gpt-4o-2024-08-06 ---
  Input Tokens: 267
  Response: The image shows a person with short, curly hair and a beard, wearing a dark t-sh
  [elapsed: 2.2 seconds]
--- Testing Model: gpt-4o-mini-2024-07-18 ---
  Input Tokens: 8512
  Response: The image features a man with short, curly hair and a light beard, smiling at th
  [elapsed: 2.4 seconds]
--- Testing Model: gpt-4o-2024-05-13 ---
  Input Tokens: 267
  Response: The image is a portrait of a man with short, curly dark hair and a light beard. 
  [elapsed: 2.7 seconds]
--- Testing Model: gpt-4-turbo-2024-04-09 ---
  Input Tokens: 267
  Response: The image shows a close-up portrait of a Caucasian man with a friendly expressio
  [elapsed: 9.6 seconds]
--- All tests complete. ---

Issue with the first post’s Image URL

Try this for the same picture:

https://upload.wikimedia.org/wikipedia/commons/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg

NOT:

"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"

Then success…

--- Testing Model: o3-pro-2025-06-10 ---
  Input Tokens: 1116
  Response: The image shows a tranquil, wide-open landscape on a bright, sunny day. A narrow
  [elapsed: 56.6 seconds]
--- Testing Model: o3-2025-04-16 ---
  Input Tokens: 986
  Response: The image shows a straight wooden boardwalk running through a lush, green meadow
  [elapsed: 6.4 seconds]

Something about the API doesn’t like the first post’s URL, the one from the API Reference example, ERROR: Error code: 400 - {'error': {'message': 'Failed to download file from https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg.', 'type': 'invalid_request_error', 'param': 'url', 'code': 'invalid_value'}}

I thought I’d test what it might be that is particular about that image.

Does the API fail if there are two extensions in the path?

https://hotnova.com/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/Gfp-wisconsin-madison-the-nature-boardwalk.jpg

Nope. That works okay. Maybe it is the depth of the image path.

I’m having the same issue since this morning about 5 am UTC.
We use Google Firebase storage and cloud functions (Node.JS) with o4-mini-high for image analysis.

Sorry for the issues here. @stevecoffey is fixing this now!

2 Likes

Hey all! Thanks so much for reporting. We pushed a fix for this earlier today. Let me know if things are looking better.

This URL would fail on 10 different models within seconds. So not spitting out a console of errors is a success!

Ranked, letting models “describe contents” (disregarding o3-pro’s looking and slowing things down by nearly a minute)

gpt-4.1-nano-2025-04-14: 3.7 seconds
gpt-4o-2024-11-20: 4.0 seconds
gpt-4o-mini-2024-07-18: 4.0 seconds
gpt-4o-2024-05-13: 4.0 seconds
gpt-4o-2024-08-06: 4.3 seconds
gpt-4.1-mini-2025-04-14: 4.3 seconds
gpt-4.1-2025-04-14: 5.8 seconds
gpt-4-turbo-2024-04-09: 7.2 seconds
o3-2025-04-16: 7.4 seconds
o4-mini-2025-04-16: 7.4 seconds
gpt-4.5-preview-2025-02-27: 7.8 seconds
o1-2024-12-17: 15.4 seconds

So back on track.

I posted this in another topic, but it may be related. When editing an existing image using the responses API and referring to it as image_url (base64 encoded) in the background mode, polling the status always returns “in-progress” as response and never completes. If I am generating an image from a prompt, then the background mode does complete and works as expected. In my OpenAI logs I can see that the image to be edited is uploaded, but an output is never generated. I am using Base64 encoding in the responses API. I also tried uploading a file and using its fileId and in that case I immediately get a “Failed” response from the API.

I’m experiencing the exact same issue.

I’ve been using Facebook image URLs that come from the Facebook Graph API, such as:

These images are publicly accessible and were working perfectly with OpenAI’s Vision API — even as recently as June 2025.

However, as of July 4, 2025, I started getting a 400 invalid_image_url error from the API.

I haven’t changed anything in my implementation, so this seems like a sudden backend issue on OpenAI’s side. Would appreciate any insights or updates from the team.

1 Like