File size: 748 Bytes
566ec1f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ---
license: apache-2.0
---
const main = async () => {
const response = await fetch('https://api.aimlapi.com/v2/video/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'openai/sora-2-t2v',
prompt: 'A DJ on the stand is playing, around a World War II battlefield, lots of explosions, thousands of dancing soldiers, between tanks shooting, barbed wire fences, lots of smoke and fire, black and white old video: hyper realistic, photorealistic, photography, super detailed, very sharp, on a very white background',
}),
}).then((res) => res.json());
console.log('Generation:', response);
};
main()
|