OkFile Skill
Official site: https://www.okfile.com/
Overview
OkFile is an agent-first file upload and publish skill.
Use it when an agent needs to:
- upload images, videos, PDFs, or common files
- upload a static site folder and publish it to a per-site subdomain
- rely on automatic shared top-level directory stripping for folder-based site uploads
- expose a directory listing when a site has no root index.html
- return a direct link via url
- return a preview or playback link via playUrl
- return a published site URL via siteUrl or entryUrl
- publish anonymously or with an API key
- handle multipart uploads and retry only missing parts
When To Trigger
Trigger this skill when the user asks to:
- upload a file
- publish a file and return a public link
- generate a preview URL for an image, video, or PDF
- publish a folder as a static website
- publish a folder that may not contain root index.html
- upload a large file with multipart support
- retry incomplete multipart uploads
Minimal Flow
POST /api/upload/preparePUT uploadUrlor eachparts[].uploadUrlPOST /api/upload/complete- optionally
GET /api/upload/status/{id}
Static Site Flow
POST /api/site/prepare- upload each file through the normal file upload flow
POST /api/site/complete
Static site behavior:
- if every uploaded path is under one shared top-level folder, OkFile strips that folder and treats its contents as the site root
- if root index.html exists, the site root renders that page
- if root index.html does not exist, the site root renders a directory listing with file name, size, and upload time
- images and videos open inline from that listing
- other files should use download links
- nested subdirectories stay available after publishing, such as /docs/getting-started.md
Minimal Example
curl -X POST "https://www.okfile.com/api/upload/prepare" \
-H "Content-Type: application/json" \
--data '{"filename":"photo.jpg","size":12345,"contentType":"image/jpeg","preferredPartSize":5242880}'
curl -X POST "https://www.okfile.com/api/upload/complete" \
-H "Content-Type: application/json" \
--data '{"id":"a3k7m92x"}'
Core Rules
- send
apiKeyonly toprepare - send only
idtocomplete expiresInonly describes the signeduploadUrlorparts[].uploadUrllifetime, not a separate Worker-side upload-session TTL- keep the exact
idfrom the matchingprepareresponse untilcompletefinishes - for site publishing, keep the exact
siteIdandsiteTokenfrom the matchingsite/prepareresponse and pass them to the matchingsite/complete - if
completereturnsmissingParts, re-upload only those parts - prefer
urlfor direct consumption - include
playUrlwhen preview matters - prefer
siteUrlfor the root of a published static site - prefer
entryUrlfor the preferred HTML entry page - do not generate a synthetic
index.htmljust to list files; if the real folder has no rootindex.html, let OkFile render the listing automatically - preserve nested subdirectories exactly as uploaded
Endpoints
POST /api/upload/preparePUT uploadUrlorparts[].uploadUrlPOST /api/upload/completeGET /api/upload/status/{id}GET /i/{id}GET /i/{id}?play=1POST /api/site/preparePOST /api/site/complete
Limits
- max file size:
500MB - multipart starts automatically above the backend threshold
- anonymous mode is IP rate-limited
- API key mode is controlled by backend quotas
Useful URLs
- home:
https://www.okfile.com/en/ - upload page:
https://www.okfile.com/en/upload/ - account:
https://www.okfile.com/account - admin:
https://www.okfile.com/admin