Retrieve Video Clips
Once processing completes, retrieve your clips either through periodic polling or automated webhook notifications.
- Polling: Continuously check project status until clips are ready.
- Webhook: Receive automatic notifications to your server.
Polling Clips
After submitting a long video for clipping, you can retrieve the generated short clips by polling the project using the projectId. Each clip includes its title, download URL, transcript, related topics, and an AI-generated viral score and reason.
Example Request
curl -X GET "https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/query/{projectId}" \
-H "VIZARDAI_API_KEY: YOUR_API_KEY"Please replace parameter
projectIdin request URL with the actual projectId returned in previous step.
Example Response
{
"code": 2000,
"shareLink": "https://vizard.ai/project?invite=BW77vF&susId=1862&utm_source=project_share&utm_medium=project_share_email&utm_campaign=project_share_email",
"videos": [
{
"videoId": 14015572,
"videoUrl": "https://cdn-video.vizard.ai/vizard/video/export/...",
"videoMsDuration": 80400,
"title": "Transform Content Creation with Spark 1.0's AI Video Editing",
"transcript": "Hi, we're here with Vizard...",
"viralScore": "10",
"viralReason": "This clip leverages the appeal of AI technology...",
"relatedTopic": "[]",
"clipEditorUrl": "https://vizard.ai/editor?id=99058552&type=clip"
},
...
],
"projectId": 17861706,
"projectName" : "My first project"
}Top-level Fields
| Field | Type | Description |
|---|---|---|
code | int | Response status code. 2000 means success, 1000 means still processing. |
projectId | long | The ID of the project you queried. |
projectName | string | The name of the project you queried. |
shareLink | string | Shareable link to the project. Business/Team plan only. |
videos | array | List of generated clips, sorted by viral score. |
videos Object Fields
videos Object Fields| Field | Type | Description |
|---|---|---|
videoId | long | Unique identifier for the clip. |
videoUrl | string | Temporary download URL for the clip. Valid for 7 days. |
videoMsDuration | long | Clip duration in milliseconds. |
title | string | AI-generated title based on the clip content. |
transcript | string | Full transcript of the clip. |
viralScore | string | Viral score (0–10). Higher values suggest stronger engagement potential. |
viralReason | string | Explanation of why the clip is considered engaging. |
relatedTopic | string | Stringified JSON array of related keywords/topics. |
clipEditorUrl | string | The URL of the web editor where you can edit this clip. |
⚠️ videoUrl is a temporary download link for the clip, valid for 7 days. If it expires, simply re-query the API to obtain a new link.
Retry Behavior
If your video is still processing, the videos array may be empty. Poll the endpoint again after a few seconds. You can safely retry every 30 seconds until clips appear.
Common Status Codes
| Code | Meaning |
|---|---|
| 2000 | Success – clips retrieved |
| 1000 | Still processing – try again later |
| 4001 | Invalid API key |
| 4002 | Clipping failed |
| 4003 | Rate limit exceeded |
| 4004 | Unsupported video format |
| 4005 | Invalid video URL |
| 4006 | Illegal parameter |
| 4007 | Insufficient account time |
| 4008 | Failed to download video |
Updated about 2 months ago