The enhanced version of the video editing online service combines input videos and reference images to perform targeted video replacement. It is suitable for scenarios such as advertising material remastering, product replacement, background redrawing, and creative video editing.
Operator ID: las_video_seedance_replace
scene_replace), object replacement (object_replace), and person replacement (person_replace).
scene_replace): Retains the people, products, actions, and shot structure in the original video, while replacing the background or environmental style.object_replace): Replaces the target object in the video with a specified style or product based on a reference image.person_replace): Replace the target person in the video with a specified person based on a reference image.warning
seedance_use_asset_api = true when submitting a person replacement task.user_prompt, such as retaining actions, removing watermarks, avoiding subtitles, or controlling details of the style.result.json), making it convenient for the user to retain generated results and process information.Scenario 1: Background replacement
Scenario 2: Object replacement
Sub-items | Performance impact description |
|---|---|
Maximum RPM | 600 |
Maximum concurrency | 10 |
Processing time | Total processing time depends on the video duration, the number of reference images, the complexity of the replacement, whether retry is enabled, and the network environment.
|
Processing result quality | The quality of video content replacement processing results depends on whether a reference image is provided and the content of the reference image.
|
Subdivision | Details |
|---|---|
Supported input data modalities |
|
Input format: Video |
|
Input format: Image |
|
Input format: Audio |
|
Input path requirements | Provide input data to the operator via request parameters
|
Subdivision | Details |
|---|---|
Output data modality |
|
Output format: Video |
|
Output path: TOS | Specify the storage path for the operator's output results via the request parameter
|
Billing standards
Sub-items | Billing standards description |
|---|---|
Billing item | Duration of input/output video. |
Billing type | Pay-as-you-go billing, unit: CNY/second, billed hourly according to actual usage. |
Unit price | Depends on the version of the service you select (basic version or enhanced version). |
warning
Billing details
Billing formula: Total cost = unit price * billing volume = unit price * (video duration * duration conversion coefficient)
Version breakdown | Unit price | Scenario breakdown | Billing item: video duration | Duration conversion coefficient: is determined by video resolution |
|---|---|---|---|---|
Basic version | 1.6 CNY/second | No input video | Output video duration |
|
With input video | (Input video duration + output video duration)/2 |
| ||
Enhanced version | 2 CNY/second | No input video | Output video duration |
|
With input video | (Input video duration + output video duration)/2 |
|
Billing example
Total cost = unit price * billing volume = 2 CNY/second * (5 seconds + 7 seconds)/2 * 3.040 = 36.48 CNYBilling unit
The billing unit displayed in the billing details for costs incurred by invoking this operator is "Video editing enhanced version". Please pay attention to this difference when reviewing your bill.
Details | Caution and prerequisites |
|---|---|
Costs | Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing. |
Authentication (API Key) | Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key. |
BaseURL | Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls. |
The operator's API is an asynchronous task interface. You need to submit a task through the submit interface, then use the Poll interface to obtain the task status and retrieve the operator's processing results. Additionally, the operator supports asynchronous callback capability (Callback). You can set the callback parameter callback.url when initiating the operator task. LAS will send an HTTP POST notification to this URL. For guidance on using asynchronous callbacks, see Asynchronous callback API.
You can submit asynchronous tasks by invoking the video editing enhanced version operator. This supports scene replacement, object replacement, and other video replacement editing operations based on input video and reference images or audio, and uploads the results to the specified TOS directory.
参数 | 类型 | Required | 示例值 | 描述 |
|---|---|---|---|---|
operator_id | string | Yes | las_video_seedance_replace | Operator ID |
operator_version | string | Yes | v1 | Operator version |
data | VideoSeedanceReplaceReqParams | Yes | Video replacement request parameters | |
callback | Callback | 否 | Task status callback configuration. After configuring callback.url, a POST request will be sent to this address when the task status changes. If not configured, you can query the task status and result using Poll. |
参数 | 类型 | Example value | Description |
|---|---|---|---|
metadata | metadata | Request metadata |
# Please set OUTPUT_TOS_PATH to a tos path writable by this account export OUTPUT_TOS_PATH="tos://path/to/seedance_replace_results" curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/submit" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_video_seedance_replace", "operator_version": "v1", "data": { "video_url": "https://${LAS_TOS_BUCKET}.${TOS_ENDPOINT}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_seedance_replace/v1/sample_input.mp4", "image_urls": [ "https://${LAS_TOS_BUCKET}.${TOS_ENDPOINT}/operator_cards_serving/public/${LAS_ENVIRONMENT}/las_video_seedance_replace/v1/sample_reference.jpg" ], "output_tos_path": "$OUTPUT_TOS_PATH", "user_prompt": "请帮我把@视频1的背景替换成@图片1的风格,保持人物动作和商品一致性,除背景外不做任何更改,不要字幕。", "task_type": "scene_replace", "enable_retry": true, "max_retry_times": 2 } }'
{ "metadata": { "task_id": "task-20260427143000-abc123", "task_status": "PENDING", "business_code": "0", "error_msg": "" } }
HttpStatusCode | Error code | Error message | Description |
|---|---|---|---|
400 | Url.Invalid | The url is invalid. | The input video, reference image, or audio link is invalid. |
400 | Video.Invalid | The video file is invalid. | The video file is invalid or cannot be parsed. |
400 | Video.DownloadFailed | Video download failed. | Video download failed. |
400 | Video.FormatUnsupported | Video format not supported. | Video format not supported. |
400 | Video.DurationTooShort | Video duration is too short. | Video duration is below the minimum limit. |
400 | Video.DurationExceeded | Video duration exceeds maximum limit. | The video duration exceeds the maximum limit. |
400 | Video.FileTooLarge | Video file size exceeds maximum limit. | The video file is too large. |
400 | Parameter.Invalid | The parameter is invalid. | The parameter is invalid. |
400 | Video.Timeout | Video processing timeout. | Video processing timed out. |
400 | Video.UploadFailed | Video upload failed. | Failed to upload the resulting video. |
400 | Tos.AccessFailed | TOS access failed. | TOS access failed. |
401 | Authorization.Missing | Missing Authorization. | Authorization is missing. |
401 | ApiKey.InValid | The api key is invalid. | The API is invalid. |
500 | Internal.ServerError | Internal server error. | Internal server error, such as failure in generation, evaluation, or result assembly. |
Query the execution status and result of the video replacement task.
Name | Type | Required | Example value | Description |
|---|---|---|---|---|
operator_id | string | Yes | las_video_seedance_replace | Operator ID |
operator_version | string | Yes | v1 | Operator version |
task_id | string | Yes | task-xxx | Task ID |
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
metadata | metadata | Request metadata | |
data | VideoSeedanceReplaceResponse | Returned data |
curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/poll" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_video_seedance_replace", "operator_version": "v1", "task_id": "task-20260427143000-abc123" }'
{ "metadata": { "task_id": "task-20260427143000-abc123", "task_status": "COMPLETED", "submit_time": "2026-07-21T16:04:06+08:00", "end_time": "2026-07-21T16:04:06+08:00", "business_code": "0", "error_msg": "" }, "data": { "output_video_tos_url": "tos://path/to/seedance_replace_results/run_id/generated/attempt_01.mp4", "output_video_url": "https://path/to/seedance_replace_results/run_id/generated/attempt_01.mp4", "selected_attempt_no": 1, "attempt_count": 1, "output_result_json_tos_url": "tos://path/to/seedance_replace_results/run_id/result.json", "output_result_json_url": "https://path/to/seedance_replace_results/run_id/result.json" } }
HttpStatusCode | Error code | Error message | Description |
|---|---|---|---|
400 | Url.Invalid | The url is invalid. | The input video, reference image, or audio link is invalid. |
400 | Video.Invalid | The video file is invalid. | The video file is invalid or cannot be parsed. |
400 | Video.DownloadFailed | Video download failed. | Video download failed. |
400 | Video.FormatUnsupported | Video format not supported. | Video format not supported. |
400 | Video.DurationTooShort | Video duration is too short. | Video duration is below the minimum limit. |
400 | Video.DurationExceeded | Video duration exceeds maximum limit. | The video duration exceeds the maximum limit. |
400 | Video.FileTooLarge | Video file size exceeds maximum limit. | The video file is too large. |
400 | Parameter.Invalid | The parameter is invalid. | The parameter is invalid. |
400 | Video.Timeout | Video processing timeout. | Video processing timed out. |
400 | Video.UploadFailed | Video upload failed. | Failed to upload the resulting video. |
400 | Tos.AccessFailed | TOS access failed. | TOS access failed. |
401 | Authorization.Missing | Missing Authorization. | Authorization is missing. |
401 | ApiKey.InValid | The api key is invalid. | The API is invalid. |
500 | Internal.ServerError | Internal server error. | Internal service error. |