Skip to content
Get started

Content Delivery Network (CDN)

Scenario’s Content Delivery Network provides secure, signed access to your assets with real-time transformation capabilities. The CDN delivers images, 3D models, and videos with features including resizing, format conversion, and optimization.

CDN Domain: cdn.cloud.scenario.com

PatternPurposeAccess
/assets/*Original asset filesRequires signed URL
/assets-transform/*Transformed assets (resized, converted, etc.)Requires signed URL
/thumbnails/*Asset thumbnailsPublic

All asset URLs (except thumbnails) are signed for security and expire automatically.

Signed URLs use a rolling expiration window optimized for caching:

Date RangeExpiration Date
1st - 7th14th of same month
8th - 14th21st of same month
15th - 21stLast day of same month
22nd - 31st7th of next month

Minimum expiration: 24 hours from generation

Signed URLs include signature parameters (Policy, Signature, Key-Pair-Id) that are automatically added by the API.

Transform assets on-the-fly using the /assets-transform/{assetId} endpoint with query parameters.

ParameterTypeDefaultValuesDescription
widthinteger | “auto”auto> 0Target width in pixels
heightinteger | “auto”auto> 0Target height in pixels
qualityinteger1001-100Compression quality
formatstringoriginSee belowOutput format
fitstringcovercover, contain, fill, inside, outsideResize mode
rotateinteger00-360Rotation in degrees
blurinteger00-100Blur strength
greyscalebooleanfalsetrue, falseConvert to greyscale
flattenbooleanfalsetrue, falseRemove transparency
backgroundstringffffffHex (no #)Background color when flattening

Image Formats:

  • jpeg / jpg - JPEG
  • png - PNG with transparency
  • webp - Modern WebP format
  • avif - Next-gen AVIF format
  • tiff / tif - TIFF
  • origin - Keep original format
  • auto - Auto-select best format

3D Model Formats:

  • glb - Binary glTF
  • obj - Wavefront OBJ
  • fbx - Autodesk FBX
  • cover (default) - Crop to fill dimensions, maintains aspect ratio
  • contain - Scale to fit within dimensions, may add letterboxing
  • fill - Stretch to exact dimensions, may distort
  • inside - Scale down to fit within dimensions only
  • outside - Scale to cover dimensions, may crop


# Resize to 512x512, convert to WebP
https://cdn.cloud.scenario.com/assets-transform/{assetId}?width=512&height=512&format=webp&quality=90&Policy=...&Signature=...&Key-Pair-Id=...
# Auto-width, 1024px height, maintain aspect ratio
https://cdn.cloud.scenario.com/assets-transform/{assetId}?height=1024&width=auto&fit=inside&Policy=...&Signature=...&Key-Pair-Id=...
# Convert to greyscale with slight blur
https://cdn.cloud.scenario.com/assets-transform/{assetId}?greyscale=true&blur=5&Policy=...&Signature=...&Key-Pair-Id=...
# Convert 3D model to GLB format
https://cdn.cloud.scenario.com/assets-transform/{assetId}?format=glb&Policy=...&Signature=...&Key-Pair-Id=...
# Flatten transparency with custom background
https://cdn.cloud.scenario.com/assets-transform/{assetId}?flatten=true&background=000000&Policy=...&Signature=...&Key-Pair-Id=...

Generate a signed download URL with optional format conversion.

Endpoint: POST /v1/assets/{assetId}/download

Request:

{
"targetFormat": "webp" // Optional - any supported format
}

Response:

{
"url": "https://cdn.cloud.scenario.com/assets-transform/{assetId}?format=webp&Policy=...&Signature=...&Key-Pair-Id=..."
}

When retrieving assets through the API (e.g., GET /v1/assets), the response includes a pre-signed url field:

{
"assets": [{
"id": "asset-id",
"url": "https://cdn.cloud.scenario.com/assets-transform/{assetId}?...",
...
}]
}

These URLs are already signed and ready to use.

  • Transformed assets are cached for faster subsequent access
  • Cache duration: Up to 24 hours (respects signed URL expiration)
  • Cache key: Based on asset ID and transformation parameters

For consistent cache hits, use the same transformation parameters. Varying parameters (e.g., width=512 vs width=513) will create separate cache entries.

  1. Use WebP or AVIF for modern browsers to reduce bandwidth
  2. Specify exact dimensions when possible to optimize caching
  3. Set appropriate quality (80-90 typically sufficient for web)
  4. Use fit=inside to prevent upscaling small images
  • PNG: When transparency is required
  • JPEG: For photos without transparency
  • WebP: Best compression for modern browsers
  • AVIF: Smallest file size, newer browser support
  • Auto: Let the CDN choose based on browser support
  • Thumbnails: 256x256 or 512x512
  • Preview: 1024px on longest side
  • Full quality: 2048px or original size
  • Use auto for one dimension to maintain aspect ratio