Skip to content
SuperFiles Docs
Esc
navigateopen⌘Jpreview
On this page

Quickstart

Upload your first file with SuperFiles in under 5 minutes.

Quickstart

1. Get an API key

Sign up at superfiles.montr.online or spin up a self-hosted instance. From Dashboard → API Keys, create a key with the write and read permissions.

Your key looks like sf_live_xxxxxxxxxxxxxxxxxxxx.

2. Create a bucket

Buckets are scoped to a team. Find your team ID under Settings → Team, then:

curl -X POST https://superfiles-api.example.com/v1/teams/{teamId}/buckets \
  -H "Authorization: Bearer sf_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{ "name": "my-media", "slug": "my-media", "isPublic": false }'

Response:

{
  "id": "bkt_01h...",
  "slug": "my-media",
  "isPublic": false,
  "storageUsed": 0,
  "createdAt": "2026-01-01T00:00:00Z"
}

3. Upload a file

The storage API uses /{bucket}/{key} directly — no /v1/ prefix:

curl -X PUT https://superfiles-api.example.com/my-media/hello.txt \
  -H "Authorization: Bearer sf_live_xxxx" \
  -H "Content-Type: text/plain" \
  --data-binary "Hello, SuperFiles!"

Response:

{
  "key": "hello.txt",
  "bucket": "my-media",
  "size": 18,
  "contentType": "text/plain",
  "etag": "sha256:abc123...",
  "createdAt": "2026-01-01T00:00:00Z"
}

4. Download the file

curl https://superfiles-api.example.com/my-media/hello.txt \
  -H "Authorization: Bearer sf_live_xxxx"

For public buckets, no auth header is needed. The CDN URL is:

https://superfiles-api.example.com/cdn/my-media/hello.txt

5. Transform an image

For image files in a public bucket, append a transform segment to the CDN path. Directives are comma-separated and sorted alphabetically:

# Resize to 800×600 WebP, 85% quality
https://superfiles-api.example.com/cdn/my-media/f_webp,h_600,q_85,w_800/photo.jpg

# Square 300px avatar, auto-format, cover crop
https://superfiles-api.example.com/cdn/my-media/c_cover,f_auto,h_300,w_300/avatar.jpg
Directive Example Description
c_X c_cover Crop mode: contain, cover, fill, crop
f_X f_webp Output format: webp, avif, jpg, png, auto
h_N h_600 Height in pixels (1–8000)
q_N q_85 Quality 1–100
w_N w_800 Width in pixels (1–8000)

Next steps

Was this page helpful?