🔄Conversions
View available conversions for the File
GET https://uc.alxgsv.com/api/v1/projects/:project_id/files/:file_id/conversions.json
curl -X GET -H "Authorization: Bearer ${SECRET_KEY}" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/files/${FILE_ID}/conversions.json
Path Parameters
project_id*
String
file_id*
String
Headers
Authorization
String
Bearer SECRET_KEY
{
"data": {
"type": "conversions",
"attributes": {
"format_current": "png",
"formats_available": [
"avif",
"bmp",
"gif",
"ico",
"jpg",
"pcx",
"pdf",
"ps",
"svg",
"tga",
"thumbnail",
"tiff",
"wbmp",
"webp"
],
"methods_available": [
"image",
"remove_bg"
]
}
}
}Image conversion
POST https://uc.alxgsv.com/api/v1/projects/:project_id/files/:file_id/conversions/image.json
curl -X POST -H "Authorization: Bearer ${SECRET_KEY}" -d "recipe=/format/webp/" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/files/${FILE_ID}/conversions/image.json
Path Parameters
project_id*
String
file_id*
String
Headers
Authorization*
String
Bearer SECRET_KEY
Request Body
recipe*
String
Conversion recipe
{
"data": {
"type": "files",
"id": "f-KBa6BYyLUrgkk4JrHQydBj",
"attributes": {
"uuid": null,
"is_image": null,
"status": "pending",
"mime": null,
"original_url": null,
"original_name": null,
"size": null,
"chunked_upload": {
"is_chunked_upload": false,
"chunk_size": null,
"is_complete": false
},
"metadata": {},
"content": {
"image": null,
"video": {
"thumbnails_group_uuid": null
}
},
"created_at": "2023-11-18T11:29:40.039Z",
"uploaded_at": null,
"removed_at": null,
"expires_at": null
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "fat-VHGLMLMabtRMEQG7wZrLmA"
},
"chunked_upload_urls": []
}
}Video conversion
POST https://uc.alxgsv.com/api/v1/projects/:project_id/files/:file_id/conversions/video.json
curl -X POST -H "Authorization: Bearer ${SECRET_KEY}" -d "recipe=/format/ogg/-/quality/best/" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/files/${FILE_ID}/conversions/video.json
Path Parameters
project_id*
String
file_id*
String
Headers
Authorization*
String
Bearer SECRET_KEY
Request Body
recipe*
String
Conversion recipe
{
"data": {
"type": "files",
"id": "f-KBa6BYyLUrgkk4JrHQydBj",
"attributes": {
"uuid": null,
"is_image": null,
"status": "pending",
"mime": null,
"original_url": null,
"original_name": null,
"size": null,
"chunked_upload": {
"is_chunked_upload": false,
"chunk_size": null,
"is_complete": false
},
"metadata": {},
"content": {
"image": null,
"video": {
"thumbnails_group_uuid": null
}
},
"created_at": "2023-11-18T11:29:40.039Z",
"uploaded_at": null,
"removed_at": null,
"expires_at": null
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "fat-VHGLMLMabtRMEQG7wZrLmA"
},
"chunked_upload_urls": []
}
}Document conversion
POST https://uc.alxgsv.com/api/v1/projects/:project_id/files/:file_id/conversions/document.json
curl -X POST -H "Authorization: Bearer ${SECRET_KEY}" -d "recipe=/format/png/" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/files/${FILE_ID}/conversions/document.json
Path Parameters
project_id*
String
file_id*
String
Headers
Authorization*
String
Bearer SECRET_KEY
Request Body
recipe*
String
Conversion recipe
{
"data": {
"type": "files",
"id": "f-KBa6BYyLUrgkk4JrHQydBj",
"attributes": {
"uuid": null,
"is_image": null,
"status": "pending",
"mime": null,
"original_url": null,
"original_name": null,
"size": null,
"chunked_upload": {
"is_chunked_upload": false,
"chunk_size": null,
"is_complete": false
},
"metadata": {},
"content": {
"image": null,
"video": {
"thumbnails_group_uuid": null
}
},
"created_at": "2023-11-18T11:29:40.039Z",
"uploaded_at": null,
"removed_at": null,
"expires_at": null
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "fat-VHGLMLMabtRMEQG7wZrLmA"
},
"chunked_upload_urls": []
}
}Background removal conversion
POST https://uc.alxgsv.com/api/v1/projects/:project_id/files/:file_id/conversions/remove_bg.json
curl -X POST -H "Authorization: Bearer ${SECRET_KEY}" -d "recipe=/position/original/" https://uc.alxgsv.com/api/v1/projects/${PROJECT_ID}/files/${FILE_ID}/conversions/remove_bg.json
Path Parameters
project_id*
String
file_id*
String
Headers
Authorization*
String
Bearer SECRET_KEY
Request Body
recipe*
String
Conversion recipe
{
"data": {
"type": "files",
"id": "f-KBa6BYyLUrgkk4JrHQydBj",
"attributes": {
"uuid": null,
"is_image": null,
"status": "pending",
"mime": null,
"original_url": null,
"original_name": null,
"size": null,
"chunked_upload": {
"is_chunked_upload": false,
"chunk_size": null,
"is_complete": false
},
"metadata": {},
"content": {
"image": null,
"video": {
"thumbnails_group_uuid": null
}
},
"created_at": "2023-11-18T11:29:40.039Z",
"uploaded_at": null,
"removed_at": null,
"expires_at": null
},
"relationships": {
"project": {
"data": {
"type": "projects",
"id": "8a540ce633522d881e97"
}
}
},
"authentication": {
"access_token": "fat-VHGLMLMabtRMEQG7wZrLmA"
},
"chunked_upload_urls": []
}
}Last updated