Gemini Batch API image generation fails at 2K resolution but works fine at 1K

Hi everyone,

Has anyone managed to get batch image generation working at 2K (or 4K) resolution with gemini-3-pro-image-preview ?

I’m using a jsonl file ; at default 1K resolution, everything works perfectly. As soon as I set the output to 2K, every request in the batch fails with two errors:

  1. In the output predictions.jsonl:
    {“code”:3, “message”:“Request payload size exceeds the limit: 10485760 bytes.”}

  2. In the Vertex AI console (Batch Inference section):
    “System error. Please try this operation again.”

Setup:

  • SDK: @google/genai (TypeScript)
  • Input: JSONL uploaded to GCS, source images stored on GCS and referenced via URI
  • Model: gemini-image-3-pro via Vertex AI Batch Prediction
  • Only change between working and failing: adding the 2K resolution parameter

It seems like the batch pipeline that serializes the full model response (thinking + base64-encoded image) inline in the JSONL output doesn’t work with 2K images. I’ve found other similar reports (reddit).

To make things worse, the failed batches are still billed (several times more than what a successful batch is - seems like a silent retry being billed ?). Has anyone had the same issue ?

Is there a workaround ? Or is 2K/4K batch generation currently just not functional?

Thanks.

Hi @Thomas5 2K images exceed the 10 MB Vertex Batch JSONL payload limit due to base64 size, so the job fails - use lower resolution or switch to online generation and write outputs directly to GCS instead.

Ok thanks, so it’s not possible for now to do 2K/4K in batch mode to get the discount on pricing. Any idea on the failed batchs still being billed ?

About 50% of all 2K image requests I send in a batch fail due to this error, so it is possible to get 2K resolution, but I’m still trying to figure out the difference in the requests that fail and the one’s that don’t.

This meant it wasn’t as obvious to me it may have been the resolution at first, and I’ve been stung by the billing of these.

I’m currently building an Agentic AI system for semi-automated trading (1-click execution).

The system focuses on AI-driven market signal generation, on-chain execution, and human-in-the-loop risk controls rather than full automation.

I’m going through this tutorial to align with best practices around agent design, orchestration, and reliability.

If anyone here has experience with agentic AI, applied ML in trading systems, or production AI architectures, I’d be happy to exchange ideas or get feedback as the project evolves.

I stumbled upon the exact same issue. Unfortunately, the official docs don’t confirm or deny whether one can generate 2K or 4K images with the Batch API. I hope someone from Google can clarify it soon.

They’ve recently added the 1K limitation to their docs.