Skip to content

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 ​

resolutionLandscape boxPortrait box
1080P1920×10801080×1920
2K (default)2560×14401440×2560
4K3840×21602160×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.

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe 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。
callBackUrlstringNoThe 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。
inputobjectYesInput parameters for the generation task
  input.video_urlstringYesURL 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.resolutionstringNoTarget 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 ​

bash
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"
  }
}'
python
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())
javascript
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());
go
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))
}
java
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
<?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);
csharp
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());
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"
  }
}

Response ​

200 — Request successful ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_MODELFOLD_video_upscale_example"
  }
}

500 — Server error. ​

参数类型必填说明
codeinteger是See the response field; handle the returned status before retrying.
msgstring是Response message, error description when failed
dataobject是—
json
{
  "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

参数类型必填说明
codeinteger是Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 Example:200。
msgstring是Unified callback message. Allowed values:Playground task completed successfully. / Playground task failed.。 Example:Playground task completed successfully.。
dataobject是—
  data.taskIdstring是The unique task identifier.
  data.modelstring是The model used for the task. Allowed values:video/upscale。 Example:video/upscale。
  data.statestring是Terminal task state. Allowed values:success / fail。 Example:success。
  data.paramstring是JSON string containing the submitted task parameters.
  data.resultJsonstring否JSON string containing resultUrls when successful. Present only when state is success. Result URLs expire after about 14 days.
  data.failCodestring否Failure code, a numeric string such as "400" or "500". Present only when state is fail.
  data.failMsgstring否Failure reason. Present only when state is fail.
  data.costTimeinteger否Processing time in seconds. Present on both success and failure callbacks.
  data.completeTimeinteger否Task completion timestamp.
  data.createTimeinteger否Task creation timestamp.
  data.updateTimeinteger否Use completeTime as the completion time; updateTime may equal createTime.

Task completed successfully

json
{
  "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

json
{
  "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
  }
}

ModelFold — one API for all the best AI models.