Feature Request: Background Generation (Not Batch API)

I’m not sure if this may already be a feature but I couldn’t find anything like this in the API documentation for Gemini. I would like to setup my JavaScript web-app so that it can send a content generation request to my server in a fire and forget manner that allows it to poll the server for completion of that content generation without the caveat of a potential 24hr completion window (the content generation requests need a short turnaround which is why Batch API is not sufficient)

OpenAI’s responses API allows you to pass a `background: true` parameter which returns a response ID that can be used to retrieve content generation status and completed content (+ relevant metrics like token count) once the generation is complete. It’d be extremely helpful if Gemini’s API had this as well.

Perhaps this is a planned feature? Hoping for this to be coming soon as it would mean a great deal to my current project (as I’m sure it would for many other users)

1 Like

Hi @NexThought ,

Thank you for your feedback. We appreciate you taking the time to share your thoughts with us, and we’ll be filing a feature request.

1 Like

Hey! We are taking the first step towards this with the Interactions API which supports background=true like OpenAI does for agents: https://ai.google.dev/gemini-api/docs/interactions?ua=chat#agents

it is not exactly what you are looking for right now but we are moving in that direction!

1 Like

Oh man, it’s a huge relief to hear this is at least on the way. I’ll be keeping an eye out for when it drops; definitely will be implementing day one!

Thanks a ton for your response, it means a lot.

1 Like