Skip to main content

Check Status

Poll the status of a video generation job.

Endpoint

GET /api/v1/video/status/{projectId}

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Path Parameters

ParameterTypeDescription
projectIdstringThe 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

FieldTypeDescription
statusstringCurrent status (see below)
messagestringHuman-readable status message
createdAtstringISO 8601 timestamp of job creation
updatedAtstringISO 8601 timestamp of last update (optional)
outputKeystringS3 key of output video (only when completed)
errorstringError message (only when failed)

Status Values

StatusDescriptionNext Action
queuedJob is waiting in queueContinue polling
processingVideo is being renderedContinue polling
completedVideo is readyCall /video/download/{projectId}
failedGeneration failedCheck error field, retry if appropriate

Status Flow

queued → processing → completed
↘ failed

Typical Timeline

StatusTypical Duration
queued0-30 seconds
processing1-5 minutes

Polling Strategy

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

GuidelineRecommendation
Poll interval3-5 seconds
Maximum duration10 minutes
BackoffNot 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 projectId doesn'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