Call it
curl https://api.peume.com/v1/call/reference-to-video-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "your prompt",
"media": [],
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"prompt_extend": true
}
}'const res = await fetch("https://api.peume.com/v1/call/reference-to-video-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"prompt": "your prompt",
"media": [],
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"prompt_extend": true
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/reference-to-video-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"prompt": "your prompt",
"media": [],
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"prompt_extend": True
}
},
)
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: reference-to-video-2.
Parameters
promptRequiredstringText prompt (max 5,000 characters). Refer to references by ordinal — "Image 1", "Video 1" — numbered per type in media[] order (images and videos count separately).
negative_promptstringElements to exclude from the video (max 500 characters).
mediaRequiredarrayReference assets: at least one reference_image or reference_video; images + videos <= 5 combined.
resolutionstringOutput resolution tier (also the price selector). Default 720P.
720P · 1080P
Example: 720P
ratiostringAspect ratio. Ignored when a first_frame is provided (the output follows that image).
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.
