API URL:
Method:POST
https://image-gif.denda.ro/api/v1/convert/create-image/<<Api KEY>>
Parameters:
The number of images that can be converted is limited by the api to prevent possible crashes.
'Content-Type': 'application/json'
{
"gif_width" : 400 || 800 || 1000 ...,
"gif_height" : 400 || 800 || 1000 ... "youtube"
"gif_delay" : 0.5 || 1 || 2 ...(seconds),
"gif_quality" : min:50 - max:100,
"images" : [ 'https://site.com/image.jpg', 'https://site.com/image.png', 'https://site.com/image.webp' ,.....],
}
Code snippet:
let header = new Headers();
header.append("Content-Type", "application/json");
let data = JSON.stringify({
"gif_width": 400,
"gif_height":400,
"gif_delay": 1,
"gif_quality": 100,
"images":[ images url ]
});
let options = {
method: 'POST',
headers: header,
body: data,
redirect: 'follow'
};
fetch("https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>", options)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({
"gif_width": 400,
"gif_height":400,
"gif_delay": 1,
"gif_quality": 100,
"images":[ images url ]
});
let config = {
method: 'post',
url:"https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>",
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"gif_width":400,
"gif_height":400,
"gif_delay":0.5,
"gif_quality":100,
"images":[ images url ]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo '<pre>';
print_r($response);
echo '<pre>';
curl_close($curl);
let settings = {
"url": "https://image-gif.denda.ro/api/v1/convert/create-image/<<APY KEY>>",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({
"gif_width": 400,
"gif_height":400,
"gif_delay": 1,
"gif_quality": 100,
"images":[ images url ]
}),
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Response:
Appears when all functions are executed without problem.
{
"status":"success",
"gif":"https://image-gif.denda.ro/file.gif"
}
Occurs when none of the images have passed link verification.
{
"status":"failed",
"error":"Invalid images"
}
It can be caused by incorrect image saving.
{
"status":"failed",
"error":"Saved images are incomplete:(error)"
}
It can be caused by an incorrect image conversion.
{
"status":"failed",
"error":"Image conversion incomplete:(error)"
}
It is caused by the incorrect creation of the gif file.
{
"status":"failed",
"error":"Error create gif: (error)"
}
Appears when the number of allowed images has been exceeded.
{
"status":"failed",
"error":"The allowed image limit has been exceeded"
}
Appears when fields have values that are not supported.
{
"status":"failed",
"error":"Invalid field type"
}
The fields cannot have values less than or equal to 0.
{
"status":"failed",
"error":"Field value can equal or less that 0"
}