import axios from 'axios';
axios.post('https://api.artificialstudio.ai/api/generate', {
model: 'business-card-designer',
input: {
include_logo : "upload",
business_logo : "https://files.artificialstudio.ai/ffad731c-44f8-421d-a5e7-764e08f907ad.jpeg",
prompt : "Elegant design with geometric patterns in the background and clean typography",
company_name : "Quantum Solutions",
personal_info : "John Smith, Software Architect | [email protected] | (555) 123-4567",
card_style : "modern",
color_scheme : "monochrome"
},
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");
});