
import axios from 'axios';
axios.post('https://api.artificialstudio.ai/api/generate', {
    model: 'edit-image',
    input: {
        input_image : "https://files.artificialstudio.ai/2c671c94-38b5-4ad6-ae0a-a35dc90bcf0e.png",
        prompt : "I want to take down two pictures that are hanging on the wall.",
        model : "flux-kontext"
    },
    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");
});