Topaz endpoint with video or image,,, etc., and can when Resolution 2 / 4, return after file.localized example text1 when Resolution,.
videoand imageendpoint, Request Body in thetype fieldlocalized example text.
Scenario:Resolution asset, AIGC, asset repair, / first Resolution.
Base URL: https://mm-internal-cn.leonecloud.com
Authentication
All endpoints require a token in the request header for authentication:
Authorization: Bearer {YOUR_AUTH_TOKEN}localized example text``
create task(type+ inputUrl + upscaleFactor)
│
└── taskId → PollingTask Status / etc.→ return after file``
- taskaslocalized example text:create endpoint return
taskId,statusasprocessing. - localized example text「Pollingquery endpoint」or「Callback Notification」, can.
- taskSuccessafter
result[0]as after file.
create task**POST** /api/v2/open/aigc/topaz-upscale
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | asset Type:video / image |
| inputUrl | string | Yes | video/image URL, can |
| upscaleFactor | string | No | output:1 / 2 / 4, localized example text2 |
| duration | int | (type=video) | videoDuration (seconds),.type=image when |
| taskNickname | string | No | Task label, in /tasklist in |
| callbackUrl | string | No | Callback notification URL after the task is complete |
upscaleFactorDescription:localized example textx(2xetc.2).in1/2/4when endpoint return ParameterError.
localized example text:upscaleFactor, video and image——
| type | upscaleFactor | localized example text|
|------|---------------|---------|
|video|4| 4 localized example text|
|video|1/2| 1x/2x localized example text|
|image|4| 4K localized example text|
|image|1/2| 2K localized example text|
asset Limit| type | Format | size|
|------|------|---------|
| video | MP4 / MOV / MKV | 50 MB |
| image | JPEG / PNG / WebP | 10 MB |
Limit asset will in task execute Failure, Failure,.
Request Example
videolocalized example text
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/topaz-upscale" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"type": "video",
"inputUrl": "https://example.com/source_480p.mp4",
"upscaleFactor": "2",
"duration": 8,
"taskNickname": "localized example text",
"callbackUrl": "https://your-domain.com/callback/upscale"
}'imagelocalized example text
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/topaz-upscale" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"type": "image",
"inputUrl": "https://example.com/source.png",
"upscaleFactor": "4",
"taskNickname": "image"
}'Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | Status Code, 0 indicates success |
| msg | string | Message |
| data.taskId | string | Task ID, used to query task status |
| data.status | string | Task Status, fixed to processing |
| data.createdAt | string | Created Time |
Response Example
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260915104408_abc12345",
"status": "processing",
"createdAt": "2026-09-15 10:44:08"
}
}Query Task Status
GET /api/v2/open/aigc/{taskId}
curl -X GET "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/task_20260915104408_abc12345" \
-H "Authorization: Bearer your_auth_token_here"Response Parameters
| Parameter | Type | Description |
|---|---|---|
| data.taskId | string | Task ID |
| data.status | string | Task Status:processing / success / failed |
| data.result | array | Successreturned when applicableafter file,result[0] as |
| data.errorMsg | string | Failure, onlyfailed returned when applicable |
| data.createdAt | string | Created Time |
| data.updatedAt | string | after Updated Time |
Response Example
processing
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260915104408_abc12345",
"status": "processing",
"createdAt": "2026-09-15 10:44:08",
"updatedAt": "2026-09-15 10:44:12"
}
}Success
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260915104408_abc12345",
"status": "success",
"result": [
"https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20260915/task_20260915104408_abc12345_0.mp4"
],
"createdAt": "2026-09-15 10:44:08",
"updatedAt": "2026-09-15 10:45:35"
}
}Failure
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260915104408_abc12345",
"status": "failed",
"errorMsg": "task execute Failure",
"createdAt": "2026-09-15 10:44:08",
"updatedAt": "2026-09-15 10:45:02"
}
}Callback Notification
Create Task when providecallbackUrl, taskcomplete (Success or Failure) when will URL POST.
Headers
Content-Type: application/json
X-Funcloud-Event: task.completed
X-Funcloud-Signature: {localized example text}Body
{
"event": "task.completed",
"taskId": "task_20260915104408_abc12345",
"status": "success",
"result": [
"https://fc-gw-sh.oss-accelerate.aliyuncs.com/downloads/20260915/task_20260915104408_abc12345_0.mp4"
],
"errorMsg": "",
"timestamp": "2026-09-15T10:45:35+08:00",
"signature": "a1b2c3d4e5f6..."
}return 2xx Status Code, when exceeds 10 seconds, as Failure.as, recommended when Polling.
Billing
- video:localized example textlocalized example text× Duration (seconds), 1 seconds 1 seconds.
- image:localized example textlocalized example text× images, Request images.
- reference Pricing or.
- Create Taskwhen
duration; taskSuccessafter, taskFailurelocalized example text.
videoDuration:taskcomplete after will Duration, and create whenlocalized example text.
localized example textdurationwill, Duration; in when.
recommended, and.
Error Codes
| code | Description |
|---|---|
| 0 | Success |
| 10002 | Parametermissing or malformed (localized example texttype,inputUrl as,type=video when notduration) |
| 10005 | API Key invalid or missing |
| 10006 | Insufficient balance |
| 30003 | Task not found |
| 90003 | Internal server error |
Best Practices
- file can:
inputUrlas no, can, task will FailureFailure (Failure, ). - localized example text
duration:videoDuration, will, will and.recommendedfirst videoseconds. - localized example text:, file
1(Resolution);2;, Requirements height4, when and. - asset:video 50 MB, image 10 MB, videorecommended.
- Pollinglocalized example text:
- First 30 seconds:query every 3 seconds
- 30 seconds ~ 2 minutes:query every 5 seconds
- After 2 minutes:query every 10 seconds
- localized example text:localized example text
callbackUrlcan Polling, when Polling as.