Quick Start
Get up and running with imgfast in less than 5 minutes.
1
Get Your API Keys
After signing up, navigate to the API Keys page in your dashboard to find your credentials.
Public Key
Used in CDN URLs. Safe to expose in client-side code.
imgfast_pk_xxxxxxxxxxxxxxxxSecret Key
Used for API authentication. Keep this secure!
imgfast_sk_xxxxxxxxxxxxxxxxxxxxxxxx2
Upload Your First Image
You can upload images through the dashboard or via API.
Via Dashboard
Go to the Images page and click "Upload" to add your first image.
Via API
cURL
# Get upload URL
curl -X POST https://api.imgfast.io/api/v1/images/upload-url \
-H "x-api-key: imgfast_sk_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"filename": "photo.jpg", "contentType": "image/jpeg"}'
# Upload to the returned URL
curl -X PUT "UPLOAD_URL_FROM_RESPONSE" \
-H "Content-Type: image/jpeg" \
--data-binary @photo.jpg3
Transform Images
Add query parameters to your CDN URL to transform images on-the-fly.
URL Examples
# Original image
https://cdn.imgfast.io/YOUR_PUBLIC_KEY/photo.jpg
# Resize to 800px width
https://cdn.imgfast.io/YOUR_PUBLIC_KEY/photo.jpg?w=800
# Resize and convert to WebP
https://cdn.imgfast.io/YOUR_PUBLIC_KEY/photo.jpg?w=800&f=webp
# Multiple transformations
https://cdn.imgfast.io/YOUR_PUBLIC_KEY/photo.jpg?w=800&h=600&fit=cover&q=85&f=webpw, hWidth and height in pixels
fFormat: auto, webp, avif, jpeg, png
qQuality: 1-100 (default: 80)
fitcover, contain, fill, inside, outside
arrow_forward