This commit is contained in:
Timothy Jaeryang Baek
2026-02-22 18:55:24 -06:00
parent d9fd2a3f30
commit f6bd54fb1f

View File

@@ -641,7 +641,10 @@ async def image_generations(
for image in res["data"]:
if image_url := image.get("url", None):
image_data, content_type = get_image_data(image_url, headers)
image_data, content_type = get_image_data(
image_url,
{k: v for k, v in headers.items() if k != "Content-Type"},
)
else:
image_data, content_type = get_image_data(image["b64_json"])
@@ -993,7 +996,10 @@ async def image_edits(
images = []
for image in res["data"]:
if image_url := image.get("url", None):
image_data, content_type = get_image_data(image_url, headers)
image_data, content_type = get_image_data(
image_url,
{k: v for k, v in headers.items() if k != "Content-Type"},
)
else:
image_data, content_type = get_image_data(image["b64_json"])