Video Enhancement (video super-resolution)
The platform's video quality enhancement capability is post-processing oriented: submit an existing video, upscale it to 1080p, and retrieve a download URL. A typical workflow is to generate a 480p clip with a video model first, then upscale that clip to 1080p.
The API shape matches the Volcengine AI MediaKit video enhancement API: submit a task → poll status → download the video. The platform provides the standard edition capability; defaults are set for common use, so usually you only need to send the source video and (optionally) the target frame rate.
All requests carry Authorization: Bearer <API_KEY>. The public API base URL is https://token.yaoshu.cc; append the full paths listed on this page directly, without adding an extra /v1. Below, {task_id} is the task ID returned by the submit call.
1. Submit a Task
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/tools/enhance-video | Submit an enhancement task; returns {success, task_id, request_id} on success |
| GET | /api/v1/tasks/{task_id} | Query task status and result |
Request fields
Source video — choose one: video_url (publicly readable address) or source_task_id (the task ID of a completed video task on this platform).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
video_url | string | One of two | — | Public HTTP/HTTPS video URL; the platform server must be able to read it directly |
source_task_id | string | One of two | — | Task ID of a completed video task on this platform; must belong to the same environment and the same account as the caller |
resolution | string | No | 1080p | Target resolution; only 1080p is currently supported |
fps | number | No | 30 | Target frame rate, 1–60. Values above 30 enter a higher billing tier |
bitrate_level | string | No | medium | Bitrate tier: low / medium / high; converted automatically based on resolution and frame rate |
bitrate | number | No | — | Exact bitrate (kbps), 10–150000. When provided, bitrate_level has no effect |
tool_version | string | No | standard | Only standard is supported |
scene | string | No | common | Scene template: common / ugc / short_series / aigc / old_film |
enhance_style | string | No | hd | Enhancement style: hd (high definition) / natural (natural) |
callback_url | string | No | — | Task callback URL; must be HTTPS |
About the defaults: omitted fields are filled in by the platform using the defaults above. Resolution is fixed at 1080p; frame rate defaults to 30; bitrate tier defaults to medium. If the source video has a frame rate above 30 and you want to keep the higher frame rate, pass
fpsexplicitly (for example60).
Inputs that are rejected
The following cases return 400 without creating a task and without charging a fee:
| Type | Specific content |
|---|---|
| Generation fields | prompt, duration, ratio, functionMode, generate_audio, watermark, seed, reference image / first-and-last frame materials |
| Resolution | Any tier other than 1080p (including 720p, 2k, 4k) |
| Frame rate | Less than or equal to 0, or greater than 60 |
| Version | tool_version other than standard |
| Other product-line parameters | bit_depth, codec, pix_fmt, dynamic_range, resolution_limit, media_output_destination, client_token, queue_id |
| Source video already sufficient | The source task referenced by source_task_id is already 1080p or above (returns video_source_resolution_too_high) |
2. Query a Task
GET /api/v1/tasks/{task_id}
Successful response:
{
"success": true,
"task_id": "task_xxx",
"task_type": "enhance-video",
"status": "completed",
"result": {
"video_url": "https://...",
"duration": 6.0,
"resolution": "1080p",
"fps": 30,
"tool_version": "standard"
},
"created_at": 1793853931,
"request_id": "task_xxx"
}Task statuses:
status | Meaning |
|---|---|
pending | Queued |
running | Processing |
completed | Succeeded; result.video_url is downloadable |
failed | Failed; the reason is in error |
expired | The result has expired |
result.video_url is a complete, directly downloadable address. It is valid for 24 hours, so download it promptly; once it expires, submit the task again.
3. Error Responses
On failure, the API returns success: false with an error object:
{
"success": false,
"task_id": "",
"request_id": "...",
"error": {
"code": "invalid_request",
"type": "BadRequest",
"message": "resolution must be 1080p"
}
}error.code | HTTP | Meaning and handling |
|---|---|---|
invalid_request | 400 | Invalid parameters; fix them according to message |
video_source_unavailable | 400 | Source video unavailable (unreachable, not HTTP(S), etc.) |
video_source_expired | 400 | The source video URL has expired. Regenerate or re-upload the video, then retry with the new valid URL |
video_source_resolution_too_high | 400 | The source video is already 1080p or above; no upscaling needed |
task_not_exist | 404 | The task does not exist or does not belong to the current account |
no_available_channel | 503 | No available route for the current group; retry later or contact the platform |
Source URL validity: download URLs for generated videos are usually valid for only 24 hours. If there is a long gap between generation and enhancement, confirm the source URL is still reachable before submitting; once it has expired, the API returns
video_source_expired, and you must regenerate or re-upload before enhancing.
4. Billing
Billed by source video seconds: seconds × 1080p per-second price × frame-rate factor.
| Target frame rate | Frame-rate factor |
|---|---|
| ≤ 30 | 1 |
| 31–60 | 2 |
Generation and enhancement charges are displayed together; enhancement is not itemized separately. See "Model Square" in the console for specific unit prices.
5. Usage Example
Generate a 480p clip with a video model first, then submit the enhancement using the task ID:
# 1. Submit the enhancement (using an on-platform task ID as the source)
curl -X POST 'https://token.yaoshu.cc/api/v1/tools/enhance-video' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"source_task_id": "task_xxx",
"fps": 30
}'
# 2. Poll
curl 'https://token.yaoshu.cc/api/v1/tasks/task_yyy' \
-H 'Authorization: Bearer <API_KEY>'
# 3. Download result.video_urlYou can also use a public URL as the source:
curl -X POST 'https://token.yaoshu.cc/api/v1/tools/enhance-video' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"video_url": "https://example.com/source.mp4",
"resolution": "1080p",
"bitrate_level": "high"
}'6. Limitations
- Input video: mainstream formats such as MP4 / MOV / FLV / TS / AVI / WMV / MKV; an individual file should not exceed 10 GB; input resolution up to 2K.
- Output resolution: fixed at 1080p.
- Processing time grows with clip duration; 1080p typically takes 4–6 minutes per clip — use this to estimate your pipeline time.
source_task_idonly accepts task IDs from the same environment and account; cross-environment or other users' tasks returntask_not_exist.
