curl --request POST 'https://restapi.scalingtensor.com/api/media/generate' \
--header 'apiKey: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "MiniMax-H3-Max",
"params": {
"model": "MiniMax-H3-Max",
"ratio": "16:9",
"content": [
{
"text": "Epic space-opera theatrical teaser: a female captain stands alone before a massive observation window as the last fleet gathers and jumps away in a blinding flash, the bridge shaking, leaving her behind.",
"type": "text"
}
],
"duration": 5,
"resolution": "768P"
}
}'
const response = await fetch("https://restapi.scalingtensor.com/api/media/generate", {
method: "POST",
headers: {
apiKey: process.env.SCALINGTENSOR_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "MiniMax-H3-Max",
"params": {
"model": "MiniMax-H3-Max",
"ratio": "16:9",
"content": [
{
"text": "Epic space-opera theatrical teaser: a female captain stands alone before a massive observation window as the last fleet gathers and jumps away in a blinding flash, the bridge shaking, leaving her behind.",
"type": "text"
}
],
"duration": 5,
"resolution": "768P"
}
}),
});
const result = await response.json();
if (!response.ok || result.code !== 0) {
throw new Error(result.msg || `Request failed: ${response.status}`);
}
console.log(result.data); // Save data.jobId to query /api/media/result
import os
import requests
payload = {
"model": "MiniMax-H3-Max",
"params": {
"model": "MiniMax-H3-Max",
"ratio": "16:9",
"content": [
{
"text": "Epic space-opera theatrical teaser: a female captain stands alone before a massive observation window as the last fleet gathers and jumps away in a blinding flash, the bridge shaking, leaving her behind.",
"type": "text",
},
],
"duration": 5,
"resolution": "768P",
},
}
response = requests.post(
"https://restapi.scalingtensor.com/api/media/generate",
headers={"apiKey": os.environ["SCALINGTENSOR_API_KEY"]},
json=payload,
timeout=60,
)
result = response.json()
if result["code"] != 0:
raise RuntimeError(result["msg"])
print(result["data"]) # Save data["jobId"] to query /api/media/result