Menu
Docs/S3 / R2 Upload

S3 / R2 Upload

SnapSharp can automatically upload every screenshot to your own S3 bucket, Cloudflare R2, or any S3-compatible storage (MinIO, Backblaze B2, etc.).

S3 upload is available on Growth plan and above.

Setup

  1. Go to Settings → Storage
  2. Select your provider (Amazon S3, Cloudflare R2, or Custom)
  3. Fill in your bucket, access key, secret key, and endpoint (for R2/custom)
  4. Click Test connection to verify
  5. Click Save

Usage

Add upload_to_s3=true to any screenshot request:

curl "https://api.snapsharp.dev/v1/screenshot?url=https://example.com&upload_to_s3=true" \
  -H "Authorization: Bearer sk_live_..."

The screenshot is returned normally in the response body. The S3 URL is available in the X-S3-URL response header.

HTTP/1.1 200 OK
Content-Type: image/png
X-S3-URL: https://my-bucket.s3.us-east-1.amazonaws.com/snapsharp/1712000000000_example.com.png

Supported providers

ProviderEndpoint requiredNotes
Amazon S3NoStandard S3 API
Cloudflare R2Yeshttps://<account-id>.r2.cloudflarestorage.com
MinIOYesYour MinIO server URL
Backblaze B2YesS3-compatible endpoint

Cloudflare R2 example

{
  "provider": "r2",
  "bucket": "my-screenshots",
  "accessKeyId": "your-r2-access-key",
  "secretAccessKey": "your-r2-secret-key",
  "endpoint": "https://abc123.r2.cloudflarestorage.com",
  "pathPrefix": "snapsharp/"
}

Path format

Files are stored as:

{pathPrefix}{timestamp}_{hostname}.{format}

Example: snapsharp/1712000000000_stripe.com.png

Error handling

If the S3 upload fails (wrong credentials, network error, etc.), the screenshot request still succeeds and the image is returned in the response. The S3 error is logged but not surfaced to avoid blocking your workflow.