Your URL does not seem complete. That is likely because you did not put your JSON into a forum “preformatted text”.
You can edit your post, select the entirety of your object, and then press the format bar </> button, and save again to show us your actual request body.
Here’s making your request with Python, the openai library module, and a local file img1.png:
import base64,openai;from pathlib import Path
e=lambda p:[{"type":"image_url","image_url":{"url":(
f"data:image/{Path(f).suffix[1:]};base64,"
f"{base64.b64encode(Path(f).read_bytes()).decode()}"),"detail":"low"}}
for f in p];m="gpt-4.1"
p={"model":m,"messages":[{"role":"system","content":"Vision assistant"},
{"role":"user","content":[{"type":"text","text":"Describe image"},
*e(["img1.png"])]}],"max_completion_tokens":300}
print(openai.Client().chat.completions.create(**p).choices[0].message.content)
Just joking (although that works).
Here’s sending your body message with Python, httpx library, an internet URL for the image, and pretty-printing the return JSON:
""" Vision chat completions method demo
Note: OpenAI SDKs will automatically infer the following
client arguments from their corresponding environment variables:
- `api_key` from `OPENAI_API_KEY`
- `organization` from `OPENAI_ORG_ID`
- `project` from `OPENAI_PROJECT_ID`
"""
import os, json, httpx
body = {
"model": "gpt-4.1",
"max_tokens": 300,
"top_p": 0.5,
"temperature": 0.5,
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "What’s in this image, in 10 words?"},
{
"type": "image_url",
"image_url": {
"url": "https://live.staticflickr.com/7151/6760135001_58b1c5c5f0_b.jpg",
"detail": "low"
}
}
]
}
]
}
apikey = os.environ.get('OPENAI_API_KEY')
headers = {"Authorization": f"Bearer {apikey}"}
url = "https://api.openai.com/v1/chat/completions"
response = httpx.post(url, headers=headers, json=body)
if response.status_code != 200:
print(f"HTTP error {response.status_code}: {response.text}")
raise
else:
print(json.dumps(response.json(), indent=3))
You’ll get errors if you are trying to send that “messages” parameter to the Responses API, though. It takes "input", with different types.