V1.0 | Agent First | Publish | Upload | Anonymous | API Key

File & Site Publish ServiceDesigned for Agents

OkFile provides an agent-first upload and publish flow for files and static sites, with direct links, preview URLs, parallel uploads, and a retained manual upload entry when you need it.

Visit Website GitHub
🤖

Agent First

Built for agent workflows, scripted publishing, and tool-driven delivery without manual browser steps.

🔗

Files Fast Publish

Single-file and multi-file publishing both stay fast and return shareable links quickly.

🌐

Folder Publishing as Sites

Upload a full static site folder and publish it to a dedicated subdomain with nested paths preserved.

📦

Large File Parallel Uploads

Supports parallel multi-file uploads and multipart chunking for large files up to 500MB.

🔒

Anonymous + API Key

Use anonymous publishing for quick tasks or API Keys for higher quotas and account-based control.

📷

File Previews

The same publish result can return both the direct file URL and a preview or playback URL.

01Agent Skill

Recommended for automation, integrations, and repeated publish workflows.

OkFile Skill

Agents can directly upload files, publish static site folders, run parallel uploads, and return either direct file links or site URLs from the same workflow.

Skill Name
okfile
Version
V1.0
Doc Location
Trigger Scenario
Publish files or a full static site folder with parallel upload support.
Supported Types
Images, videos, PDFs, common files, and static site folders (≤500MB per file).
API Endpoints
POST /api/upload/prepare, PUT uploadUrl, POST /api/upload/complete, POST /api/site/prepare, POST /api/site/complete
Auth Method
Anonymous uploads are IP rate-limited. Logged-in users can publish with API Keys.
Return Value
{success, id, url, playUrl, type} or {siteUrl, entryUrl}
Integration Flows
Publish File
1. POST /api/upload/prepare
2. PUT to uploadUrl or each parts[].uploadUrl
3. POST /api/upload/complete

Publish Site
1. POST /api/site/prepare
2. Upload each site file and collect fileId values
3. POST /api/site/complete
4. Return siteUrl and entryUrl

02API Docs

Minimal endpoints for file publishing, status queries, and static site publishing.

Quick Start
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"}'

curl "https://www.okfile.com/api/upload/status/a3k7m92x"

curl -X POST "https://www.okfile.com/api/site/prepare" \
  -H "Content-Type: application/json" \
  --data '{"siteName":"docs-site","files":[{"path":"docs/getting-started.md","size":1200,"contentType":"text/markdown; charset=utf-8"},{"path":"assets/app.css","size":3200,"contentType":"text/css; charset=utf-8"}]}'

curl -X POST "https://www.okfile.com/api/site/complete" \
  -H "Content-Type: application/json" \
  --data '{"siteId":"st_xxxx","siteToken":"token_xxxx","files":[{"relativePath":"docs/getting-started.md","fileId":"a3k7m92x"},{"relativePath":"assets/app.css","fileId":"b8f2k19a"}]}'
MethodEndpointDescription
POST/api/upload/prepareRequest a single-upload or multipart upload URL and receive the future public file URLs.
PUTuploadUrl / parts[].uploadUrlUpload the file body or each file part directly.
POST/api/upload/completeFinalize the upload using the returned file id.
GET/api/upload/status/{id}Query multipart upload progress and status.
POST/api/site/prepareCreate a publish session for a static site folder.
POST/api/site/completeFinalize static site publishing and receive the site URLs.
GET/i/{id}Direct file URL.
GET/i/{id}?play=1Preview or playback page for images, videos, and PDFs.