function getVideoJobStatus<TAdapter>(options): Promise<{
error?: string;
progress?: number;
status: "pending" | "processing" | "completed" | "failed";
url?: string;
}>;function getVideoJobStatus<TAdapter>(options): Promise<{
error?: string;
progress?: number;
status: "pending" | "processing" | "completed" | "failed";
url?: string;
}>;Defined in: packages/typescript/ai/src/activities/generateVideo/index.ts:447
Experimental
Get video job status - returns the current status, progress, and URL if available.
This function combines status checking and URL retrieval. If the job is completed, it will automatically fetch and include the video URL.
Video generation is an experimental feature and may change.
TAdapter extends VideoAdapter<string, any, any, any>
TAdapter & object
string
Promise<{ error?: string; progress?: number; status: "pending" | "processing" | "completed" | "failed"; url?: string; }>
import { getVideoJobStatus } from '@tanstack/ai'
import { openaiVideo } from '@tanstack/ai-openai'
const result = await getVideoJobStatus({
adapter: openaiVideo('sora-2'),
jobId: 'job-123'
})
console.log('Status:', result.status)
console.log('Progress:', result.progress)
if (result.url) {
console.log('Video URL:', result.url)
}import { getVideoJobStatus } from '@tanstack/ai'
import { openaiVideo } from '@tanstack/ai-openai'
const result = await getVideoJobStatus({
adapter: openaiVideo('sora-2'),
jobId: 'job-123'
})
console.log('Status:', result.status)
console.log('Progress:', result.progress)
if (result.url) {
console.log('Video URL:', result.url)
}