提示增强 Context-IR(MiniMax-H3)(特惠版)
curl --request POST \
--url https://api.looprouter.com/special/v2/h3_context_ir \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "一个男孩在海边打篮球"
}
],
"duration": 5,
"ratio": "16:9"
}
'import requests
url = "https://api.looprouter.com/special/v2/h3_context_ir"
payload = {
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "一个男孩在海边打篮球"
}
],
"duration": 5,
"ratio": "16:9"
}
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: '一个男孩在海边打篮球'}],
duration: 5,
ratio: '16:9'
})
};
fetch('https://api.looprouter.com/special/v2/h3_context_ir', 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/h3_context_ir",
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' => '一个男孩在海边打篮球'
]
],
'duration' => 5,
'ratio' => '16:9'
]),
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/h3_context_ir"
payload := strings.NewReader("{\n \"model\": \"MiniMax-H3\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"一个男孩在海边打篮球\"\n }\n ],\n \"duration\": 5,\n \"ratio\": \"16:9\"\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/h3_context_ir")
.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 \"duration\": 5,\n \"ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.looprouter.com/special/v2/h3_context_ir")
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 \"duration\": 5,\n \"ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "426586401755526"
}{
"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 特惠版
特惠提示词增强
异步提示词增强,不生成视频;duration为4–15秒整数。完成后从task.content.prompt取文本。特惠版不产生官方token用量,不将上游耗时或金额伪装为token。
POST
/
special
/
v2
/
h3_context_ir
提示增强 Context-IR(MiniMax-H3)(特惠版)
curl --request POST \
--url https://api.looprouter.com/special/v2/h3_context_ir \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "一个男孩在海边打篮球"
}
],
"duration": 5,
"ratio": "16:9"
}
'import requests
url = "https://api.looprouter.com/special/v2/h3_context_ir"
payload = {
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "一个男孩在海边打篮球"
}
],
"duration": 5,
"ratio": "16:9"
}
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: '一个男孩在海边打篮球'}],
duration: 5,
ratio: '16:9'
})
};
fetch('https://api.looprouter.com/special/v2/h3_context_ir', 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/h3_context_ir",
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' => '一个男孩在海边打篮球'
]
],
'duration' => 5,
'ratio' => '16:9'
]),
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/h3_context_ir"
payload := strings.NewReader("{\n \"model\": \"MiniMax-H3\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"一个男孩在海边打篮球\"\n }\n ],\n \"duration\": 5,\n \"ratio\": \"16:9\"\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/h3_context_ir")
.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 \"duration\": 5,\n \"ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.looprouter.com/special/v2/h3_context_ir")
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 \"duration\": 5,\n \"ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "426586401755526"
}{
"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
响应
任务创建成功
任务 ID,用于查询任务状态