# 400 on image inputs: count blocks, then resize

## Symptom
400 `invalid_request_error` on a request containing images. The message references "many-image requests" and states the current pixel limit.

## Confirm the cause
Count image blocks: all `image` blocks in the request count, including images from earlier turns you resend and images nested inside `tool_result` content (screenshots to the computer use tool), plus PDF document blocks on Bedrock and Google Cloud. Above 20, a stricter per-image dimension limit applies to every image. Separately, only JPEG, PNG, GIF, and WebP are accepted (10 MB base64 max on the direct API), and oversized images in `tool_result` are rejected with a validation error rather than downscaled like ordinary image blocks.

## Fix
1. Resize every image so neither dimension exceeds 2000 px, or keep the request to 20 or fewer image and document blocks.
2. Resize screenshots in your application before returning them in `tool_result`; the API will not do it for you.
3. Prefer the Files API `file_id` reference for repeated images instead of resending base64.

## Verify
The same request with resized images returns 200. The error message states the pixel limit, so confirm your largest image is under it.