Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#3,256 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Oxygen56 がすでに取り組んでいます。

2026年6月5日 から。

  • #3259 @JiwaniZakir による — マージされずにクローズ
  • #3373 @Oxygen56 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
api

調査の方向性

client.images.edit() から始め、issue の image_url の例を使って 400 エラーを再現します。ライブラリのリクエスト処理を、参照されている /images/edits のドキュメントと比較し、結果として生じる動作またはドキュメントが、サポートされている入力形式と明確に一致していることを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug
Confirm this is an issue with the Python library and not an underlying OpenAI API
  • This is an issue with the Python library
Describe the bug

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

As indicated in following doc, /images/edits supports image_url as input (JSON).
But when passing url to client.images.edit(), rather than file object, API throws 400 error.

I am afraid /images/edits doesn't support image_url as image input. Doc is wrong.

https://developers.openai.com/api/reference/resources/images/methods/edit#(resource)%20images%20%3E%20(method)%20edit%20%3E%20(params)%200.non_streaming%20%3E%20(param)%20images%20%3E%20(schema)

To Reproduce

result = client.images.edit(
model="gpt-image-1.5",
images={
image_url: "https://yavuzceliker.github.io/sample-images/image-1021.jpg"},
prompt=prompt
)

Code snippets

OS

Windows 11

Python version

v3.11.4

Library version

2.26.0

主要言語
Python
スター
31.8k
フォーク
7.3k
平均マージ
1日 1時間
マージ済み PR(30日)
137

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openai/openai-python のほかの issue

openai/openai-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。