Welcome to Assets.so API

Assets.so is a high-performance image processing service that provides CDN-like functionality for image optimization, placeholder generation, QR codes, and Open Graph images. Transform, optimize, and deliver images at scale with our powerful API.

🖼️
Image Processing
67+ transformation parameters for resizing, cropping, effects, and filters
📊
OG Images
Dynamic social media images with templates and gradients
📱
QR Codes
Generate QR codes for URLs, WiFi, vCards, crypto, and more
🎨
Placeholders
SVG placeholders with shapes, patterns, and gradients
Fast & Cached
LRU cache with CDN-ready headers for optimal performance
🔒
Secure
Host allowlisting and request validation for security

Quick Start

# Transform an image
GET https://media.assets.so?url=image.jpg&w=500&q=80

# Generate OG image
GET https://og.assets.so?text=Hello World&template=gradient

# Create QR code
GET https://qr.assets.so?text=https://example.com&size=300

# Generate placeholder
GET https://via.assets.so/img.jpg?w=400&h=300&shape=circle

📚 API Endpoints

Image Processing

GET Enhanced

Transform and optimize images with 67+ parameters including effects, filters, and adjustments.

Parameter Type Description Example
url string Source image URL (required) image.jpg
w number Width in pixels 500
h number Height in pixels 300
q number Quality (1-100) 85
fm string Output format (jpeg, png, webp, avif) webp
blur number Blur radius (0.3-1000) 5
grayscale boolean Convert to grayscale true
sepia boolean Apply sepia effect true
GET https://media.assets.so?url=photo.jpg&w=800&h=600&fm=webp&q=90&grayscale=true

Open Graph Images

GET Enhanced

Generate dynamic Open Graph images with templates, gradients, and customization.

Parameter Type Description Example
text string Main text content Hello World
template string Template (blog, modern, event, product) modern
fontSize number Font size in pixels 48
fontFamily string Font family (Inter, Roboto, OpenSans, Montserrat, Poppins, PlayfairDisplay, Raleway) Montserrat
bgGradient string Multi-color background gradient linear-gradient(135deg, #667eea, #764ba2, #f093fb)
textGradient string Multi-color text gradient (renders as first color) linear-gradient(60deg, black, gray, #da214e, #fab34a)

Available Templates

  • blog / blog-post: Blog post style with title, description, author, date, tags, and avatar
  • modern / modern-card: Modern card design with icon, title, subtitle, and accent colors
  • event: Event announcement with date, time, location, and pattern overlay
  • product: Product showcase with pricing, ratings, and product images
  • gradient: Gradient background with centered text
  • blank: Simple text on background - most flexible template
  • letter / 1l: Single letter in a rounded box
Simple Example:
GET https://og.assets.so?template=blog&title=My Blog Post&author=John Doe&tags=Tech,AI

Multi-Color Background Gradient:
GET https://og.assets.so?text=Beautiful&bgGradient=linear-gradient(220deg, #ffffff 5%, rgba(181, 255, 252, 0.5) 15%, rgba(255, 222, 233, 0.5) 50%)

Complex Text Gradient (renders as first color):
GET https://og.assets.so?text=RAINBOW&textGradient=linear-gradient(60deg, black, gray, #da214e, #fab34a, #E21143, #4a4def)

QR Code Generation

GET Enhanced

Generate QR codes for various data types with customization options.

Parameter Type Description Example
text string Content to encode https://example.com
type string QR type (url, wifi, vcard, sms, crypto) wifi
size number Size in pixels 300
color string Foreground color #000000
bg string Background color transparent
GET https://qr.assets.so?type=wifi&ssid=MyNetwork&password=pass123&security=WPA

Placeholder Images

GET Enhanced

Generate SVG placeholder images with shapes, patterns, and gradients.

Parameter Type Description Example
w number Width in pixels 400
h number Height in pixels 300
shape string Shape (rectangle, circle, diamond, hexagon) circle
pattern string Pattern (dots, grid, lines, waves) dots
gradient string Multi-color gradient linear-gradient(135deg, #667eea, #764ba2, #f093fb)
Simple Example:
GET https://via.assets.so/img.jpg?w=600&h=400&shape=hexagon&pattern=dots

Multi-Color Gradient:
GET https://via.assets.so/img.jpg?w=400&h=300&gradient=linear-gradient(220deg, #ffffff 5%, rgba(181, 255, 252, 0.5) 15%, rgba(255, 222, 233, 0.5) 50%)