Hailuo Text to Video
curl --request POST \
--url https://api.powertokens.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-Hailuo-2.3",
"prompt": "A woman walks through a neon street in the rain.",
"seconds": "6",
"size": "1080P"
}
'import requests
url = "https://api.powertokens.ai/v1/videos"
payload = {
"model": "MiniMax-Hailuo-2.3",
"prompt": "A woman walks through a neon street in the rain.",
"seconds": "6",
"size": "1080P"
}
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-Hailuo-2.3',
prompt: 'A woman walks through a neon street in the rain.',
seconds: '6',
size: '1080P'
})
};
fetch('https://api.powertokens.ai/v1/videos', 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.powertokens.ai/v1/videos",
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-Hailuo-2.3',
'prompt' => 'A woman walks through a neon street in the rain.',
'seconds' => '6',
'size' => '1080P'
]),
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.powertokens.ai/v1/videos"
payload := strings.NewReader("{\n \"model\": \"MiniMax-Hailuo-2.3\",\n \"prompt\": \"A woman walks through a neon street in the rain.\",\n \"seconds\": \"6\",\n \"size\": \"1080P\"\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.powertokens.ai/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-Hailuo-2.3\",\n \"prompt\": \"A woman walks through a neon street in the rain.\",\n \"seconds\": \"6\",\n \"size\": \"1080P\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.powertokens.ai/v1/videos")
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-Hailuo-2.3\",\n \"prompt\": \"A woman walks through a neon street in the rain.\",\n \"seconds\": \"6\",\n \"size\": \"1080P\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"task_id": "<string>",
"object": "video",
"model": "<string>",
"status": "queued",
"progress": 0,
"created_at": 123
}{
"code": "bad_request_body",
"message": "Malformed request body or invalid field value",
"data": null
}{
"code": "access_denied",
"message": "Invalid token",
"data": null
}{
"code": "read_request_body_failed",
"message": "Request body too large, please reduce the input and retry",
"data": null
}{
"code": "insufficient_user_quota",
"message": "Insufficient account quota, please try again later",
"data": null
}{
"code": "gen_relay_info_failed",
"message": "Internal processing failed, please try again later",
"data": null
}{
"code": "bad_response_status_code",
"message": "The upstream provider returned an invalid response",
"data": null
}{
"code": "get_channel_failed",
"message": "No available channel for the current model, please try again later",
"data": null
}MiniMax
MiniMax-Hailuo-2.3 Text to Video
Applies to MiniMax-Hailuo-2.3 Text to Video model. After submitting a task, query its status via GET /v1/videos/{task_id}.
Public fields: model, prompt, seconds, size.
POST
/
v1
/
videos
Hailuo Text to Video
curl --request POST \
--url https://api.powertokens.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-Hailuo-2.3",
"prompt": "A woman walks through a neon street in the rain.",
"seconds": "6",
"size": "1080P"
}
'import requests
url = "https://api.powertokens.ai/v1/videos"
payload = {
"model": "MiniMax-Hailuo-2.3",
"prompt": "A woman walks through a neon street in the rain.",
"seconds": "6",
"size": "1080P"
}
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-Hailuo-2.3',
prompt: 'A woman walks through a neon street in the rain.',
seconds: '6',
size: '1080P'
})
};
fetch('https://api.powertokens.ai/v1/videos', 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.powertokens.ai/v1/videos",
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-Hailuo-2.3',
'prompt' => 'A woman walks through a neon street in the rain.',
'seconds' => '6',
'size' => '1080P'
]),
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.powertokens.ai/v1/videos"
payload := strings.NewReader("{\n \"model\": \"MiniMax-Hailuo-2.3\",\n \"prompt\": \"A woman walks through a neon street in the rain.\",\n \"seconds\": \"6\",\n \"size\": \"1080P\"\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.powertokens.ai/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"MiniMax-Hailuo-2.3\",\n \"prompt\": \"A woman walks through a neon street in the rain.\",\n \"seconds\": \"6\",\n \"size\": \"1080P\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.powertokens.ai/v1/videos")
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-Hailuo-2.3\",\n \"prompt\": \"A woman walks through a neon street in the rain.\",\n \"seconds\": \"6\",\n \"size\": \"1080P\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"task_id": "<string>",
"object": "video",
"model": "<string>",
"status": "queued",
"progress": 0,
"created_at": 123
}{
"code": "bad_request_body",
"message": "Malformed request body or invalid field value",
"data": null
}{
"code": "access_denied",
"message": "Invalid token",
"data": null
}{
"code": "read_request_body_failed",
"message": "Request body too large, please reduce the input and retry",
"data": null
}{
"code": "insufficient_user_quota",
"message": "Insufficient account quota, please try again later",
"data": null
}{
"code": "gen_relay_info_failed",
"message": "Internal processing failed, please try again later",
"data": null
}{
"code": "bad_response_status_code",
"message": "The upstream provider returned an invalid response",
"data": null
}{
"code": "get_channel_failed",
"message": "No available channel for the current model, please try again later",
"data": null
}Authorizations
Pass Authorization: Bearer <token> in the request header.
Body
application/json
Model name for this capability.
Available options:
MiniMax-Hailuo-2.3 Video prompt.
Maximum string length:
2000Target video duration in seconds. (1080P only supports 6 seconds.)
Available options:
6, 10 Target output resolution. Text to Video models currently support 768P and 1080P.
Available options:
768P, 1080P ⌘I