OpenAI models support a “background” option which lets you trigger a request, then poll for a response. Even better, they also support web hooks to notify you when a response is ready. This is especially useful for image generation, or other long-running tasks where a request could be interrupted or you could hit a wall-time limit on cloud workers.
I know Gemini has a Batch API, but that’s really designed for bulk off-line workflows rather than in-line flows. Is there a way to achieve this with Gemini?