Cachehub API Portal

REST API for account, usage, files, and tokens

1. Create an API key

  1. Log in → open Account.
  2. Under API Keys, enter a name (e.g. test) → Create API Key.
  3. Copy the key once (starts with ch_). It is not shown again.
Auth header: Authorization: Bearer ch_... or X-Api-Token: ch_...

2. Live API tester

Paste your API key and run a request against this server.
Response will appear here…

3. curl examples

BASE=https://cachehub.net
TOKEN=ch_your_token_here

curl -s "$BASE/api/me" -H "Authorization: Bearer $TOKEN"
curl -s "$BASE/api/usage" -H "Authorization: Bearer $TOKEN"
curl -s "$BASE/api/files" -H "Authorization: Bearer $TOKEN"
PowerShell: use deploy/test-api.ps1 -Token ch_... from your PC.

4. Main endpoints

MethodPathAuthNotes
GET/api/meAPI keyAccount, plan, billing, uploadAllowed
GET/api/usageAPI keyStorage bytes + cost estimate + egress
GET/api/filesAPI keyList files/folders (names may be encrypted)
POST/api/filesAPI keyUpload JSON body (paid/staff required)
GET/api/files/{id}API keyDownload file payload (paid/staff required)
POST/api/files/{id}/deleteAPI keyMove to trash
POST/api/tokenssession/APICreate key {"name":"my-app"}
GET/api/tokensAPI keyList keys (hints only)
DELETE/api/tokens/{id}API keyRevoke key
GET/api/session-statuspublicBuild / health hint
Private (ZK) browser uploads encrypt client-side. Raw API uploads for Private still require payment/staff access; encrypt on the client if you need ZK via API.

5. Expected test results