Format run media budget: 30 files, 10 videos, 10 audio for a lookbook
A Sume Format run shares one attachment budget: 30 files, 30 images, 10 videos, 10 audio. Plan a lookbook run so it stays under invalid_attachment.

A Format run on Sume accepts up to 30 image attachments, and any media URLs you put inside input share one budget: 30 files in total, at most 30 images, 10 videos and 10 audio files. Go over and the create call fails with 400 invalid_attachment, with nothing run and nothing charged. For a lookbook, plan the count before you build the request.
A lookbook is where the limit bites. A shopper's saved items, a model photo, a reference clip and a track add up fast. ChatGPT's new Favorites feature saves items to the Library with folders (read 2026-10-03, OpenAI release notes), which makes a folder of 20 to 40 items an obvious thing to turn into a video. Your own version has to fit inside the budget.
The limits
These are from the Formats call and attachments docs. Image attachments are JPEG, PNG, WebP, GIF or AVIF, up to 30 MB each and 500 MB per run. Related errors are attachment_too_large as 413 and attachment_fetch_failed as 502, which mean a file is too big or a URL could not be fetched.
| Limit | Value | What happens over |
|---|---|---|
| Image attachments | Up to 30 | 400 invalid_attachment |
Media files in attachments plus input URLs | 30 in total | 400 invalid_attachment |
| Videos | At most 10 | 400 invalid_attachment |
| Audio files | At most 10 | 400 invalid_attachment |
| File size | 30 MB each, 500 MB per run | 413 attachment_too_large |
| Unreachable URL | Public HTTPS required | 502 attachment_fetch_failed |
Planning a lookbook within the budget
Count before you send. If a saved folder has 40 items, choose 20 to 25 and leave room for the model photo and anything else. Prefer item shots over screenshots with a lot of surrounding page, because every image uses one slot whether it is a clean packshot or a noisy page.
Split a large lookbook into several runs and join them in a second step, using previous_run_id to continue a thread when the context should carry over. A continuation is a new run with its own spend cap and receipt, and artifacts[] on the continued run lists everything the conversation generated. The previous_run_id errors post covers what to do when a continuation is refused.
import os, requests
def lookbook_run(item_urls, model_url, key):
# 1 model photo + up to 24 items keeps us well under 30 files
items = item_urls[:24]
atts = [{"type": "input_image", "image_url": u} for u in [model_url, *items]]
r = requests.post(
"https://api.sume.com/v1/formats/sume/sume-virtual-fitting/runs",
headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}",
"Idempotency-Key": key},
json={"instruction": "Image 1 is the model. Build a short lookbook from the items.",
"attachments": atts, "generation_spend_cap_usd": 40},
timeout=60)
return r.status_code, r.json()What to do when it fails
invalid_attachment is a count problem, so reduce and resend with the same Idempotency-Key: a create that failed releases the key. attachment_too_large means resize the image on your side; keep each file under 30 MB. attachment_fetch_failed means the URL could not be fetched, usually because it is not public HTTPS or it has expired; the image-not-fetchable post covers the same cause on the Image API.
Keep the instruction short and put the important parts first, because only about the first 4000 of its 8000 characters are carried. Say which attachment is which by position. The attachments post has the image-only limits, and the virtual fitting comparison helps choose a Format for apparel.
A pre-flight counter
The cheapest protection is a counter in your own code that runs before the request. Count images, videos and audio files separately across attachments and every media URL inside input, and refuse to send when any limit is exceeded. A refusal on your side costs nothing and gives the shopper a message you control, such as asking them to remove a few items, instead of a generic API error.
Log the counts with the run id when a run is created. If a catalogue run later behaves oddly, the log shows how close to the budget it was. Runs near the limit are also the ones most likely to hit file size trouble, since 30 images of 20 MB each already reach 600 MB, over the 500 MB per run cap. Resize large originals to a sensible size before you attach them.
Sources
Related posts
More in Formats
- Format run media URLs are public: copy on webhook or proxy
Sume Format run media lives at durable public media.sume.com URLs. If customer A must not see customer B's video, copy it at receipt time or proxy it.
- Format run `model` picks the orchestrator, not the video model
A new image or video model launches and you set model on a Sume Format run. That field picks the orchestrating LLM only; media models come from Format tools.
- Format run spend cap: above the Format cap is honored, null is $500
generation_spend_cap_usd on a Sume Format run may exceed the Format's cap and is not clamped; null runs at the $500 maximum; 0 or over 500 is a 400.
- Format run spend: wait for usage.final before you quote a cost
On a Sume Format receipt, debited is the cost, held and refunded are not spend, and final turns true only once no hold is open.
Written by Sume