API
[Your key] [Files] [Uploading] [Big files] [Folders] [Errors]
Programs can use your account through the API. They can upload files, list and download them, and sort them into folders.
In the examples, $KEY is your key and ID is a file's id.
Your key
Make a key on your account page. Tick only what the program needs:
- Read: list, view and download your files
- Upload: upload files and make folders
- Manage: rename, move and delete files and folders
Send the key with every request:
curl -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/me
Reply:
{
"username": "hachi",
"created_at": "2026-10-01T09:30:00Z",
"used_bytes": 52428800,
"quota_bytes": 1073741824,
"max_file_bytes": 104857600,
"file_count": 42,
"key": {"name": "my script", "scopes": ["read", "upload"]}
}
quota_bytes is your storage space and max_file_bytes the biggest file you may upload, both in bytes.
Keep it secret. If it leaks, revoke it on the account page. You can have up to 10 keys.
Files
List your files, newest first:
curl -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/files
Add these to the link if you need them:
# Files not in any folder https://yuibox.yuisuki.net/api/v1/files?folder=root # Only the files in folder 12 https://yuibox.yuisuki.net/api/v1/files?folder=12 # Oldest first (sort can be created_at, name or size) https://yuibox.yuisuki.net/api/v1/files?sort=created_at&order=asc # By name, A to Z https://yuibox.yuisuki.net/api/v1/files?sort=name&order=asc # Biggest first https://yuibox.yuisuki.net/api/v1/files?sort=size&order=desc # Page 2, with 100 files per page (100 at most) https://yuibox.yuisuki.net/api/v1/files?page=2&per_page=100 # Mixed together https://yuibox.yuisuki.net/api/v1/files?folder=12&sort=name&order=asc&page=2
With curl, put a link that has & in it inside quotes:
curl -H "Authorization: Bearer $KEY" "https://yuibox.yuisuki.net/api/v1/files?sort=name&order=asc"
Reply - each file has a short short_id (the one in its links) and a longer uuid. Either one works as the file's ID below.
{
"files": [
{
"uuid": "3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f",
"short_id": "k3XbQ9aZpL",
"name": "holiday.jpg",
"size": 1048576,
"mime": "image/jpeg",
"folder_id": 12,
"created_at": "2026-11-03T12:00:00Z",
"expires_at": null,
"expired": false,
"url": "https://yuibox.yuisuki.net/f/k3XbQ9aZpL.jpg",
"download_url": "https://yuibox.yuisuki.net/d/k3XbQ9aZpL.jpg"
}
],
"page": 1,
"per_page": 50,
"total": 1
}
One file:
curl -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/files/ID
Reply:
{
"uuid": "3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f",
"short_id": "k3XbQ9aZpL",
"name": "holiday.jpg",
"size": 1048576,
"mime": "image/jpeg",
"folder_id": 12,
"created_at": "2026-11-03T12:00:00Z",
"expires_at": null,
"expired": false,
"url": "https://yuibox.yuisuki.net/f/k3XbQ9aZpL.jpg",
"download_url": "https://yuibox.yuisuki.net/d/k3XbQ9aZpL.jpg"
}
Its contents (the reply is the file itself, saved here as photo.jpg):
curl -H "Authorization: Bearer $KEY" -o photo.jpg https://yuibox.yuisuki.net/api/v1/files/ID/content
Rename or move a file (folder=root moves it out of its folder):
curl -X PATCH -H "Authorization: Bearer $KEY" -d name=holiday.jpg -d folder=12 https://yuibox.yuisuki.net/api/v1/files/ID
Reply: the file with its new name and folder, like above.
Delete a file:
curl -X DELETE -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/files/ID
Reply:
{"deleted": true}
Uploading
curl -H "Authorization: Bearer $KEY" -F file=@photo.jpg https://yuibox.yuisuki.net/api/v1/files
Reply (status 201): the new file, with its link in url:
{
"uuid": "3f2a9c1e-7b4d-4e8a-9c2f-1a2b3c4d5e6f",
"short_id": "k3XbQ9aZpL",
"name": "holiday.jpg",
"size": 1048576,
"mime": "image/jpeg",
"folder_id": 12,
"created_at": "2026-11-03T12:00:00Z",
"expires_at": null,
"expired": false,
"url": "https://yuibox.yuisuki.net/f/k3XbQ9aZpL.jpg",
"download_url": "https://yuibox.yuisuki.net/d/k3XbQ9aZpL.jpg"
}
You can also send:
expiry: when to delete the file, in seconds:0: Never3600: 1 hour86400: 1 day604800: 1 week2592000: 30 days
folder: a folder id to put it innew_folder: a folder name; it is made if it doesn't exist yet
Uploads follow the same rules as the website: your storage space, file size and hourly limits.
Big files
Large files may be too big for one request. Send them in pieces:
- Start:
POST /api/v1/uploadswithnameandsize(in bytes). You get anidand achunk_size. - Send each piece of
chunk_sizebytes (the last can be shorter) toPOST /api/v1/uploads/ID/chunk?offset=N, where N is where the piece starts. - After the last piece you get the new file back.
Start:
curl -H "Authorization: Bearer $KEY" -d name=video.mp4 -d size=300000000 https://yuibox.yuisuki.net/api/v1/uploads
Reply:
{
"id": "8d1c5e2a-4b7f-4c3d-9e8a-2f1b0c9d8e7a",
"chunk_size": 83886080,
"received": 0
}
Send a piece:
curl -H "Authorization: Bearer $KEY" --data-binary @piece1 "https://yuibox.yuisuki.net/api/v1/uploads/ID/chunk?offset=0"
Reply:
{"received": 83886080, "size": 300000000}
The last piece answers with the new file (status 201), like a normal upload.
If a piece fails or is sent from the wrong place, you get status 409 and received: send again from there.
{"error": "conflict", "message": "The upload continues at byte 83886080.", "received": 83886080}
To give up:
curl -X DELETE -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/uploads/ID
Reply:
{"cancelled": true}
Folders
List every folder, with its name and the folder it is in (parent_id, null at the top level). share_url is the folder's share link, or null when it isn't shared.
curl -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/folders
Reply:
{
"folders": [
{"id": 12, "name": "Photos", "parent_id": null, "created_at": "2026-11-03T12:00:00Z", "share_url": null},
{"id": 13, "name": "Day 1", "parent_id": 12, "created_at": "2026-11-03T12:05:00Z", "share_url": "https://yuibox.yuisuki.net/s/Hq7Lm2XpZ4"}
]
}
Make a folder (add parent=12 to make it inside folder 12):
curl -H "Authorization: Bearer $KEY" -d name=Photos https://yuibox.yuisuki.net/api/v1/folders
Reply (status 201):
{
"id": 12,
"name": "Photos",
"parent_id": null,
"created_at": "2026-11-03T12:00:00Z",
"share_url": null
}
Rename or move a folder (parent=root moves it to the top level):
curl -X PATCH -H "Authorization: Bearer $KEY" -d name=Pictures -d parent=root https://yuibox.yuisuki.net/api/v1/folders/12
Reply: the folder with its new name and place, like above.
Delete a folder and everything in it:
curl -X DELETE -H "Authorization: Bearer $KEY" https://yuibox.yuisuki.net/api/v1/folders/12
Reply:
{"deleted": true, "deleted_files": 3}
Answers and errors
Answers are JSON. You can also send JSON instead of form fields. When something goes wrong, you get an error status and a message:
{"error": "forbidden", "message": "This key doesn't have the \"manage\" permission."}
- 401: the key is missing or wrong
- 403: the key can't do that, or your account needs attention on the website
- 404: no such file or folder
- 429: too many requests; wait a minute (each key: 120 requests per minute)
Downloads count toward the same limits as the website.