This documentation describes the backend API endpoints provided by SKY Image Hosting, which support image uploads, cloud synchronization, file deletion, and direct access to uploaded files.
This API allows the uploading of one or multiple image files. It supports automatic conversion of supported image formats to WebP and automatic thumbnail generation. Upon upload, the system first calculates the file's SHA-256 checksum; if the file already exists, the existing record information is returned. Note that certain image formats (such as svg, gif, ico, raw, tif, tiff) do not support WebP conversion or thumbnail generation.
URL: https://skyimg.net/api/upload
Method: POST
Supports uploading image files using multipart/form-data. The field name for files is file
(multiple files can be uploaded simultaneously). Optional query parameters:
webp
: Set to https://skyimg.net/api/upload?webp=true
to attempt conversion of supported image formats to WebP.
An optional HTTP request header x-sync-token
can be used for subsequent cloud synchronization. If an uploaded file matches an existing record on the server, the existing record information is returned.
Successful Response (200 OK):
[
{
"url": "https://skyimg.net/up/2024/04/01/abc123.webp",
"thumbnail": "https://skyimg.net/thumb/2024/04/01/def456.webp",
"identifier": "unique-file-identifier"
},
{
"url": "https://skyimg.net/up/2024/04/01/ghi789.png",
"thumbnail": "https://skyimg.net/thumb/2024/04/01/jkl987.webp",
"identifier": "another-unique-file-identifier"
}
]
URL: https://skyimg.net/delete/:identifier
Method: DELETE
Deletes the file corresponding to the provided identifier
(including the generated thumbnail) and removes any associated cloud synchronization record.
"File successfully deleted"
Uploaded files and generated thumbnails can be accessed directly via the following paths:
/up/...
- Access the original file, e.g. https://skyimg.net/up/2024/04/01/abc123.webp
/thumb/...
- Access the thumbnail, e.g. https://skyimg.net/thumb/2024/04/01/def456.webp
To prevent abuse, upload restrictions have been implemented. The specific limitations are as follows: