Generation Status
Poll Rivya API generation jobs by public task ID, read queued, processing, succeeded, and failed states, and consume result URLs.
Last reviewed on 2026/05/10
Use GET /api/v1/generations/{taskId} to check an asynchronous generation job.
Endpoint
GET https://rivya.ai/api/v1/generations/{taskId}Required header:
Authorization: Bearer rvya_sk_...curl Example
curl https://rivya.ai/api/v1/generations/task_public_id \
-H "Authorization: Bearer rvya_sk_..."Status Values
Public status values:
queued: task accepted, not completeprocessing: generation is runningsucceeded: result is availablefailed: task failed and may include a public error object
Succeeded Response
{
"id": "task_public_id",
"status": "succeeded",
"model": "z-image",
"reserved_credits": 1,
"final_credits": 1,
"created_at": "2026-05-10T00:00:00.000Z",
"updated_at": "2026-05-10T00:01:00.000Z",
"result": {
"primary_url": "https://media.example/result.png",
"urls": ["https://media.example/result.png"]
},
"error": null
}primary_url is the first result URL for convenience. urls contains the public result URL list when available.
Failed Response
{
"id": "task_public_id",
"status": "failed",
"model": "z-image",
"reserved_credits": 1,
"final_credits": 0,
"created_at": "2026-05-10T00:00:00.000Z",
"updated_at": "2026-05-10T00:01:00.000Z",
"result": null,
"error": {
"code": "generation_failed",
"message": "The generation failed."
}
}Polling Guidance
Start with a short delay, then increase polling intervals. Avoid tight loops.
Recommended pattern:
- wait 2-3 seconds after submission
- poll every 5-10 seconds for normal jobs
- slow down for long video and audio jobs
- stop polling when status is
succeededorfailed
Ownership Boundary
The task must belong to the same Rivya account behind the API key. If not found or not owned by the account, the endpoint returns not_found.