Jobs
Stream Job
Receive live job updates via Server-Sent Events
GET
cURL
Establishes an SSE connection that emits job updates until completion. Useful for real-time dashboards or CLI workflows.
Clients may resume streams by supplying
Example
Event types
status: initial state (queued,processing, etc.)log: operational messagesresult: final job output (mirrors theoutputfield from the polling endpoint)error: error string when the job failsend: terminal state (succeededorfailed)ping: keep-alive heartbeat every 15 seconds
Headers
TokenKit sets SSE-friendly headers to prevent caching:Last-Event-ID. The server tracks log IDs to avoid replaying old entries.
Errors
- Missing job ID or invalid credential ->
400/401 - Unknown job for the current client ->
404
error event and closes with end: failed.cURL