Call it
curl https://api.peume.com/v1/call/text-to-video-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"prompt_extend": true,
"watermark": false
}
}'const res = await fetch("https://api.peume.com/v1/call/text-to-video-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"prompt_extend": true,
"watermark": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/text-to-video-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"prompt_extend": True,
"watermark": False
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: text-to-video-2.
Parameters
promptRequiredstringText prompt describing the video content and style (max 5,000 characters — longer text is silently truncated upstream).
negative_promptstringElements to exclude from the video (max 500 characters).
audio_urlstringPublic URL of a driving audio file (WAV/MP3, 2-30s, <=15MB). Without it the model auto-generates matching music or sound effects.
resolutionstringOutput resolution tier (also the price selector). Default 720P.
720P · 1080P
Example: 720P
ratiostringAspect ratio of the output video. Default 16:9.
16:9 · 9:16 · 1:1 · 4:3 · 3:4
Example: 16:9
durationintegerOutput duration in seconds (2-15). Default 5. Billing is per second.
Example: 5
prompt_extendbooleanRewrite the prompt with an LLM to improve quality (best for short prompts; adds latency). Default true.
Example: true
watermarkbooleanAdd an "AI Generated" watermark. Default false.
Example: false
seedintegerRandom seed for reproducibility. Same seed does not guarantee identical results.
