1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/video-speed-change";
const data = {
"video_url": "https://segmind-inference-inputs.s3.amazonaws.com/0fe371cf-6a26-4db5-a6a4-06d212351eb5-eff3ced3-4c2d-40fc-bb79-f1d03a7ff6d7-video-speed-change.mp4",
"speed_factor": 2
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();Provide the URL of the video
Speed multiplier (0.5 = half speed, 2.0 = double speed)
min : 0.25,
max : 4
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.