Official Integration & SDK
Simple HTTP REST API for Any Language or Platform
Send images via multipart/form-data or binary buffer to POST https://api.smallpict.app/v1/optimize. Get back optimized AVIF/WebP assets, metadata, and CDN links.
Install:
BASH Packagecurl -X POST https://api.smallpict.app/v1/optimize ...Implementation Example
bashcurl -X POST https://api.smallpict.app/v1/optimize \
-H "Authorization: Bearer sp_live_key_xxxxxxxx" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/product.jpg" \
-F "format=avif" \
-F "quality=80" \
-F "width=1200" \
-F "destination_bucket=my-s3-vault"
# Response JSON:
{
"success": true,
"original_size": 3412090,
"optimized_size": 284102,
"savings_percentage": 91.67,
"format": "avif",
"width": 1200,
"height": 800,
"cdn_url": "https://cdn.smallpict.app/media/abc123xyz.avif",
"processing_time_ms": 38
}Integration Steps
11. Get API Key
Create a free scoped API key from your SmallPict developer dashboard.
22. POST /v1/optimize
Send image binary or public image URL with target format and quality parameters.
33. Receive CDN URL
Get instant JSON response with optimized asset dimensions, byte savings, and edge CDN URL.
Key Benefits
- Standard HTTP/2 endpoint compatible with any programming language
- HMAC-SHA256 signature support for tamper-proof requests
- Sub-50ms turnaround with worldwide edge acceleration
- Detailed JSON telemetry with byte sizes and dimension metadata
Official Developer Documentation
Need Complete Implementation Guides & API Specs?
Explore parameter references, authentication mechanisms, error codes, and local testing instructions in our official REST API developer guide.
Supercharge Your REST API Image Pipeline
Experience sub-50ms AVIF and WebP image optimization in your application. Zero setup fee, instant sandbox keys, and unlimited scalability.
