docs/self-hosting/faq/vercel-ai-image-timeout.mdx
When using AI image generation models (such as gpt-image-1) on Vercel, you may encounter timeout errors. This occurs because AI image generation typically requires more than 1 minute to complete, which exceeds Vercel's default function execution time limit.
Common error symptoms include:
In your Vercel function logs, you may see entries like this:
JUL 16 18:39:09.51 POST 504 /trpc/async/image.createImage
Provider runtime map found for provider: openai
The key indicators are:
504 (Gateway Timeout)/trpc/async/image.createImage or similar image generation endpointsFor projects created before Vercel's dashboard update, you can resolve this issue by enabling Fluid Compute, which extends the maximum execution duration to 300 seconds.
For more information about Vercel's function limitations and Fluid Compute: