# OpenAI 400 on image input: the URL must be fetchable and the format supported

## The symptom

`400` on a request with image input. Text-only requests with the same key succeed, so this is not auth.

## Confirm the cause

Check in order:

1. **URL reachability.** When you pass an image URL, OpenAI's servers fetch it. Private URLs fail: internal hostnames, expired signed URLs, pages behind login, hotlink protection. Test with curl from outside your network. If anonymous curl cannot fetch it, neither can OpenAI.
2. **Format.** Use standard formats (JPEG, PNG, WEBP, GIF). Corrupt or exotic files are rejected.
3. **The detail parameter.** Supported values depend on the model: `low`, `high`, `original`, or `auto`, defaulting to `auto` in both the Responses and Chat Completions APIs. A value your model does not support is a 400.
4. **Base64 correctness.** Inlined images must be well-formed base64 with the right media type. Truncated strings from bad copy-paste are a classic.
5. **Usage policies.** Image use must comply with usage policies; policy rejections surface as errors too.

## The fix

- Prefer base64-inlined images over URLs. It removes the fetchability question entirely.
- If you must use URLs: public HTTPS host, anonymous curl works, stable for the request lifetime.
- Set `detail` explicitly and identically across requests. Identical detail also matters for prompt caching of image inputs.

## Verify the fix

Send the same request with a tiny known-good public image and confirm 200, then swap in your real image. If the known-good works and yours does not, the difference is your image or its hosting, not your code.