视频 2K 再生成(MiniMax-H3)
curl --request POST \
--url https://api.looprouter.com/v2/video_regeneration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"source_task_id": "424010985738629",
"resolution": "2K"
}
'import requests
url = "https://api.looprouter.com/v2/video_regeneration"
payload = {
"model": "MiniMax-H3",
"source_task_id": "424010985738629",
"resolution": "2K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'MiniMax-H3', source_task_id: '424010985738629', resolution: '2K'})
};
fetch('https://api.looprouter.com/v2/video_regeneration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.looprouter.com/v2/video_regeneration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'MiniMax-H3',
'source_task_id' => '424010985738629',
'resolution' => '2K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.looprouter.com/v2/video_regeneration"
payload := strings.NewReader("{\n \"model\": \"MiniMax-H3\",\n \"source_task_id\": \"424010985738629\",\n \"resolution\": \"2K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.looprouter.com/v2/video_regeneration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-H3\",\n \"source_task_id\": \"424010985738629\",\n \"resolution\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.looprouter.com/v2/video_regeneration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"MiniMax-H3\",\n \"source_task_id\": \"424010985738629\",\n \"resolution\": \"2K\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "424010985999999"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "<string>",
"http_code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "<string>",
"http_code": "<string>"
},
"request_id": "<string>"
}MiniMax 系列
视频再生 768P → 2K
基于源视频重新生成 2K 视频。两种入参二选一:
方式一传 source_task_id(引用已成功的生成任务);方式二传 content(包含全部原始输入 + 恰好一个 role=base_video 的源视频)。
输出分辨率恒为 2K,task_type 回显 regeneration。
POST
/
v2
/
video_regeneration
视频 2K 再生成(MiniMax-H3)
curl --request POST \
--url https://api.looprouter.com/v2/video_regeneration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"source_task_id": "424010985738629",
"resolution": "2K"
}
'import requests
url = "https://api.looprouter.com/v2/video_regeneration"
payload = {
"model": "MiniMax-H3",
"source_task_id": "424010985738629",
"resolution": "2K"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'MiniMax-H3', source_task_id: '424010985738629', resolution: '2K'})
};
fetch('https://api.looprouter.com/v2/video_regeneration', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.looprouter.com/v2/video_regeneration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'MiniMax-H3',
'source_task_id' => '424010985738629',
'resolution' => '2K'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.looprouter.com/v2/video_regeneration"
payload := strings.NewReader("{\n \"model\": \"MiniMax-H3\",\n \"source_task_id\": \"424010985738629\",\n \"resolution\": \"2K\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.looprouter.com/v2/video_regeneration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-H3\",\n \"source_task_id\": \"424010985738629\",\n \"resolution\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.looprouter.com/v2/video_regeneration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"MiniMax-H3\",\n \"source_task_id\": \"424010985738629\",\n \"resolution\": \"2K\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "424010985999999"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "<string>",
"http_code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "<string>",
"http_code": "<string>"
},
"request_id": "<string>"
}授权
LoopRouter API Key(sk- 开头),在控制台「令牌」页创建
请求体
application/json
响应
任务创建成功
任务 ID,用于查询任务状态