Video Generation
Generate videos with any video model available on ImageRouter.
Videos are in Beta, this API can change later.
curl 'https://api.imagerouter.io/v1/openai/videos/generations' \-H 'Authorization: Bearer YOUR_API_KEY' \-H 'Content-Type: application/json' \--data-raw '{"prompt": "YOUR_PROMPT", "model": "ir/test-video"}'
const url = 'https://api.imagerouter.io/v1/openai/videos/generations';const options = { method: 'POST', headers: {Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}, body: '{"prompt": "YOUR_PROMPT", "model": "ir/test-video"}'};
const response = await fetch(url, options);const data = await response.json();console.log(data);
import requests
url = "https://api.imagerouter.io/v1/openai/videos/generations"payload = { "prompt": "YOUR_PROMPT", "model": "ir/test-video"}headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)print(response.json())
Parameters
prompt
* Text prompt for generating the video.model
* Video model to use.size
Optional resolution (eg1024x576
). Defaults to the model’s native size.response_format
[url, b64_json] - defaulturl
.image[]
* One or more input images (maximum 16).