Long-running work uses the async job model: you submit the request and collect the result later. The gateway has two kinds, and their polling paths differ.
1. Responses background jobs
Pass background: true to POST /v1/responses and it responds immediately with status: "queued".
json
{
"model": "everyais/gemini-3-5-flash-lite",
"input": "A long research task...",
"background": true
}- Polling:
GET /v1/responses/{id} - State transitions:
queued→in_progress→completed/incomplete/failed/cancelled - Cancel:
POST /v1/responses/{id}/cancel(onlyqueuedandin_progresscan be cancelled, and the reserved credit is refunded)
2. Video generation jobs
POST /v1/videos/generations is always async. Poll with the id from the response.
- Polling:
GET /v1/videos/generations/{id} - While in progress you get
Retry-After: 5— poll at 5-second intervals. - Status:
processing/completed/failed/cancelled
⚠️ Looking up a video job via
GET /v1/outputs/{requestId}returns 404. Video job ids and completed request ids live in different spaces.