Back to Home
API Reference
How it Works

How GPHosting Works

A simple guide to direct uploads, secure link sharing, and API endpoints.

1. Direct Upload Process

To make uploads as fast as possible, files stream directly from your browser to Cloudflare R2 storage. Your file content never passes through our application servers.

How an upload happens:
  1. Your browser asks for an upload slot (POST /api/files/initiate-upload).
  2. The server checks your storage quota and gives you a temporary, secure direct-upload link.
  3. Your browser uploads the file directly to storage.
  4. Your browser notifies the server that the upload is done (POST /api/files/complete-upload).

2. Main API Endpoints

EndpointMethodAccessLimitWhat it does
/api/files/initiate-uploadPOSTLogged in30 / hrStart an upload and get a direct upload link.
/api/files/complete-uploadPOSTLogged in60 / hrConfirm upload is finished and save the file.
/api/share/createPOSTLogged in60 / hrCreate a share link with password/expiry.
/api/share/[slug]GETPublic120 / minGet public details for a shared file.
/api/share/[slug]/claimPOSTPublic10 / minGet a temporary download link.

3. Key Security Features

  • Safe Downloads: All files download as attachments to prevent potentially dangerous scripts from opening in your browser.
  • Self-Destructing Links: Once a single-use file is downloaded, its link expires immediately.
  • Protected Storage: Internal storage paths and server keys are never sent to the browser.
© 2026 GPHosting. Simple, Fast & Private.