Format run 400 on an empty body: what a create request must include

A Format run create must name instruction, input, previous_run_id or attachments. An empty object or an empty input object is a 400 invalid_request.

4 min readSume
All posts

A Sume Format run create request has to say what to run: at least one of instruction, input, previous_run_id or attachments. A body of {} and a body of {"input":{}} both come back as 400 invalid_request, and nothing is queued or charged.

This is a fix-the-request error, so a retry loop will never clear it. Validate the body before the call.

What counts as content

The rules come from the Create a run page (read 2026-10-03).

Format run create bodies and their outcome (read 2026-10-03)
BodyOutcome
{}400 invalid_request
{"input":{}}400 invalid_request
{"instruction":"Make a 15 second teaser"}Accepted
{"input":{"sku":"A-12"}}Accepted
{"previous_run_id":"..."} on a resumable runAccepted
{"webook_url":"https://..."}400 unknown_parameter, with a suggestion for webhook_url

Limits that sit next to it

Once the body has content, the size rules apply. The whole request body is capped at 4 MiB (413 above that). input must be a JSON object with at most 64 top-level keys and 2 MiB. instruction accepts 8000 characters, though about 4000 are carried into the run, so keep the real request in the first part. Attachments go up to 30 files, with a lower cap for video and audio than for images.

Sending both output_schema and response_format is also a 400, as is a field the API does not know.

import json, os, urllib.request

body = {"instruction": "Cut a 15 second teaser"}
if not any(body.get(k) for k in ("instruction", "input", "previous_run_id", "attachments")):
    raise SystemExit("empty Format body")
req = urllib.request.Request(
    "https://api.sume.com/v1/formats/acme/teaser/runs",
    data=json.dumps(body).encode(),
    headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
             "Content-Type": "application/json"},
)
print(json.load(urllib.request.urlopen(req))["data"]["id"])

Where it usually comes from

Templating bugs produce most empty bodies: a form with no fields filled yields {"input":{}}. Reject it in your own code with a clear message, and read the typo suggestion when the 400 names an unknown field instead.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume