import axios from 'axios';
axios.post('https://api.artificialstudio.ai/api/generate', {
model: 'album-cover',
input: {
album_title : "Artificial",
artist_name : "Your band name",
genre : "Rock",
visual_style : "Abstract",
mood : "Energetic",
additional_description : "Create an album cover design inspired by Pink Floyd, featuring surreal and abstract elements, such as a prism dispersing light into vibrant colors. Include floating geometric shapes and dreamlike landscapes with a cosmic backdrop, reminiscent of the 1970s psychedelic rock era. Use a rich color palette, balancing dark and vibrant tones to evoke a sense of mystery and depth."
},
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");
});