List every run of a Sume Format in Python: the keyset cursor pager
GET /v1/formats/{handle}/{slug}/runs returns data, has_more and next_cursor. Pass next_cursor back until has_more is false; limit is 1 to 100.

To list all runs of one Format, call GET /v1/formats/{handle}/{slug}/runs with limit up to 100, and keep passing next_cursor as cursor until has_more is false. A Format that was never run returns an empty list, not an error.
The cursor is a keyset over created_at and id, so new runs arriving during a walk do not shift the pages the way an offset would.
The response shape
From the Runs and results page (read 2026-10-03).
| Item | Behavior |
|---|---|
| limit | 1 to 100 |
| cursor | The next_cursor from the previous page |
| Response | data (receipts), has_more, next_cursor |
| Invalid cursor | 400 |
| Format never run | Empty data list |
| Scope | formats:read |
A pager
Store the cursor only as an opaque string and never parse it. Each item in data is a run receipt, so you can read status and usage without a second call.
import json, os, urllib.parse, urllib.request
BASE = "https://api.sume.com/v1/formats/acme/teaser/runs"
KEY = os.environ["SUME_API_KEY"]
def pages():
cursor = None
while True:
q = {"limit": 100}
if cursor:
q["cursor"] = cursor
req = urllib.request.Request(
BASE + "?" + urllib.parse.urlencode(q),
headers={"Authorization": "Bearer " + KEY})
page = json.load(urllib.request.urlopen(req))
yield from page["data"]
if not page["has_more"]:
return
cursor = page["next_cursor"]
print(sum(1 for _ in pages()))Reads count against your budget
Listing is a GET, so it spends the read budget, which is forty times the write budget on every plan. A walk of a thousand runs is ten calls. For the arithmetic see how the other list endpoints page in the jobs list cursor, and for totalling cost from the receipts you just listed, cost per row from receipts.
Sources
Related posts
More in Formats
- Product-commercial Format: one gift-set hero clip for a store page
Make a premium hero clip of one gift set with Sume's product-commercial Format: controlled composition, tactile detail, one camera move, then reuse it.
- Product-usage-demo Format: a kitchen gift shown in one real action
Use Sume's product-usage-demo Format to show one real action with a kitchen or household gift in a casual social setting, so buyers see it working.
- Real estate listing video: a typed output schema with SumeMediaFile
Bind an output_schema to a Format run so a listing video returns as your JSON: address, headline, caption and a SumeMediaFile to store beside the MLS ID.
- Rebuild your best product ad with a new product: sume-recreate Format
Use the sume-recreate Format to keep a winning ad's scene order and timing, cast a new presenter and generate everything fresh with your own packshot.
Written by Sume