You need to enable JavaScript to run this app.
Lake AI Service

Lake AI Service

Copy page
Download PDF
Video processing
Video Resolution Adjustment (online)
Copy page
Download PDF
Video Resolution Adjustment (online)

Operator introduction

Operator ID: las_video_resize

Core capabilities

Video resolution adjustment

  • Intelligent resolution adjustment within the specified range
  • Supports multiple aspect ratio preservation strategies
  • Allows control of video quality and encoding parameters
  • Keeps the audio stream unaffected

Demonstration

  • Input video
  • Output video

Supported regions

  • Beijing: cn-beijing
  • Shanghai: cn-shanghai
  • Guangzhou: cn-guangzhou

Operator performance

Subcategory items
Performance impact description

Maximum RPM

600

Maximum concurrency

10

Adjust result quality

  • CPU encoding (libx264): Quality prioritized, high compression efficiency, slower speed
  • GPU encoding (h264_nvenc): Fast speed, suitable for batch processing, quality is slightly lower than libx264 (at the same bitrate), compression efficiency is slightly worse, files may be larger

Input and output requirements

Input requirements

Breakdown

Detailed requirements

Supported input data modalities

  • Video

Input format: Video

  • Format: All common video formats are supported, including "mp4", "mov", "mkv", "avi", and many others.
  • Size: Videos with a duration of 1 second to 2 hours and a file size not exceeding 5 GB.

Input path requirements

Provide input data to the operator using the request parameter video_path. Currently, only TOS paths are supported.

  • TOS path: After uploading the data to be processed to a TOS Bucket under the same primary account and region as the current LAS service, you can provide a TOS path in the format tos://bucket_name/demo.

Output requirements

Subcategories

Detailed requirements

Output data modality

  • Video

Output path: TOS

Specify the storage path for the operator's output results using the request parameter output_tos_dir. Currently, only TOS paths are supported.

  • TOS path: A writable TOS Bucket directory under the same primary account and region as the LAS service.

Billing information
  • Billing standards

    Sub-items
    Billing standards description

    Billing item

    Billing is based on the usage statistics for input video duration.

    Billing type

    Usage-based billing, unit: CNY/minute, billed hourly based on actual usage.

    Unit price

    The unit price is determined by the input video's encoding format and video resolution.

  • Billing details
    Billing formula: Total cost = unit price * usage

    Input video encoding format
    Output video resolution
    Unit price

    H.265

    4k

    1.05 CNY/minute

    2k

    0.525 CNY/minute

    1080p

    0.244 CNY/minute

    720p

    0.122 CNY/minute

    540p

    0.102 CNY/minute

    480p

    0.081 CNY/minute

    360p

    0.054 CNY/minute

    240p

    0.043 CNY/minute

    H.264

    4k

    0.21 CNY/minute

    2k

    0.105 CNY/minute

    1080p

    0.049 CNY/minute

    720p

    0.024 CNY/minute

    540p

    0.02 CNY/minute

    480p

    0.016 CNY/minute

    360p

    0.011 CNY/minute

    240p

    0.009 CNY/minute

Notes and prerequisites

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.
For details, see Obtain the Base URL. The Examples below are for reference only; when making actual calls, replace the path values with those corresponding to your region.

Rest API invocation

API usage instructions

  • To submit a task via the Submit interface to obtain the task's task_id, then use the Poll interface to query the status of the corresponding task (task_id) and retrieve the operator processing result.
  • Caution: After submitting the task, the task_id is valid for 3 days. After 3 days, you will not be able to use this task_id to obtain the operator processing result.

Submit

POST https://operator.las.ap-southeast-1.volces.com/api/v1/submit

Interface description

Submit a las_video_resize operator task to adjust video resolution.

Request parameters

Parameters
Type
Required
Example
Description
operator_id
string
Yes
las_video_resize
The operator ID is las_video_resize
operator_version
string
Yes
v1
Currently only v1 is supported.
data
VideoResizeReqParams
Yes
Operator parameters

Response parameters

const properties = ({
  "columns": [
{ "title": "Parameters", "dataIndex": "column_0", "key": "column_0", "width": 300 },
{ "title": "Type", "dataIndex": "column_1", "key": "column_1", "width": 150 },
{ "title": "Example", "dataIndex": "column_2", "key": "column_2", "width": 150 },
{ "title": "Description", "dataIndex": "column_3", "key": "column_3" }
  ],
  "data": [
    {
      "key": "1",
      "column_0": "metadata",
      "column_1": "metadata",
      "column_2": "",
"column_3": "Requested metadata",
      "children": [
        {
          "key": "1-1",
          "column_0": "task_id",
          "column_1": "string",
          "column_2": "task-xxx",
"column_3": "Task ID in asynchronous mode, used for job status queries."
        },
        {
          "key": "1-2",
          "column_0": "task_status",
          "column_1": "string",
          "column_2": "PENDING",
"column_3": < div> Task status in asynchronous mode. < br/>< ul>< li> PENDING, request received</ li>< li> RUNNING, running</ li>< li> COMPLETED, completed</ li>< li> FAILED, failed</ li></ ul> div>
        },
        {
          "key": "1-3",
          "column_0": "business_code",
          "column_1": "string",
          "column_2": "200",
"column_3": "Business code."
        },
        {
          "key": "1-4",
          "column_0": "error_msg",
          "column_1": "string",
          "column_2": "",
"column_3": "If an exception occurs, detailed exception information will be returned."
        }
      ]
    }
  ]
}); 
return <Table border={{ cell: true, wrapper: true }} pagination={false} {...properties} />;

Example

Request example

# Please set INPUT_PATH to the TOS path of the video file saved under this account
export INPUT_PATH="tos://xxxx/sample.mp4"
# Please set OUTPUT_PATH_TEMPLATE to a writable TOS path on this account
export OUTPUT_PATH_TEMPLATE="tos://xxxx/output/"
# Initiate operator service request
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_resize\",
    \"operator_version\": \"v1\",
    \"data\": {
        \"video_path\": \"$INPUT_PATH\",
        \"output_tos_dir\": \"$OUTPUT_PATH_TEMPLATE\",
        \"output_file_name\": \"demo1.mp4\",
        \"min_width\": \"890\",
        \"max_width\": \"890\",
        \"min_height\": \"890\",
        \"max_height\": \"890\"
    }
}"

Response example

{
    "metadata": {
        "task_id": "task-20251125163544-abc123",
        "task_status": "PENDING",
        "business_code": "200",
        "error_msg": ""
    }
}

Poll

POST https://operator.las.cn-beijing.volces.com/api/v1/poll

Interface description

Query the execution status and result of the video resolution adjustment task.

Request parameters

Parameter

Type

Required

Example value

Description

operator_id

string

Yes

las_video_resize

Operator ID

operator_version

string

Yes

v1

Operator version

task_id

string

Yes

task-xxx

Task ID

Response parameters

Parameters
Type
Example
Description
metadata
metadata
-
Requested metadata.
task_status
string
COMPLETED
Task status.
  • PENDING, request received
  • RUNNING, running
  • COMPLETED, completed
  • FAILED, failed
submit_time
string
2026-07-21T16:04:06+08:00
Task submission time, formatted as ISO 8601 timestamp.
end_time
string
2026-07-21T16:04:06+08:00
Task end time, formatted as ISO 8601 timestamp.
business_code
string
ApiKey.Invalid
Business code.
error_msg
string
The api key is invalid.
If an exception occurs, detailed exception information will be returned.
request_id
string
9fed0e5f0659b128bad47e971aed3c81
Request request_id.
data
VideoResizeResponse
-
Returned data.
input_path
string
tos://bucket/key
Downloadable address of the video file to be converted
output_path
string
tos://bucket/key
Storage destination address of the converted video file
duration
float
5.89
Total video duration, unit: seconds
width
string
1780
Width of the converted video, unit: pixels
height
string
890
Height of the converted video, unit: pixels

Example

Request example

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_resize",
    "operator_version": "v1",
    "task_id": "task-20251125163544-abc123"
}'

Response example

{
    "metadata": {
        "task_id": "06ecbd66031e7006022d",
        "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": "Task processed successfully"
    },
    "data": {
        "input_path": "tos://xxx/xxx.mp4",
        "output_path": "tos://yyy/result/demo1.mp4",
        "duration": 32.512,
        "width": 1780,
        "height": 890
    }
}
Last updated: 2026.08.18 15:00:37