Check Status
Poll the status of a video generation job.
Endpoint
GET /api/v1/video/status/{projectId}
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | The project ID returned from /video/generate |
Response
Success Response (200)
{
"status": "processing",
"message": "Video is being processed",
"createdAt": "2025-01-21T16:30:00.000Z",
"updatedAt": "2025-01-21T16:31:15.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Current status (see below) |
message | string | Human-readable status message |
createdAt | string | ISO 8601 timestamp of job creation |
updatedAt | string | ISO 8601 timestamp of last update (optional) |
outputKey | string | S3 key of output video (only when completed) |
error | string | Error message (only when failed) |
Status Values
| Status | Description | Next Action |
|---|---|---|
queued | Job is waiting in queue | Continue polling |
processing | Video is being rendered | Continue polling |
completed | Video is ready | Call /video/download/{projectId} |
failed | Generation failed | Check error field, retry if appropriate |
Status Flow
queued → processing → completed
↘ failed
Typical Timeline
| Status | Typical Duration |
|---|---|
queued | 0-30 seconds |
processing | 1-5 minutes |
Polling Strategy
Recommended Approach
async function waitForVideo(projectId, apiKey) {
const maxAttempts = 120; // 10 minutes max
const pollInterval = 5000; // 5 seconds
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch(
`https://reelbot.space/api/v1/video/status/${projectId}`,
{ headers: { 'X-API-Key': apiKey } }
);
const data = await response.json();
if (data.status === 'completed') {
return data;
}
if (data.status === 'failed') {
throw new Error(data.error || 'Video generation failed');
}
await new Promise(resolve => setTimeout(resolve, pollInterval));
}
throw new Error('Timeout waiting for video');
}
Polling Guidelines
| Guideline | Recommendation |
|---|---|
| Poll interval | 3-5 seconds |
| Maximum duration | 10 minutes |
| Backoff | Not required (rate limit is generous) |
Response Examples
Queued
{
"status": "queued",
"message": "Video is queued for processing",
"createdAt": "2025-01-21T16:30:00.000Z"
}
Processing
{
"status": "processing",
"message": "Video is being processed",
"createdAt": "2025-01-21T16:30:00.000Z",
"updatedAt": "2025-01-21T16:30:45.000Z"
}
Completed
{
"status": "completed",
"message": "Video generation completed successfully",
"createdAt": "2025-01-21T16:30:00.000Z",
"updatedAt": "2025-01-21T16:33:22.000Z",
"outputKey": "users/abc123/output/video-xyz789.mp4"
}
Failed
{
"status": "failed",
"message": "Video generation failed",
"createdAt": "2025-01-21T16:30:00.000Z",
"updatedAt": "2025-01-21T16:31:05.000Z",
"error": "Failed to process B-roll asset: file not found"
}
Error Responses
401 Unauthorized
{
"success": false,
"message": "Unauthorized. Please provide a valid API key via the X-API-Key header.",
"code": "UNAUTHORIZED"
}
404 Not Found
{
"success": false,
"message": "Project not found",
"code": "NOT_FOUND"
}
This occurs when:
- The
projectIddoesn't exist - The project belongs to a different user
429 Too Many Requests
{
"success": false,
"message": "Rate limit exceeded. Please reduce polling frequency.",
"code": "RATE_LIMITED",
"details": {
"resetAt": "2025-01-21T16:35:00.000Z"
}
}
cURL Example
curl https://reelbot.space/api/v1/video/status/abc123def456 \
-H "X-API-Key: rb_live_your_key_here"
Next Steps
→ Download Video — Get the completed video file when status is completed