视频 2K 再生成(MiniMax-H3)(特惠版)
curl --request POST \
--url https://api.looprouter.com/special/v2/video_regeneration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "原始生成时实际使用的完整提示词"
},
{
"type": "video_url",
"video_url": {
"url": "https://media.example.com/original-768p.mp4"
},
"role": "base_video"
}
],
"resolution": "2K"
}
'import requests
url = "https://api.looprouter.com/special/v2/video_regeneration"
payload = {
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "原始生成时实际使用的完整提示词"
},
{
"type": "video_url",
"video_url": { "url": "https://media.example.com/original-768p.mp4" },
"role": "base_video"
}
],
"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',
content: [
{type: 'text', text: '原始生成时实际使用的完整提示词'},
{
type: 'video_url',
video_url: {url: 'https://media.example.com/original-768p.mp4'},
role: 'base_video'
}
],
resolution: '2K'
})
};
fetch('https://api.looprouter.com/special/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/special/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',
'content' => [
[
'type' => 'text',
'text' => '原始生成时实际使用的完整提示词'
],
[
'type' => 'video_url',
'video_url' => [
'url' => 'https://media.example.com/original-768p.mp4'
],
'role' => 'base_video'
]
],
'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/special/v2/video_regeneration"
payload := strings.NewReader("{\n \"model\": \"MiniMax-H3\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"原始生成时实际使用的完整提示词\"\n },\n {\n \"type\": \"video_url\",\n \"video_url\": {\n \"url\": \"https://media.example.com/original-768p.mp4\"\n },\n \"role\": \"base_video\"\n }\n ],\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/special/v2/video_regeneration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-H3\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"原始生成时实际使用的完整提示词\"\n },\n {\n \"type\": \"video_url\",\n \"video_url\": {\n \"url\": \"https://media.example.com/original-768p.mp4\"\n },\n \"role\": \"base_video\"\n }\n ],\n \"resolution\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.looprouter.com/special/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 \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"原始生成时实际使用的完整提示词\"\n },\n {\n \"type\": \"video_url\",\n \"video_url\": {\n \"url\": \"https://media.example.com/original-768p.mp4\"\n },\n \"role\": \"base_video\"\n }\n ],\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>"
}{
"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-H3 特惠版
特惠视频再生成
根据原始最终提示词及素材,基于源视频重新生成 2K 视频。可传本账号特惠版已成功生成任务的source_task_id,或content内包含恰好一个role=base_video项;两种方式互斥,首尾帧与普通参考素材不能混用。源视频须满足上游音轨、24fps、32倍数尺寸及帧数要求;不能将任意视频视为兼容输入。
POST
/
special
/
v2
/
video_regeneration
视频 2K 再生成(MiniMax-H3)(特惠版)
curl --request POST \
--url https://api.looprouter.com/special/v2/video_regeneration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "原始生成时实际使用的完整提示词"
},
{
"type": "video_url",
"video_url": {
"url": "https://media.example.com/original-768p.mp4"
},
"role": "base_video"
}
],
"resolution": "2K"
}
'import requests
url = "https://api.looprouter.com/special/v2/video_regeneration"
payload = {
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "原始生成时实际使用的完整提示词"
},
{
"type": "video_url",
"video_url": { "url": "https://media.example.com/original-768p.mp4" },
"role": "base_video"
}
],
"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',
content: [
{type: 'text', text: '原始生成时实际使用的完整提示词'},
{
type: 'video_url',
video_url: {url: 'https://media.example.com/original-768p.mp4'},
role: 'base_video'
}
],
resolution: '2K'
})
};
fetch('https://api.looprouter.com/special/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/special/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',
'content' => [
[
'type' => 'text',
'text' => '原始生成时实际使用的完整提示词'
],
[
'type' => 'video_url',
'video_url' => [
'url' => 'https://media.example.com/original-768p.mp4'
],
'role' => 'base_video'
]
],
'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/special/v2/video_regeneration"
payload := strings.NewReader("{\n \"model\": \"MiniMax-H3\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"原始生成时实际使用的完整提示词\"\n },\n {\n \"type\": \"video_url\",\n \"video_url\": {\n \"url\": \"https://media.example.com/original-768p.mp4\"\n },\n \"role\": \"base_video\"\n }\n ],\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/special/v2/video_regeneration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-H3\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"原始生成时实际使用的完整提示词\"\n },\n {\n \"type\": \"video_url\",\n \"video_url\": {\n \"url\": \"https://media.example.com/original-768p.mp4\"\n },\n \"role\": \"base_video\"\n }\n ],\n \"resolution\": \"2K\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.looprouter.com/special/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 \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"原始生成时实际使用的完整提示词\"\n },\n {\n \"type\": \"video_url\",\n \"video_url\": {\n \"url\": \"https://media.example.com/original-768p.mp4\"\n },\n \"role\": \"base_video\"\n }\n ],\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>"
}{
"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
- Option 1
- Option 2
source_task_id与content二选一;content须包含完整原始素材与一个base_video,prompt为生成源视频时实际使用的最终提示词。
响应
任务创建成功
任务 ID,用于查询任务状态