POST /v1/wand/vega-videos/tasks, which returns an id and status=queued upon success.GET /v1/wand/vega-videos/tasks/{id} with the id until the status is succeeded or failed. Upon success, obtain the video URL from content.video_url.Model Name | Model (API Parameter) | Supported Capability | Video Duration (s) | Resolution Tier |
WAND-Vega-Video-1.0-Lite | wand-vega-video-1.0-lite | Text-to-video / first-last frame generation / reference-based generation | 4 ~ 15 | 768P,1080P,2K,4K |
type and role of elements in the content array.POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasksParameter Name | Required | Type | Description |
model | Yes | string | Model name. Value: wand-vega-video-1.0-lite |
content | Yes | array[object] | Multimodal input array. It must contain at least one type=text element (text prompts are required for generation). For details, see content array element parameters below. |
resolution | No | string | Video resolution. Lite values: 768P, 1080P, 2K, 4K |
ratio | No | string | Aspect ratio. Valid values: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive (default). Here, adaptive indicates that the value is automatically determined by the model or input material. |
duration | No | integer | Video duration in seconds. Value: an integer from 4 to 15, default 5. |
options | No | object | A collection of advanced or extended parameters. The entire object is optional. If it is not passed or is an empty object, it is equivalent to all fields being omitted. Each field can also be omitted individually. |
Parameter Name | Required | Type | Description |
options.return_last_frame | No | boolean | Whether to return the last frame image of the generated video. Value: true/false. Default: false. When set to true, if the model actually produces a last frame, the query API returns its temporary download URL in content.last_frame_url. If no last frame is produced, this field is absent. |
content is a union-type array distinguished by type, and the fields of each element are mutually exclusive:Parameter Name | Required | Type | Description |
type | Yes | string | Element type. Values: text, image_url, video_url, audio_url. |
text | Conditionally required | string | Text prompt. Required and cannot be an empty string when type=text. When multiple text elements exist, they are concatenated in array order to form the complete prompt. |
image_url | Conditionally required | object | Image material. Required when type=image_url. Structure: {"url": "..."}, where url cannot be an empty string. |
video_url | Conditionally required | object | Video material. Required when type=video_url. Structure: {"url": "..."}, where url cannot be an empty string. |
audio_url | Conditionally required | object | Audio material. Required when type=audio_url. Structure: {"url": "..."}, where url cannot be an empty string. |
role | Conditionally required | string | Material purpose. Required when type is image_url / video_url / audio_url (not used when type=text). Values: first_frame, last_frame, reference_image, reference_video, reference_audio. type=image_url: use first_frame for the first frame, last_frame for the last frame, and reference_image for the reference image; type=video_url: fixed as reference_video; type=audio_url: fixed as reference_audio. |
type and role:type | role | Actual Use |
image_url | first_frame | First frame image |
image_url | last_frame | Last frame image |
image_url | reference_image | Reference image |
video_url | reference_video (fixed) | Reference video |
audio_url | reference_audio (fixed) | Reference audio |
text | Not used | - |
content array contains only one type=text element, and resolution, ratio, and duration can all be explicitly specified.curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-d '{"model": "wand-vega-video-1.0-lite","content": [{"type": "text","text": "An orange kitten on the windowsill looks toward the camera, sunlight streams in from the side, and the camera slowly pushes in"}],"resolution": "768P","ratio": "16:9","duration": 6}'
type=image_url and role set to first_frame / last_frame in content.curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-d '{"model": "wand-vega-video-1.0-lite","content": [{"type": "text","text": "The camera transitions naturally from the first frame to the last frame, maintaining continuous lighting and shadow"},{"type": "image_url","image_url": { "url": "https://example.com/start.jpg" },"role": "first_frame"},{"type": "image_url","image_url": { "url": "https://example.com/end.jpg" },"role": "last_frame"}],"resolution": "1080P","duration": 8}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-d '{"model": "wand-vega-video-1.0-lite","content": [{"type": "text","text": "The character in the reference image moves naturally within the scene of the reference video, with the background music synchronized to the visual rhythm"},{"type": "image_url","image_url": { "url": "https://example.com/character.jpg" },"role": "reference_image"},{"type": "video_url","video_url": { "url": "https://example.com/scene.mp4" },"role": "reference_video"},{"type": "audio_url","audio_url": { "url": "https://example.com/bgm.mp3" },"role": "reference_audio"}],"resolution": "768P","ratio": "16:9","duration": 10}'
Parameter Name | Type | Description |
id | string | Task ID, used for polling to query task status. |
model | string | Value of model echoed upon submission. |
status | string | Task status. Upon successful submission, it is always queued. |
HTTP/1.1 201 CreatedContent-Type: application/json{"id": "1300000000-video-68b7c1d4a1f2e3d4c5b6a79808192a3b4c5d6e7f8-0000","model": "wand-vega-video-1.0-lite","status": "queued"}
GET https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks/{id}Parameter Name | Required | Type | Description |
id | Yes | string | Task ID (path parameter), which is the id returned when the task is submitted. |
curl -X GET 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/vega-videos/tasks/<Fid>' \\-H 'Content-Type: application/json' \\-H 'Authorization: Bearer YOUR_API_KEY'
Parameter Name | Type | Description |
id | string | Task ID. |
model | string | Echoes the model value at submission, not the actual model used for video generation. |
status | string | Task status. Values: queued (pending scheduling), running (generating), succeeded (successful), failed (failed). |
content | object | Content of the generated task result, returned only when status=succeeded. |
content.video_url | string | Download URL of the generated video. It is a temporary URL valid for 12 hours. Download and store it promptly. |
content.last_frame_url | string | URL of the last frame image of the generated video. Returned only when options.return_last_frame=true. |
error | object | Task failure information, returned only when status=failed. |
error.code | string | Task-level error code. Values: InternalError, TaskTimeout, and others. |
error.message | string | Description of the failure reason, which helps locate the issue. |
{"id": "1300000000-video-68b7c1d4a1f2e3d4c5b6a79808192a3b4c5d6e7f8-0000","model": "wand-vega-video-1.0-lite","status": "succeeded","content": {"video_url": "https://aigc-video.example.com/xxx/result.mp4"}}
HTTP Status Code | error.code | Meaning | Recommended Solution |
401 | Defined by the gateway. | Authentication failed: The Authorization header is missing or the API Key is invalid/expired. This error is returned at the gateway layer, and the error code is defined by the gateway. | Check whether the Authorization: Bearer <API Key> is correct and within its validity period. |
400 | invalid_request_error | Invalid request parameters (missing required fields, incorrect types, out-of-range enum values, JSON parsing failures, and so on). | Check the valid value range of each parameter in this document and retry. |
404 | not_found | The resource does not exist (the task ID does not exist, the path is incorrect, and so on). | Confirm whether the path and task ID are correct. |
500 | internal_error | Internal service error or processing timeout. | Retry. If failures persist, contact technical support. |
503 | service_unavailable | The service is overloaded and temporarily unavailable. | Retry with backoff. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários