Print a Sume job timeline from the events endpoint in Python
Fetch GET /v1/jobs/{id}/events and print one line per event with the standard library. A pull snapshot, not a stream, so run it again to see more.

Call GET /v1/jobs/{job_id}/events with your API key and print the list it returns. The script below does that with Python's standard library and prints the time, type, status, source and message of each event, one line each.
The script
It sends x-api-key only. The Authentication page says to send exactly one credential header; sending both Bearer and x-api-key gets a 401.
import json
import os
import urllib.request
def job_events(job_id, base="https://api.sume.com"):
request = urllib.request.Request(
f"{base}/v1/jobs/{job_id}/events",
headers={"x-api-key": os.environ["SUME_API_KEY"]},
)
with urllib.request.urlopen(request, timeout=15) as response:
return json.load(response)["data"]["events"]
def timeline(events):
for e in events:
yield f'{e["created_at"]} {e["type"]:<20} {e["status"]:<10} {e["source"]:<7} {e["message"]}'
if __name__ == "__main__":
import sys
print("\n".join(timeline(job_events(sys.argv[1]))))How to run it
Run it as python events.py <job_id> with SUME_API_KEY set. It reads the envelope's data.events list. The Jobs and results page says the events endpoint is a pull snapshot, not a stream, and that there is no SSE or WebSocket transport on the Developer API.
Events or status
The table says what to use for each kind of wait.
| Need | Use | Why |
|---|---|---|
| Is it done? | GET status_url, read terminal | Cheapest read; obey next_poll_after_seconds |
| What happened so far? | GET events_url (this script) | A phase timeline, pulled when you ask |
| Tell me when it ends | A signed webhook, with polling as backup | No loop on your side |
Cost of reading
Reads have their own request budget, 40 times the write budget for the plan, so an occasional timeline read does not eat into your submits. Do not call it in a tight loop; read next_poll_after_seconds from the status call and poll the events only when you want to look.
When a job fails
A failed job shows a public error with a code and category in the envelope. When you ask support for help, send the job id and the request id from the response, and no keys or signed URLs.
Sources
Related posts
More in Developers
- Probe a finished video before upload: duration, size and aspect
Run video inspect with frames false to read a render's duration, size and frame rate before posting. Check it against the 3-minute Shorts limit.
- URL or QR code in an AI avatar video: say it, caption it, or link it
An avatar clip cannot reliably carry a QR code or a long URL. Three Sume-supported options: spoken words, authored caption cues, or the text beside the video.
- Python asyncio.Semaphore sized to a Sume plan's job capacity
Free holds 6 paid jobs at once, Pro 24, Startup 48, Scale 120. A Semaphore of that size keeps a 60-job batch from hitting 429 queue_full.
- Python: check Omni Flash 1.1 limits against /v1/videos/models first
Google's Omni runs a sync call and extends in 10-second steps up to 40 seconds. Sume's gemini-omni-flash-1.1 takes 3 to 10 seconds per job. A preflight check.
Written by Sume