Agent Completion attachments: 16 full-size images fit the 500 MB cap
An Agent Completion takes up to 30 images, each up to 30 MB, in a set up to 500 MB. At full size only 16 fit; for 30 images the average must be under 16.7 MB.

Sixteen full-size images fit in one Agent Completion; a seventeenth does not. The docs allow up to 30 images per request, 30 MB per image, and 500 MB for the whole set. At 30 MB each, 16 images total 480 MB and 17 would be 510 MB, which is over the limit. To send all 30, the images must average no more than about 16.7 MB (500 divided by 30).
The error you get is 413 attachment_too_large, for either an image over 30 MB or a set over 500 MB. A failed fetch of the image is a different code, 502 attachment_fetch_failed, and a bad item is 400 invalid_attachment.
The limits, side by side
From the Agent Completions page, read 2026-10-09.
| Limit | Value | Error if exceeded |
|---|---|---|
| Images per request | 30 | Not stated on the page (bad items are 400 invalid_attachment) |
| Size per image | 30 MB | 413 attachment_too_large |
| Total set | 500 MB | 413 attachment_too_large |
| Accepted types | input_image only | 400 invalid_attachment |
| Unreachable source | Host down, hotlink protection, non-2xx | 502 attachment_fetch_failed |
The arithmetic for packing a set
Work from the total budget, not from the per-image maximum.
- Maximum count at 30 MB each: floor(500 / 30) = 16 images, 480 MB used.
- Maximum average for 30 images: 500 / 30 = 16.67 MB.
- Mixed set: 10 images at 30 MB (300 MB) leaves 200 MB for the other 20, or 10 MB each.
- Phone photos at 4 MB each: 30 images is 120 MB, well inside the cap.
Send URLs or asset ids, and keep it HTTPS
Each item carries either an image_url that is HTTPS or an asset_id from your workspace, never both. A non-HTTPS URL is a 400 invalid_attachment, and an unknown asset_id is 400 attachment_not_found. Sume merges attachments sent at the top level with input_image parts inside messages[] into one list, so count both when you budget.
A turn with only images is allowed: if you omit the text part, Sume tells the agent to use the attached files. And as always, generation_spend_cap_usd is required on the request, so the call fails with 400 invalid_request if you forget it, regardless of how small the images are.
Checking before you send
Sum the byte sizes on your side with a HEAD request or from your own storage metadata before building the request. If the total is over 500 MB, split the work into two completions rather than recompressing everything, and give each its own generation_spend_cap_usd so the two caps add up to the budget you intended. Because every completion starts a new thread, the second run will not remember the first; put any shared context in the instruction text or in the input object.
Sources
Related posts
More in Agents
- Agent Completion cap for ten Nano Banana 2.1 images at 2K: $1.50
Ten 2K Nano Banana 2.1 images cost $1.50 on Sume. Size generation_spend_cap_usd at $2 for headroom; 4K needs the whole $2.00. Table and curl.
- Agent Completion cap for three Wan 3.0 720p clips: $3.75 at 10 s
Three 10-second Wan 3.0 clips cost $1.875 at 480p, $3.75 at 720p and $7.50 at 1080p. How to pick generation_spend_cap_usd for each.
- Agent Completions rejects assistant turns: how to carry chat history
Sume Agent Completions return 400 on any assistant message in messages[] and start a fresh thread each time. Here is what that means for multi-turn history.
- Agent run log allowlist: which Sume fields are safe to keep
Log request ids, job ids, status and sanitized media metadata from Sume agent runs; never log API keys, signed URLs, raw private media URLs or full transcripts.
Written by Sume