Get Video Generation Job
AI Studio
Get Video Generation Job
Retrieve the status and output of an AI video generation job
GET
Get Video Generation Job
Overview
This endpoint retrieves the current status and output of an AI video generation job using its unique job ID. While the generation is in progress, it returns the job status. Once the video generation completes, it returns the output including the video URL, thumbnail images, dimensions, duration, and AI credits consumed.A valid API key is required to use this endpoint. Obtain your API key from the API Access page in your Pictory dashboard.
API Endpoint
Request Parameters
Path Parameters
The unique identifier (UUID) of the video generation job. This is the
jobId returned by the Generate Video endpoint.Example: "4a09edf9-d071-4847-bda5-8dea913d80fe"Headers
API key for authentication (starts with
pictai_)Response
In-Progress Response
Returned while the video is being generated:The unique identifier of the video generation job
true while the job is processingCompleted Response
Returned when the video has been generated successfully:The unique identifier of the video generation job
true when the job has completed successfullyContains the video generation output.
"completed" when the video has been generated successfullyDirect download URL for the generated video file (MP4)
Duration of the generated video (e.g.,
"8s")Width of the generated video in pixels
Height of the generated video in pixels
URL for the video thumbnail image (JPG)
URL for the last frame of the video (PNG). This can be used as a
firstFrameImageUrl in a subsequent generate video request to create a seamless continuation.URL for the video preview image (JPG)
Number of AI credits consumed for this video generation
Failed Response
Returned when the video generation job has failed:The unique identifier of the video generation job
false when the job has failedResponse Examples
Status Codes
| Status Code | Description |
|---|---|
| 200 | Request processed successfully. Check the status field in data to determine the job state (in-progress, completed, or failed). |
| 401 | Unauthorized. The API key in the Authorization header is missing or invalid. |
| 404 | Job not found. The provided jobid does not match any existing job. |
| 500 | Internal server error. Retry the request after a brief delay. |
Completed Response Fields
| Field | Description |
|---|---|
url | Direct download link for the generated MP4 video file |
duration | Duration of the generated video (e.g., "8s") |
width | Width of the generated video in pixels |
height | Height of the generated video in pixels |
thumbnailImageUrl | Auto-generated thumbnail image for the video (JPG) |
lastFrameImageUrl | Last frame of the video (PNG), useful for creating video continuations |
previewImageUrl | Preview image for the video (JPG) |
aiCreditsUsed | Number of AI credits consumed for this generation |
Code Examples
Polling Best Practices
-
Use webhooks when possible. Configure a
webhookURL in the original generate video request to receive automatic notification when the job completes, rather than polling. - Implement timeouts. Set a reasonable maximum wait time. Video generation can take several minutes depending on the model and duration selected.
-
Handle failures gracefully. Inspect
error_codeanderror_messagein failed responses to determine the cause and whether the request can be retried. -
Use the last frame for continuations. The
lastFrameImageUrlfrom a completed job can be passed asfirstFrameImageUrlin a new generate video request to create a seamless video continuation.
