Kling 1.0: Image to Video
Create videos from an image
1. Authentication
To start using the Artificial Studio API, you first need to generate an API KEY.
2. Code integration
You can use the following example to start generating content with the API.
import axios from 'axios';

axios.post('https://api.artificialstudio.ai/api/generate', {
    model: 'kling-image-to-video',
    input: {
        prompt : "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse.",
        file : "https://fal.media/files/panda/TuXlMwArpQcdYNCLAEM8K.webp"
    },
    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);
});
3. Webhook
The content generation using the Artificial Studio API has a processing time. Therefore, you need to provide a POST webhook url so we can notify you once the result is ready.
app.post("/api/webhook", (req: any, res: any) => {

    console.log(req.body) // id, output, status, model, payload, error...

    res.send("Webhook received");

});