ModelFold - Video Upscale
Endpoint
POST /jobs/createTask
Full URL: https://modelfold.ai/v1/jobs/createTask
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Upscale a source video to 1080P, 2K, or 4K while keeping the original aspect ratio, frame rate, frame count, and audio.
resolution is an output box. The source is fitted into the selected box until one side meets the edge; the picture is not cropped. If the source is larger than that box, it is scaled down to the box and enhanced; if it already matches the box, it is enhanced at the same size. The output always matches the box you select.
Input limits
- Publicly downloadable HTTP(S) video URL
- File size ≤ 50 MB
- Duration ≤ 60 seconds
- Accepted formats: MP4, MOV, and MKV
- Duration and file size are validated after download, so over-limit videos fail the task rather than the submit request
Output
| resolution | Landscape box | Portrait box |
|---|---|---|
1080P | 1920×1080 | 1080×1920 |
2K (default) | 2560×1440 | 1440×2560 |
4K | 3840×2160 | 2160×3840 |
- Container: MP4 (H.264 + AAC). Audio is preserved when the source has a soundtrack
- Width and height are always even
- Result URL expires after about 14 days — download and store it if you need it longer
- Processing time scales with frame count and output pixels (a ~8s 1080p clip to 2K is typically around 30–40 seconds of processing, excluding queue)
Create Task
Submit with model=video/upscale on the unified task endpoint.
- Get Task Details — After submission, use the unified query endpoint to check task progress and retrieve results
TIP
For production use, we recommend providing the callBackUrl parameter so your service can receive completion notifications instead of polling for task status. Callbacks may be delivered more than once — deduplicate by taskId.
Related Resources
- Market Overview — Explore all available models
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be video/upscale for this endpoint Default:"video/upscale"。 Allowed values:video/upscale。 Example:video/upscale。 |
callBackUrl | string | No | The URL to receive generation task completion updates. Optional but recommended for production use. - System will POST task status and results to this URL when generation completes - Callback includes generated content URLs and task information - Your callback endpoint should accept POST requests with JSON payload containing results - Alternatively, use the Get Task Details endpoint to poll task status - Callbacks may be delivered more than once — deduplicate by taskId- To ensure callback security, see Webhook Verification Guide for signature verification implementation Example: https://your-domain.com/api/callback。 |
input | object | Yes | Input parameters for the generation task |
input.video_url | string | Yes | URL of the video to upscale. Required. - Must be a publicly downloadable HTTP(S) URL - Max file size: 50 MB; max duration: 60 seconds - Accepted formats: MP4, MOV, and MKV - Use a file URL after upload, not the file content itself Example: https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4。 |
input.resolution | string | No | Target output box. Optional. Allowed values: 1080P, 2K, 4K (uppercase, exactly as shown). Default: 2K.- This is an output box: the source is fitted into the box while preserving aspect ratio; nothing is cropped - Sources larger than the box are scaled down to the box and enhanced; sources already at the box are enhanced only, so the output always matches the selected box - Landscape boxes: 1080P 1920×1080, 2K 2560×1440, 4K 3840×2160; portrait boxes are rotated 90° Default: "2K"。 Allowed values:1080P / 2K / 4K。 Example:2K。 |
Request Example
curl -X POST "https://modelfold.ai/v1/jobs/createTask" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "video/upscale",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"video_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4",
"resolution": "2K"
}
}'import os
import requests
resp = requests.post(
"https://modelfold.ai/v1/jobs/createTask",
headers={
"Authorization": "Bearer " + os.environ["MODELFOLD_API_KEY"],
"Content-Type": "application/json",
},
json={
"model": "video/upscale",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"video_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4",
"resolution": "2K",
},
},
)
print(resp.json())const resp = await fetch("https://modelfold.ai/v1/jobs/createTask", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.MODELFOLD_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "video/upscale",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"video_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4",
"resolution": "2K"
}
}),
});
console.log(await resp.json());package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"model":"video/upscale","callBackUrl":"https://your-domain.com/api/callback","input":{"video_url":"https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4","resolution":"2K"}}`)
req, _ := http.NewRequest("POST", "https://modelfold.ai/v1/jobs/createTask", body)
req.Header.Set("Authorization", "Bearer " + os.Getenv("MODELFOLD_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = "{\"model\":\"video/upscale\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":{\"video_url\":\"https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4\",\"resolution\":\"2K\"}}";
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://modelfold.ai/v1/jobs/createTask"))
.header("Authorization", "Bearer " + System.getenv("MODELFOLD_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> resp = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
}
}<?php
$ch = curl_init('https://modelfold.ai/v1/jobs/createTask');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv("MODELFOLD_API_KEY"),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => '{"model":"video/upscale","callBackUrl":"https://your-domain.com/api/callback","input":{"video_url":"https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4","resolution":"2K"}}',
]);
echo curl_exec($ch);
curl_close($ch);using System;
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var req = new HttpRequestMessage(new HttpMethod("POST"), "https://modelfold.ai/v1/jobs/createTask");
req.Headers.TryAddWithoutValidation("Authorization", "Bearer " + Environment.GetEnvironmentVariable("MODELFOLD_API_KEY"));
req.Content = new StringContent("{\"model\":\"video/upscale\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":{\"video_url\":\"https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4\",\"resolution\":\"2K\"}}", Encoding.UTF8, "application/json");
var resp = await client.SendAsync(req);
Console.WriteLine(await resp.Content.ReadAsStringAsync());{
"model": "video/upscale",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"video_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1758166466095hvbwkrpw.mp4",
"resolution": "2K"
}
}Response
200 — Request successful
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_MODELFOLD_video_upscale_example"
}
}500 — Server error.
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | See the response field; handle the returned status before retrying. |
msg | string | 是 | Response message, error description when failed |
data | object | 是 | — |
{
"code": 500,
"msg": "Server Error - An unexpected error occurred while processing the request",
"data": null
}Callback
videoTaskCompleted
Callback URL: {request.body#/callBackUrl} (the callBackUrl in the request body).
The system sends this callback when the video/upscale task succeeds or fails.
Callback body parameters
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 Example:200。 |
msg | string | 是 | Unified callback message. Allowed values:Playground task completed successfully. / Playground task failed.。 Example:Playground task completed successfully.。 |
data | object | 是 | — |
data.taskId | string | 是 | The unique task identifier. |
data.model | string | 是 | The model used for the task. Allowed values:video/upscale。 Example:video/upscale。 |
data.state | string | 是 | Terminal task state. Allowed values:success / fail。 Example:success。 |
data.param | string | 是 | JSON string containing the submitted task parameters. |
data.resultJson | string | 否 | JSON string containing resultUrls when successful. Present only when state is success. Result URLs expire after about 14 days. |
data.failCode | string | 否 | Failure code, a numeric string such as "400" or "500". Present only when state is fail. |
data.failMsg | string | 否 | Failure reason. Present only when state is fail. |
data.costTime | integer | 否 | Processing time in seconds. Present on both success and failure callbacks. |
data.completeTime | integer | 否 | Task completion timestamp. |
data.createTime | integer | 否 | Task creation timestamp. |
data.updateTime | integer | 否 | Use completeTime as the completion time; updateTime may equal createTime. |
Task completed successfully
{
"code": 200,
"msg": "Playground task completed successfully.",
"data": {
"taskId": "task_example_video_webhook_001",
"model": "video/upscale",
"state": "success",
"param": "{\"input\": \"{\\\"video_url\\\": \\\"https://example.com/input-video.mp4\\\", \\\"resolution\\\": \\\"2K\\\"}\", \"callBackUrl\": \"https://example.com/callback\", \"model\": \"video/upscale\"}",
"resultJson": "{\"resultUrls\": [\"https://example.com/generated-video.mp4\"]}",
"costTime": 35,
"completeTime": 1234567890,
"createTime": 1234560000,
"updateTime": 1234567890
}
}Task failed
{
"code": 501,
"msg": "Playground task failed.",
"data": {
"taskId": "task_example_video_webhook_001",
"model": "video/upscale",
"state": "fail",
"param": "{\"input\": \"{\\\"video_url\\\": \\\"https://example.com/input-video.mp4\\\", \\\"resolution\\\": \\\"2K\\\"}\", \"callBackUrl\": \"https://example.com/callback\", \"model\": \"video/upscale\"}",
"failCode": "400",
"failMsg": "<error detail>",
"costTime": 12
}
}