Support for image URLs in GPT-Image-1 API (request size limits in serverless environments)

Hi OpenAI team and fellow developers,

I’m currently integrating the gpt-image-1 model into a Unity game using Unity Cloud Code.
The goal is to generate merged images from multiple sources that players choose — each represented as a separate PNG image.

However, I’m running into a problem:
Unity Cloud Code has a hard request body size limit of 1 MB, and even after compressing and resizing images, it’s difficult to stay within that limit when uploading multiple reference images via multipart/form-data. As a result, I’m unable to submit multiple input images to the OpenAI API from this environment without hitting a 413 Request Entity Too Large error.

My question is:

  • Is there any way to provide external image_urls as references (instead of uploading raw image data)?
  • If not currently supported, is this functionality something that’s being considered for the gpt-image-1 model in the future?

This would be incredibly useful in serverless or constrained environments like Unity Cloud Code, where file uploads are tightly restricted.

Thanks for any insights or workarounds the team or community can provide!

Best regards,
Matthias

2 Likes

Welcome to the community, @Bliggfang !

Good to have some more gamedev people here!

I’ve not heard about using URLs for the new gpt-image-1 input… Have you tried using jpg instead?

Following the thread to see if someone smarter has any ideas.

Hope you stick around. We’ve got a great community growing here and could always use more savvy devs.

1 Like

Thanks so much for the warm welcome – really appreciate it! :blush:
Great to see such a helpful and active dev community here.

Yes, I’ve now started switching to JPGs with higher compression and it seems to keep things within acceptable limits (especially when dealing with Cloud Code constraints and egress considerations).

That said, direct support for image URLs as references would still be a fantastic addition — especially for serverless workflows where sending binary payloads can be tricky.

Looking forward to learning more from this community and happy to be part of it!

1 Like