Discussions

Ask a Question
Back to All

CLIPS API RETURNS URL WHICH IS NOT PLAYABLE

using this code

var axios = require('axios');
var data = JSON.stringify({
"driver_id": "uM00QMwJ9x",
"script": {
"type": "text",
"provider": {
"type": "microsoft",
"voice_id": "en-US-JennyNeural"
},
"ssml": "false",
"input": "helloworld"
},
"config": {
"result_format": "mov"
},
"presenter_config": {
"crop": {
"type": "rectangle",
"rectangle": {
"bottom": "1",
"right": "1",
"left": "1",
"top": "1"
}
}
},
"presenter_id": "amy-jcwCkr1grs"
});

var config = {
method: 'post',
url: 'https://api.d-id.com/clips',
headers: {
'accept': 'application/json',
'content-type': 'application/json',
'authorization': 'Basic YOUR_API_KEY'
},
data : data
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});

var axios = require('axios');

var config = {
method: 'get',
url: 'https://api.d-id.com/clips/clp_i9_Gp74i8wB8uBylve5W4',
headers: {
'accept': 'application/json',
'authorization': 'Basic YOUR_API_KEY'
}
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});

result_url:

"result_url": "https://d-id-clips-prod.s3.us-west-2.amazonaws.com/google-oauth2%7C115168697015553986493/clp_i9_Gp74i8wB8uBylve5W4/amy-jcwCkr1grs.mov?AWSAccessKeyId=AKIA5CUMPJBIJ7CPKJNP&Expires=1687421399&Signature=qb0%2B3DcLxBMMexxg83ZNX5%2B%2FXWk%3D&X-Amzn-Trace-Id=Root%3D1-6492b057-1659eee2798d15dd339cfce0%3BParent%3D264e27e94fcaf970%3BSampled%3D0%3BLineage%3D84e41ec0%3A0",

this url is not playable and when downloaded opens a text file