Skip to content

fix: correct image_url parameter passing in images.edit()#3373

Open
Oxygen56 wants to merge 1 commit into
openai:mainfrom
Oxygen56:fix/images-edit-image-url-3256
Open

fix: correct image_url parameter passing in images.edit()#3373
Oxygen56 wants to merge 1 commit into
openai:mainfrom
Oxygen56:fix/images-edit-image-url-3256

Conversation

@Oxygen56
Copy link
Copy Markdown

@Oxygen56 Oxygen56 commented Jun 5, 2026

Fixes image_url not being passed as image input parameter.

Fixes #3256

The image_url parameter was not being correctly passed as the
image input to the API endpoint.

Fixes openai#3256
@Oxygen56 Oxygen56 requested a review from a team as a code owner June 5, 2026 18:20
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d08d22e59

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

body = deepcopy_with_paths(
{
"image": image,
"image_url": image_url,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Send URL edits as JSON image references

For client.images.edit(image_url=...), this line adds a top-level image_url to the same body that is later forced through multipart/form-data (the file extraction still only knows about image/mask). The URL/file-id edit shape is a JSON request with an images array of reference objects, not a multipart form field named image_url, so the new image-url-only path still reaches /images/edits without a valid input image. Please serialize URL references through the JSON images=[{"image_url": ...}] shape (and avoid forcing multipart for that path) or keep requiring uploaded image until that shape is implemented.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client.images.edit() method failed to pass image_url as image input

1 participant