Video / Topaz

Topaz localized example text## Overview

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 returntaskId, status asprocessing.
  • localized example text「Pollingquery endpoint」or「Callback Notification」, can.
  • taskSuccessafterresult[0] as after file.

create task**POST** /api/v2/open/aigc/topaz-upscale

Request Parameters

ParameterTypeRequiredDescription
typestringYesasset Type:video / image
inputUrlstringYesvideo/image URL, can
upscaleFactorstringNooutput:1 / 2 / 4, localized example text2
durationint(type=video)videoDuration (seconds),.type=image when
taskNicknamestringNoTask label, in /tasklist in
callbackUrlstringNoCallback notification URL after the task is complete
upscaleFactor Description:localized example textx (2x etc.2).in1 / 2 / 4 when 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

ParameterTypeDescription
codeintStatus Code, 0 indicates success
msgstringMessage
data.taskIdstringTask ID, used to query task status
data.statusstringTask Status, fixed to processing
data.createdAtstringCreated 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

ParameterTypeDescription
data.taskIdstringTask ID
data.statusstringTask Status:processing / success / failed
data.resultarraySuccessreturned when applicableafter file,result[0] as
data.errorMsgstringFailure, onlyfailed returned when applicable
data.createdAtstringCreated Time
data.updatedAtstringafter 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 Taskwhenduration; taskSuccessafter, taskFailurelocalized example text.
videoDuration:taskcomplete after will Duration, and create whenlocalized example text.
localized example textduration will, Duration; in when.
recommended, and.

Error Codes

codeDescription
0Success
10002Parametermissing or malformed (localized example texttype,inputUrl as,type=video when notduration)
10005API Key invalid or missing
10006Insufficient balance
30003Task not found
90003Internal server error

Best Practices

  1. file can:inputUrl as no, can, task will FailureFailure (Failure, ).
  2. localized example textduration:videoDuration, will, will and.recommendedfirst videoseconds.
  3. localized example text:, file1 (Resolution);2;, Requirements height4, when and.
  4. asset:video 50 MB, image 10 MB, videorecommended.
  5. Pollinglocalized example text:
  6. First 30 seconds:query every 3 seconds
  7. 30 seconds ~ 2 minutes:query every 5 seconds
  8. After 2 minutes:query every 10 seconds
  9. localized example text:localized example textcallbackUrl can Polling, when Polling as.
Updated 2026-09-15