import axios from 'axios';
axios.post('https://api.artificialstudio.ai/api/generate', {
model: 'extend-video',
input: {
file : "https://files.artificialstudio.ai/efdf7317-7251-4cba-ba7a-a744c5d53e08.mp4",
prompt : "The cup continues to fill and starts to catch fire"
},
webhook: 'https://your-webhook-url.com/api/webhook',
}, {
headers: {
'Content-Type': 'application/json',
'Authorization': 'YOUR_API_KEY'
}
}).then(res => {
console.log('Success:', res.data);
}).catch(error => {
console.error('Error:', error);
});
app.post("/api/webhook", (req: any, res: any) => {
console.log(req.body) // id, output, status, model, payload, error...
res.send("Webhook received");
});