import axios from 'axios';
axios.post('https://api.artificialstudio.ai/api/generate', {
model: 'interior-design',
input: {
prompt : "Transform this room into a Mid-Century Modern design space. Incorporate furniture with clean lines, neutral colors, and accents in mustard and turquoise tones. Add a dark wood coffee table, a sleek floor lamp, and an Eames-style chair. Include a geometric rug and abstract art on the walls. Ensure the lighting is soft and diffused for a cozy atmosphere.",
reference_image : "https://files.artificialstudio.ai/8c42fdde-936b-4de5-95b1-9016a0814393.webp",
image_size : "1024x1024"
},
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");
});