The short version
| Your code is… | Use |
|---|---|
| A one-off script or CLI | Polling |
| A web UI showing live progress | SSE |
| A backend service / worker | Webhooks |
| A serverless function | Webhooks |
| A mobile app | Polling or SSE depending on the use case |
The long version
Polling
You callGET /v1/jobs/{id} on a loop until the status is terminal.
Good:
- Simple: no new concepts
- No infrastructure needed
- Works from anywhere that can make HTTP requests
- Debuggable: you can
curlthe same endpoint
- Eats your rate limit on long jobs
- Wastes requests between page completions
- Latency: you find out about completion at your poll interval, not instantly
Server-Sent Events (SSE)
You open a single HTTP connection to/v1/jobs/{id}/stream (or /v1/events workspace-wide) and receive events as they happen.
Good:
- Real-time updates with no polling overhead
- Efficient: one connection per job instead of many requests
- Natural fit for live UIs
- Requires a long-lived connection, which fights with serverless
- One connection per job you’re watching (unless you use the workspace stream)
- If your client restarts, you lose progress visibility mid-stream
Webhooks
You register an HTTPS endpoint and Reader POSTs you a payload when events fire. Good:- Zero overhead: you do nothing until the event fires
- Works even if your code was offline when the job ran
- One webhook can serve every job in your workspace
- Perfect for serverless, queue workers, backend services
- Needs a public HTTPS endpoint
- Needs signature verification to be safe
- Deliveries can be retried, so you need idempotency
- Debugging is harder than polling (you can’t
curlan incoming webhook)
Combining patterns
You can use more than one. A common setup:- Webhook as the authoritative “job done” signal that kicks off downstream work
- Polling or SSE in a UI so the user can watch progress while the webhook handles the side effects
Cost of each pattern
| Pattern | Credit cost | Rate limit cost |
|---|---|---|
| Polling | 0 | High (counts toward RPM) |
| SSE | 0 | Low (one connection doesn’t count toward RPM) |
| Webhooks | 0 | None |

