Overview
This is the video file editing capability Vidu S provides: for a pre-recorded source video, submit a set of scene switches along a timeline, and asynchronously generate an edited MP4. Unlike the real-time editing live stream, this is not streaming — no long-lived connection is established; each submission corresponds to one complete editing task, and the result is obtained by polling or callback.
| The four capabilities | Description |
|---|---|
Style rendering style_transfer | Redraws the video picture in the style of the reference image. Commonly used for anime-style or artistic-style edited footage. |
Character replacement subject_replacement | Replaces the person in the video with the character from the reference image, preserving the original motion and camera pacing. |
Background replacement background_replacement | Replaces the video background with the scene from the reference image, while keeping the subject-foreground relationship unchanged. |
Virtual try-on virtual_tryon | Dresses the person in the video according to the reference image, while preserving their posture and body structure. |
Minimal Integration Flow
Create a Task
Submit the source video address and a time-ordered set of scene switches to obtain a task_id for subsequent queries.
The output resolution is 540p, 24fps; width/height and orientation match the source video; the output duration equals the source video duration (it is neither padded nor truncated).
Query the Task and Retrieve the Output
A successful creation only means the task has been accepted, not that the output video has been generated; poll using task_id, or configure callback_url to wait for a callback.
- Task status:
GET /v2/tasks(can be filtered by task ID); terminal states aresuccess/failed. - Output video:
GET /v2/tasks/{task_id}/creations, returns the output video address (plus cover/last-frame images).
Interface Protocol Overview
End-to-End Integration Flow
- Call the “Create Task” endpoint, submitting the source video and a time-ordered sequence of scene switches, to obtain a
task_id. - Poll the “Query Task” endpoint until it reaches a terminal state of
successorfailed(you can also configurecallback_urlto receive a callback instead of polling). - Once
success, call the “Query Output” endpoint to retrieve the generated video address.
API Overview
| Endpoint | Method and Path | Purpose |
|---|---|---|
| POST | /s_editing/offline | Create an offline editing task (submit the source video and scene-switch sequence; returns task_id) |
| GET | /v2/tasks | Query task status (can be filtered by task ID) |
| GET | /v2/tasks/{task_id}/creations | Retrieve the output video address |
General Conventions
| Item | Convention |
|---|---|
| Integration Environment and Authentication | The base URL and authentication follow the existing Vidu MaaS open API (same as other /s_* and /v2/* endpoints). |
| Data Format | Content-Type: application/json |
| Asynchronous Processing and Polling | Tasks are processed asynchronously. A successful creation only means the task has been accepted, not that the output video has been generated; poll the query endpoint, or configure callback_url to wait for a callback. |
| Billing | The create endpoint returns credits as 0; the actual deduction occurs within the task workflow based on source video duration × 1.5, and is reflected in the “Query Task” result. |