Example Usage
import { VideoGenerationResponse } from "@openrouter/sdk/models";
let value: VideoGenerationResponse = {
id: "gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt",
pollingUrl:
"https://eu.openrouter.ai/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt",
status: "pending",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
error | string | ➖ | N/A | |
expiresAt | number | ➖ | Unix timestamp in seconds when OpenRouter’s stored copy of the outputs stops being available. Present only when that copy exists. | |
generationId | string | ➖ | The generation ID associated with this video generation job. Available once the job has been processed. | |
id | string | ✔️ | The video job ID, in the gen-vid-<timestamp>-<20 alphanumerics> generation ID format. Pass it as previous_job_id to continue the generation. | |
pollingUrl | string | ✔️ | Absolute URL on the job’s OpenRouter regional host. Use it as returned to poll the job with your API key. | |
progress | number | ➖ | Percent complete, from 0 to 100 and possibly fractional, reported by the provider while status_detail is generating. Present only for providers that report it, and absent once the job moves to finalizing. | |
status | models.VideoGenerationResponseStatus | ✔️ | N/A | |
statusDetail | models.StatusDetail | ➖ | The step within status for a job that is not finished: submitting and queued_at_provider under pending, generating and finalizing under in_progress. When present, it only moves forward, and steps may be skipped between polls. It is absent once the job is finished and can also be absent mid-job when the step is unknown, so use status to tell whether the job is finished. | |
unsignedUrls | string[] | ➖ | Absolute URLs on the job’s OpenRouter regional host, one per output. Use the selected URL as returned with your API key in the Authorization header. It works while the output is available. | |
urls | string[] | ➖ | Signed download URLs for OpenRouter’s stored copy of each output, usable without an API key until expires_at. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. | |
usage | models.VideoGenerationUsage | ➖ | Usage and cost information for the video generation. Available once the job has completed. | { “cost”: 0.5, “is_byok”: false } |