Skip to main content

Jobs

GET /v1/jobs/:id

Check the status and progress of an asynchronous job.

Several operations (analyze, export, translate, voiceover) run asynchronously and return a jobId. Use this endpoint to poll for progress and results.

Path parameters

ParameterTypeRequiredDescription
idstringYesJob ID (e.g. analysis_..., export_..., translation_..., tool_...)

Example

curl https://api.vidocu.ai/v1/jobs/analysis_1708300000000_abc1234 \
-H "Authorization: Bearer vdo_live_your_key_here"

Response 200 OK

{
"jobId": "analysis_1708300000000_abc1234",
"type": "analysis",
"status": "processing",
"progress": {
"step": "transcribing",
"message": "Creating video script...",
"percentage": 45
},
"result": null,
"error": null,
"createdAt": "2024-02-19T10:00:00.000Z",
"updatedAt": "2024-02-19T10:01:30.000Z"
}

Response fields

FieldTypeDescription
jobIdstringUnique job identifier
typestringanalysis, export, translation, or tool
statusstringpending, processing, completed, or failed
progressobject | nullCurrent progress (when processing)
progress.stepstringCurrent processing step
progress.messagestringHuman-readable progress message
progress.percentagenumber | undefinedCompletion percentage (0–100)
resultobject | nullResult data (when completed)
errorstring | nullError message (when failed)
createdAtstringJob creation timestamp
updatedAtstringLast status update timestamp

Job statuses

StatusDescription
pendingJob created, waiting to start
processingJob is running
completedJob finished successfully
failedJob encountered an error

Polling pattern

Poll the job endpoint until status is completed or failed:

async function waitForJob(jobId: string, apiKey: string): Promise<any> {
while (true) {
const res = await fetch(`https://api.vidocu.ai/v1/jobs/${jobId}`, {
headers: { Authorization: `Bearer ${apiKey}` },
});
const job = await res.json();

if (job.status === "completed") return job.result;
if (job.status === "failed") throw new Error(job.error);

// Wait 2 seconds between polls
await new Promise((r) => setTimeout(r, 2000));
}
}

For a better approach, use webhooks to receive notifications when jobs complete.

Errors

StatusCodeCause
401authentication_errorInvalid or missing API key
404not_foundJob not found or belongs to a different workspace