Skip to content

next-image template: Request Entity Too Large #561

@sragss

Description

@sragss

When I was working on templates/next-image I decided to make all inputs / outputs of the image models for the two edit endpoints and two generation endpoints base64 data URLs.

https://github.com/Merit-Systems/echo/tree/master/templates/next-image

Unfortunately we quickly exceed the datasize supported by either Next Client <-> Next Server or Next Server <-> gpt-image-1 / nano-banana.

Generation failed
HTTP 413: Request Entity Too Large FUNCTION_PAYLOAD_TOO_LARGE iad1::55kxp-1760452325185-1866997c3cd4

I believe we need to switch from base64 everywhere to hosted image URLS. I'm not sure if we can do this directly through the OpenAI / Gemini API or if we should rehost each image in a Vercel bucket and use those. Either way lots of plumbing needs to be adjusted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    $250MeritTag for Merit bounties.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions