Multi-turn image generation returns false 404 with 2K/4K history

,

I am seeing a reproducible failure when chaining high-resolution image interactions using previous_interaction_id.

Environment

  • Gemini API, paid API key
  • @google/genai 2.15.0
  • Node.js 22
  • Primarily reproduced with gemini-3-pro-image

Reproduction

  1. Generate a 2K image.
  2. Chain a second 2K edit using the first interaction ID.
  3. Confirm the second interaction exists:
await ai.interactions.get(second.id);
// status: "completed"
  1. Chain a third 2K edit using second.id.

Actual result

404 Requested entity was not found

The interaction clearly exists, and the identical request succeeds when only image_size is changed from "2K" to "1K".

Observed pattern:

  • One fresh 2K interaction may become chainable after approximately 20 seconds.
  • A history containing two 2K images often fails persistently at 2K.
  • A single 4K interaction usually cannot be chained to another 2K/4K result.
  • The same interaction IDs remain retrievable and generally work for 1K output.

Expected

The documented 2K/4K chained request should succeed, or the API should return a descriptive capability/resource error rather than incorrectly reporting that the interaction was not found.

Current workaround

Retry briefly, then fall back to 1K or start a new interaction using a locally saved copy of the previous image.

Hi @Steve_Jones

Investigating this issue, will keep you updated