Documentation / ConvertRetrieve a list of conversion results
This is a REST API that returns AVIF conversion requested results.Request
curl -x GET
https://avif-service-api.kokoon.cloud/avif/convert/tasks/{id}/results
-H "Authorization: <api_key>"
-H "Accept: application/json"
List of request parameters
Parameter name | Type | Description |
---|
id | string | conversion id. |
Response
{
"id" : "835f24b0-90be-11ed-b598-cbb34621d6d4",
"step" : "finish",
"src" : {
"filename": "example1.jpeg",
"size" : 104860,
"width" : 1280,
"height" : 720
},
"request_time" : "2022-12-14T03:00:01.514Z",
"finish_time" : "2022-12-14T03:00:03.514Z",
"convert_results": [
{
"size": 3224,
"url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/worst.avif",
"compression_ratio": "level0"
}, {
"size": 5896,
"url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/bad.avif",
"compression_ratio": "level1"
}, {
"size": 10580,
"url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/good.avif",
"compression_ratio": "level2"
}, {
"size": 15024,
"url": "https://avif-api.kokoon.cloud/avif/convert/tasks/f06a09c0-76b6-11ed-afae-570de5d298a7/results/best.avif",
"compression_ratio": "level3"
}
]
}
List of response parameters
Response field | Type | Description |
---|
id | string | conversion id |
step | wait, finish, convert, upload | Indicates the conversion progress. wait, finish, convert, upload |
src.filename | string | The name of the src file. |
src.size | number | The size of the src file. (bytes) |
src.width | number | The width of the src file. (px) |
src.height | number | The height of the src file. (px) |
request_time | string | Time at which AVIF conversion was requested. |
finish_time | string | Time at which AVIF conversion was completed. |
convert_results.url | string | This is the url of the converted image. |
convert_results.compression_ratio | level0, level1, level2, level3 | The name of the compression_ratio option of the converted result image. |
convert_results.size | number | This is the size of the converted result image file. (bytes) |
Response error
Error name | Status | Description |
---|
Not found | 404 | This error occurs when there is no conversion corresponding to the requested conversion id. |