| | --- |
| | 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() |
| |
|