Documentation
Everything you need to optimize your cloud assets with Storing — images, videos, PDFs, audio, and SVGs.
Getting Started
Storing is a cloud asset optimization service that automatically classifies, compresses, and converts your assets to optimal formats. It supports images, videos, PDFs, audio files, and SVGs. For images, a 3-tier classification system (icon, standard, hero) applies the right compression strategy, achieving typical savings of 40-70% without visible quality loss.
Three ways to use Storing
Web Dashboard
Visual interface at use.storing.app for connecting buckets, running audits, and monitoring jobs.
CLI
Command-line tool for local compression, batch processing, and scripting into CI/CD pipelines.
MCP Server
Model Context Protocol server for AI coding agents like Claude Code, Cursor, and Windsurf.
Quick start: compress a file in 30 seconds
npm install -g @supertype.ai/storing
storing login --email [email protected] --password yourpassword
storing compress hero-banner.pngThat's it. Storing will classify the image, pick the optimal format (AVIF by default), and save the compressed file alongside the original. Requires authentication — sign up for free to get started.
CLI Reference
The storing CLI compresses images through Storing's optimization pipeline and manages remote bucket operations (including multi-asset optimization) via the Storing API. All operations require authentication.
Installation
npm install -g @supertype.ai/storingRequires Node.js 18+. After installing, the storing command is available globally.
Authentication
An account is required for all operations. Sign up for free at use.storing.app.
# Create an account
storing register --email [email protected] --password yourpassword --name "Your Name"
# Log in (saves token to ~/.storing/credentials.json)
storing login --email [email protected] --password yourpassword
# Log out
storing logoutCompression
The compress command sends images to Storing's cloud optimization pipeline. Each image is classified into a tier (icon, standard, hero) and compressed with tier-appropriate quality settings. The compressed file is downloaded back to your machine automatically. Requires authentication.
# Compress a single file
storing compress image.png
# Specify output format
storing compress image.png --format avif
storing compress image.png --format webp
storing compress image.png --format jpeg
# Compression profiles
storing compress image.png --profile conservative # higher quality
storing compress image.png --profile balanced # default
storing compress image.png --profile aggressive # smaller files
# Size-based compression
storing compress image.png --max-size 200KB
storing compress image.png --max-size 100KB --min-quality 70
# Compress a directory
storing compress ./images/ --recursive
storing compress ./images/ --recursive --format avif --output ./optimized/
# JSON output (for scripting)
storing compress image.png --jsonOptions
| Flag | Default | Description |
|---|---|---|
-f, --format | auto | Output format: original, avif, webp, jxl, jpeg, png, auto, multi |
-p, --profile | balanced | Compression profile: conservative, balanced, aggressive |
--max-size | — | Target maximum file size (e.g. 200KB, 1.5MB) |
--min-quality | — | Minimum SSIMULACRA2 quality score floor |
-o, --output | — | Output directory (default: same as input) |
-r, --recursive | false | Process directories recursively |
--json | false | Machine-readable JSON output |
Bucket Operations
These commands interact with the Storing API and require authentication via storing login.
Connect a bucket
# Connect an S3 bucket (uses CloudFormation for IAM role)
storing connect s3://my-bucket --role-arn arn:aws:iam::123456:role/Storing-ReadOnly
# Connect a GCS bucket (opens OAuth in browser)
storing connect gs://my-bucketFor S3, running storing connect s3://my-bucket without a --role-arn prints a CloudFormation Quick Create link to set up the read-only IAM role.
Audit
# Audit a connected bucket
storing audit s3://my-bucket
# Audit a local directory
storing audit ./public/imagesAudits scan all images, classify them, and project potential savings without modifying any files.
Optimize
# Optimize with defaults (balanced profile, auto format, images only)
storing optimize s3://my-bucket
# Optimize with specific settings
storing optimize s3://my-bucket --profile aggressive --format avif
# Multi-asset optimization — process specific asset types
storing optimize s3://my-bucket --types image,video,pdf
storing optimize s3://my-bucket --types video --video-codec h265 --video-resolution 1080p
storing optimize s3://my-bucket --types pdf --pdf-quality 80
storing optimize s3://my-bucket --types audio --audio-bitrate 128
storing optimize s3://my-bucket --types svg --svg-precision 3Starts an optimization job on the server. The CLI polls for progress and shows a live progress bar with ETA. Use the --types flag to specify which asset types to process (defaults to images only). See for details on per-type options.
Status & Apply
# Check all jobs
storing status
# Check a specific job
storing status <job-id>
# Apply optimized files (shows the aws s3 cp command)
storing apply <job-id>
# Preview without executing
storing apply <job-id> --dry-runHistory
# View all past jobs
storing history
# Filter by bucket
storing history s3://my-bucketEnvironment Variables
| Variable | Description |
|---|---|
STORING_API_KEY | API key for non-interactive authentication (MCP, CI/CD, scripts). Generate from the Settings page. |
STORING_TOKEN | JWT token for authentication. Alternative to API key — use the token from storing login. |
MCP Integration
Storing provides a Model Context Protocol (MCP) server that lets AI coding agents compress images, audit directories, and manage bucket optimizations through natural language. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.
Setup
Add the MCP server to your project's .mcp.json or global Claude config:
{
"mcpServers": {
"storing": {
"command": "npx",
"args": ["-y", "@supertype.ai/storing-mcp"],
"env": {
"STORING_API_KEY": "sk-your-api-key-here"
}
}
}
}The MCP server requires an API key for authentication. Generate one from the Settings page and set it as the STORING_API_KEY environment variable. You can also use STORING_TOKEN with a JWT token from storing login.
Available Tools
| Tool | Description | Requires API Key |
|---|---|---|
storing_compress | Compress or convert local image files. Supports AVIF, WebP, JXL, JPEG, PNG. | Yes |
storing_audit | Audit a local directory or bucket for optimization opportunities. | Yes |
storing_connect | Connect a cloud storage bucket (S3 or GCS). | Yes |
storing_optimize | Start an optimization job on a connected bucket. | Yes |
storing_status | Check the status of optimization jobs. | Yes |
storing_reclassify | Override automatic tier classifications for specific files. | Yes |
storing_rules | Manage classification rules (add, list, remove glob-based rules). | Yes |
storing_apply | Get the CLI command to apply optimization results. | Yes |
storing_history | View optimization history for a bucket. | Yes |
storing_compress parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
files | string[] | Yes | Array of local file paths to compress |
format | string | No | Output format (default: auto) |
profile | string | No | Compression profile (default: balanced) |
max_size | string | No | Maximum output size, e.g. "200KB" |
min_quality | number | No | Minimum SSIMULACRA2 quality score |
storing_audit parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Local directory path or bucket URI (e.g. s3://my-bucket) |
Example AI Agent Interaction
Here's how a typical interaction works when an AI agent has the Storing MCP server configured:
User: "The images in public/images are too large. Can you optimize them?"
Agent: Runs storing_audit with path: "./public/images"
Discovers 24 images totaling 18.3 MB across 3 tiers (2 hero, 15 standard, 7 icon).
Agent: Runs storing_compress with files: ["./public/images/hero-banner.png", ...] and format: "avif"
Compresses all 24 files. Total: 18.3 MB to 5.1 MB (72% saved).
Agent: Reports results to the user with a breakdown by tier and suggestions for format choices.
Dashboard Guide
The web dashboard at use.storing.app provides a visual interface for all bucket operations.
Sign up
Create an account with email/password, or sign in with GitHub or Google OAuth. GitHub-only users should use the GitHub sign-in button.
Connect a bucket
For S3: click Connect, enter your bucket name, follow the CloudFormation link to create a read-only IAM role, then paste the Role ARN from CloudFormation Outputs. For GCS: click Connect and authorize via Google OAuth — your buckets are listed automatically.
Run an audit
Click Audit on a connected bucket. Storing scans all images, classifies them into tiers, and projects savings. Audits are free and non-destructive.
Start optimization
Select a compression profile (conservative, balanced, aggressive) and output format. Click Optimize to start the job. Files are processed in the background.
Monitor jobs
Track progress on the Jobs page. See real-time file counts, percentage complete, and estimated time remaining. You'll receive an email when the job finishes.
Apply results
Once a job completes, optimized files are staged in a temporary S3 bucket. Copy the provided CLI command (aws s3 cp) to apply the optimized files to your bucket.
Per-Bucket Optimization Settings
Each connected bucket can have its own default optimization settings. Configure these from the bucket detail page to avoid re-entering options every time you start a job. When you create an optimization job, the bucket's defaults are pre-filled automatically.
| Setting | Description |
|---|---|
| Max widths per tier | Maximum resize dimensions for each tier (icon, standard, hero). |
| Size targets per tier | Target maximum file size for each tier after compression. |
| Default format | Preferred output format (e.g. avif, webp, auto). |
| Default profile | Compression profile (conservative, balanced, aggressive). |
| Apply mode | How optimized files are delivered: stage, writeback, or subfolder. |
Settings are stored as part of the bucket configuration and can also be managed via the API:
# Get current bucket optimization defaults
curl -H "Authorization: Bearer <token>" \
https://use.storing.app/api/buckets/:id/settings
# Update bucket optimization defaults
curl -X PATCH -H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"format":"avif","profile":"aggressive","applyMode":"writeback"}' \
https://use.storing.app/api/buckets/:id/settingsWrite-Back Modes
Storing supports three modes for delivering optimized files, controlled by the applyMode setting:
| Mode | Behavior |
|---|---|
stage | Default. Optimized files go to a temporary staging bucket. Download via ZIP from the dashboard or copy with aws s3 cp. |
writeback | Optimized files are written back to the source bucket in-place (same path, new file extension). |
subfolder | Optimized files are written to an optimized/ subfolder within the source bucket. |
Write-back and subfolder modes require additional permissions on the source bucket. For S3, deploy the write-back IAM role using the CloudFormation template:
# CloudFormation template for write-back IAM role
# Adds s3:PutObject and s3:DeleteObject to the Storing role
aws cloudformation create-stack \
--stack-name Storing-WriteBack \
--template-url https://storing-staging.s3.ap-southeast-1.amazonaws.com/templates/write-back-role.yaml \
--capabilities CAPABILITY_NAMED_IAM \
--parameters ParameterKey=BucketName,ParameterValue=your-bucket-nameFor GCS, you will be prompted to re-authenticate with write scope (full_control) when enabling write-back or subfolder mode.
Upload to Bucket
Upload images directly to a connected bucket through Storing. Files are automatically optimized using the bucket's configured defaults before being written to the bucket.
From the bucket detail page, use the drag-and-drop upload zone to upload files. You can also use the API directly:
# Upload and optimize a file to a connected bucket
curl -X POST -H "Authorization: Bearer <token>" \
-F "[email protected]" \
-F "destinationPath=images/hero/" \
https://use.storing.app/api/buckets/:id/uploadThe destinationPath parameter is optional — if omitted, the file is placed at the bucket root. The file is compressed using the bucket's default format, profile, and tier settings before upload.
Multi-Asset Support
Beyond images, Storing can optimize videos, PDFs, audio files, and SVGs in your cloud buckets. Multi-asset optimization is available through the optimize command (bucket operations) and the API's job system.
Supported Asset Types
| Type | Extensions | What Storing Does |
|---|---|---|
| Images | JPEG, PNG, WebP, AVIF, GIF, TIFF, BMP | Classification, compression, format conversion (AVIF, WebP, JXL). The core optimization pipeline. |
| Videos | MP4, MOV, AVI, MKV, WebM | Re-encoding with modern codecs (H.264, H.265, VP9), resolution capping, and bitrate optimization. |
| PDFs | Compresses embedded images within PDFs while preserving text, layout, and vector content. | |
| Audio | MP3, WAV, FLAC, AAC, OGG | Bitrate optimization and format normalization to reduce file sizes. |
| SVGs | SVG | Path precision reduction, metadata stripping, and structural optimization (SVGO-style). |
Per-Type CLI Flags
When running storing optimize, use --types to select which asset types to process, and per-type flags to control optimization settings:
| Flag | Applies To | Description |
|---|---|---|
--types | All | Comma-separated list of asset types to process (image, video, pdf, audio, svg). Defaults to image only. |
--video-resolution | Video | Max resolution: 480p, 720p, 1080p, 1440p |
--video-codec | Video | Video codec: h264, h265, vp9 |
--pdf-quality | Image quality for embedded images in PDFs (1-100) | |
--audio-bitrate | Audio | Target audio bitrate in kbps (e.g. 128) |
--svg-precision | SVG | Path data decimal precision (fewer = smaller files) |
# Process everything in a bucket
storing optimize s3://my-bucket --types image,video,pdf,audio,svg
# Videos only — cap at 1080p with H.265 encoding
storing optimize s3://my-bucket --types video --video-codec h265 --video-resolution 1080p
# PDFs only — compress embedded images at quality 75
storing optimize s3://my-bucket --types pdf --pdf-quality 75
# Multiple types with shared profile
storing optimize s3://my-bucket --types image,svg --profile aggressiveProfiles by Asset Type
The compression profile (conservative, balanced, aggressive) applies across all asset types but affects each type differently:
| Profile | Images | Videos | PDFs | Audio | SVGs |
|---|---|---|---|---|---|
| Conservative | Higher SSIM target, larger output | Higher bitrate, minimal re-encoding | Quality 85+ for embedded images | Higher bitrate (192+ kbps) | More decimal precision |
| Balanced | Optimal quality/size tradeoff | Moderate bitrate, good visual quality | Quality 70 for embedded images | Standard bitrate (128 kbps) | Balanced precision |
| Aggressive | Lower SSIM target, smallest files | Lower bitrate, resolution may be capped | Quality 50 for embedded images | Lower bitrate (96 kbps) | Minimal precision, most stripping |
The --types flag and per-type options are also available through the API when creating optimization jobs via POST /api/jobs using the assetTypes array parameter.
Classification System
Storing uses a 3-tier classification system to apply the right compression strategy for each asset. For images, classification is based on dimensions and file size. Videos and PDFs use analogous tiers based on resolution and page count respectively.
| Tier | Criteria | Strategy | SSIMULACRA2 Target |
|---|---|---|---|
| Icon | ≤ 512px, ≤ 100KB | Aggressive compression. Small UI elements where size matters most. | 60 |
| Standard | 512–1920px | Balanced compression. Typical content images and photos. | 70 |
| Hero | ≥ 1920px | Conservative, quality-first. Large hero images, banners, backgrounds. | 80 |
Video classification
| Tier | Criteria | Strategy |
|---|---|---|
| Small | ≤ 480p, ≤ 50MB | Aggressive bitrate reduction. Thumbnails, preview clips. |
| Standard | 720p – 1080p | Balanced re-encoding. Typical content videos. |
| High | ≥ 1440p | Conservative encoding. Hero videos, backgrounds. |
PDF classification
| Tier | Criteria | Strategy |
|---|---|---|
| Light | ≤ 5 pages, ≤ 1MB | Aggressive image compression within the PDF. |
| Standard | 5 – 50 pages | Balanced compression for embedded images. |
| Heavy | ≥ 50 pages or ≥ 20MB | Conservative — preserves image quality for large reports. |
Confidence scoring
Each classification includes a confidence score (0-100%). Images that fall near tier boundaries receive lower confidence scores. Low confidence files are flagged in audit reports so you can review and reclassify them if needed.
Reclassification
You can override automatic classifications using the storing_reclassify MCP tool or by setting up glob-based rules with storing_rules. For example, you might force all files under /icons/ to the icon tier regardless of dimensions.
Profile offsets
Compression profiles shift the SSIMULACRA2 target up or down from the base tier value:
| Profile | Offset | Effect |
|---|---|---|
| Conservative | +5 | Higher quality, larger files |
| Balanced | 0 | Default — optimal balance |
| Aggressive | -5 | Smaller files, slightly lower quality |
Per-tier optimization defaults
Each tier has default resize dimensions and maximum file size targets that are applied automatically during compression. These defaults ensure images are appropriately sized for their role without manual configuration.
| Tier | Max Width | Max File Size |
|---|---|---|
| Icon | 256px | 30 KB |
| Standard | 1200px | 200 KB |
| Hero | 1920px | 500 KB |
These defaults can be overridden per-bucket via the bucket optimization settings. Images smaller than the max width are not upscaled.
Output Formats
| Format | Notes |
|---|---|
| AVIF | Primary next-gen format. Typically ~50% smaller than JPEG at equivalent quality. Broad and growing browser support. |
| WebP | Safe next-gen choice. Supported by all modern browsers. Good compression, slightly behind AVIF. |
| JPEG (MozJPEG) | Universal compatibility. Uses MozJPEG encoder for better compression than standard JPEG. |
| PNG | Lossless format. Best for images requiring transparency or pixel-perfect reproduction. |
| JPEG XL | Opt-in format. Supports lossless JPEG recompression (re-compress JPEG with zero quality loss). Limited browser support. |
Video codecs
| Codec | Notes |
|---|---|
| H.264 | Universal compatibility. Supported everywhere. Good compression, larger files than newer codecs. |
| H.265 (HEVC) | ~50% smaller than H.264 at equivalent quality. Broad hardware support. Default for aggressive profile. |
| VP9 | Open-source alternative. Good compression, excellent browser support via WebM containers. |
Audio codecs
| Format | Notes |
|---|---|
| AAC | Default output. Universal support, good quality-to-size ratio. |
| MP3 | Legacy format. Used when maximum compatibility is needed. |
| Opus | Best compression for speech and music. Growing browser support. |
PDF optimization
PDF optimization compresses embedded raster images within the PDF while preserving text, vector graphics, fonts, and document structure. The --pdf-quality flag controls the JPEG quality of re-compressed embedded images (1-100).
SVG optimization
SVG files are optimized by reducing path precision, removing metadata and editor artifacts, collapsing redundant groups, and minifying the markup. The --svg-precision flag controls how many decimal places are kept in path data (fewer = smaller files, but less precise curves).
Image format modes
When specifying the --format flag (CLI) or format parameter (MCP), you can use these modes:
| Mode | Behavior |
|---|---|
original | Keep the original format, just re-compress with better settings. |
avif | Convert all images to AVIF. |
webp | Convert all images to WebP. |
jxl | Convert all images to JPEG XL. |
auto | Automatically pick the best format per image (default). Usually AVIF. |
multi | Generate multiple formats per image for use with <picture> srcset. |
Works with Any Cloud
Storing's compression works with images from any source — AWS S3, Google Cloud Storage, Azure Blob Storage, Cloudflare R2, DigitalOcean Spaces, Backblaze B2, or your local file system. Just download your images, compress with Storing, and re-upload.
For S3 and GCS, Storing offers a fully automated pipeline (connect → audit → optimize → deliver). For other providers, use the CLI or MCP with your existing tools:
Azure Blob Storage
# Download
az storage blob download-batch -d ./images -s my-container --account-name myaccount
# Compress
storing compress ./images/ -r --format avif
# Re-upload
az storage blob upload-batch -s ./images -d my-container --account-name myaccount --overwriteCloudflare R2
# Download (R2 is S3-compatible)
aws s3 sync s3://my-bucket ./images --endpoint-url https://<account-id>.r2.cloudflarestorage.com
# Compress
storing compress ./images/ -r --format webp --profile balanced
# Re-upload
aws s3 sync ./images s3://my-bucket --endpoint-url https://<account-id>.r2.cloudflarestorage.comDigitalOcean Spaces
# Download (Spaces is S3-compatible)
aws s3 sync s3://my-space ./images --endpoint-url https://nyc3.digitaloceanspaces.com
# Compress
storing compress ./images/ -r --format avif
# Re-upload
aws s3 sync ./images s3://my-space --endpoint-url https://nyc3.digitaloceanspaces.comAny provider with rclone
# rclone works with 40+ cloud providers
rclone sync remote:my-bucket ./images
# Compress
storing compress ./images/ -r
# Re-upload
rclone sync ./images remote:my-bucketWith AI agents (MCP)
AI coding agents with the Storing MCP server can automate this workflow for any cloud. Just ask:
“Download all images from our Azure container, optimize them with Storing, and re-upload the compressed versions.”
The agent handles the download/compress/upload loop automatically using the appropriate cloud CLI + storing_compress.
Authentication
Storing supports two authentication methods. Choose based on your use case:
| Method | Best For | How to Get | Header Format |
|---|---|---|---|
| JWT Token | CLI, web dashboard, interactive use | storing login or web sign-in | Authorization: Bearer <token> |
| API Key | MCP servers, CI/CD, scripts, non-interactive use | Settings page → Generate Key | Authorization: ApiKey sk-... |
When to use API keys
Use API keys when you can't do an interactive login — MCP servers, CI/CD pipelines, cron jobs, or any script that runs unattended. API keys don't expire but can be deleted from the Settings page. Each key tracks its own usage count.
When to use JWT tokens
Use JWT tokens for interactive CLI sessions and the web dashboard. Tokens expire after 7 days. Run storing login to get a fresh token.
Generating an API key
# Option 1: Web dashboard
# Go to Settings → API Keys → Generate Key
# Copy the key immediately — it's only shown once
# Option 2: CLI
storing login --email [email protected] --password yourpass
# Then use the Settings page to generate an API key
# Use the key in MCP config, scripts, or CI/CD:
STORING_API_KEY=sk-your-key-here storing compress image.pngAPI Reference
The Storing API is a REST service running at https://use.storing.app. The CLI and MCP server are thin clients over this API.
Auth
| Method | Endpoint | Description |
|---|---|---|
POST | /api/auth/register | Create a new account |
POST | /api/auth/login | Log in, receive JWT token |
POST | /api/auth/apikey | Generate an API key |
GET | /api/auth/apikeys | List your API keys (preview + usage count) |
DELETE | /api/auth/apikeys/:id | Delete an API key |
GET | /api/auth/github | Start GitHub OAuth flow |
GET | /api/auth/google | Start Google OAuth flow |
Compression
| Method | Endpoint | Description |
|---|---|---|
POST | /api/compress | Compress a single image (multipart upload) |
POST | /api/compress/audit | Classify and estimate savings for uploaded images |
The POST /api/jobs endpoint accepts an optional assetTypes array parameter (e.g. ["image", "video", "pdf"]) to specify which asset types to process in a bucket optimization job. Per-type settings (videoResolution, videoCodec, pdfQuality, audioBitrate, svgPrecision) are passed in the job's settings object.
Buckets & Jobs
| Method | Endpoint | Description |
|---|---|---|
GET | /api/buckets | List connected buckets |
POST | /api/buckets/connect | Connect a new bucket |
DELETE | /api/buckets/:id | Disconnect a bucket |
GET | /api/buckets/:id/settings | Get bucket optimization defaults |
PATCH | /api/buckets/:id/settings | Update bucket optimization defaults |
POST | /api/buckets/:id/upload | Upload and optimize file to bucket |
GET | /api/jobs | List optimization jobs |
POST | /api/jobs | Create a new optimization job |
GET | /api/jobs/:id | Get job details + results |
GET | /api/jobs/:id/progress | Get job progress (for polling) |
GET | /api/jobs/:id/stream | SSE stream for real-time job progress |
POST | /api/audit | Start a bucket audit |
GET | /api/audit/:id | Get audit report |
Usage & Monitoring
| Method | Endpoint | Description |
|---|---|---|
GET | /api/usage | Your usage history (paginated) |
GET | /api/usage/summary | Aggregated usage stats (totals, by format/tier, daily) |
POST | /api/monitoring/:projectId/enable | Enable weekly monitoring |
GET | /api/monitoring/:projectId | Get monitoring status |
GET | /api/health | Health check (no auth required) |
All endpoints except /api/health, /api/auth/register, and /api/auth/login require authentication via Authorization: Bearer <token> or Authorization: ApiKey sk-....
Full API documentation coming soon.
The CLI and MCP server are thin clients over this API. For now, these interfaces cover all functionality and are the recommended way to interact with Storing programmatically.