// Our mission at Coconut is to make cloud video transcoding simple
const coconut = new Coconut.Client('api-key');
coconut.notification = {
'url': 'https://app/api/coconut/webhook'
};
coconut.storage = {
'service': 's3',
'bucket': 'mybucket',
'region': 'us-east-1',
'credentials': { 'access_key_id': 'xxx', 'secret_access_key': 'xxx' }
};
coconut.Job.create({
'input': { 'url': 'https://cdn/path/file.mp4' },
'outputs': {
'gif:300x': {
'path': '/animation.gif',
'scene': {
'number': 5,
'duration': 1
}
}
}
}, function(job, err) {
...
});