Real-time progress (SSE)
Every job can be streamed over Server-Sent Events: GET /v1/sse/jobs/{id} emits
status events ({ id, status, progress, result_url?, error_message? }), periodic
heartbeats, and a final done when the job is terminal.
Browsers — ticket flow
EventSource cannot send headers, so first exchange your credential for a short-lived ticket
(expires in 5 minutes, bound to one job):
javascript
const { ticket } = await fetch('https://api.aiveed.io/v1/sse/tickets', {
method: 'POST',
headers: { 'X-API-Key': KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ jobId }),
}).then((r) => r.json());
const es = new EventSource(`https://api.aiveed.io/v1/sse/jobs/${jobId}?ticket=${ticket}`);
es.addEventListener('status', (e) => console.log(JSON.parse(e.data)));
es.addEventListener('done', () => es.close());Servers — header auth
bash
curl -N "https://api.aiveed.io/v1/sse/jobs/JOB_ID" -H "X-API-Key: $AIVEED_API_KEY"The
?api_key= query form is deliberately not accepted — only tickets may appear in URLs. If the job is already terminal you get one final status + done immediately. Polling GET /v1/jobs/{id} every few seconds is a fine alternative.