# CDN & Asset Platform

> Store files, images, and videos. Upload, transform, transcode, and deliver from one SDK. $0.25/GB storage.

Store files, images, and videos. Edge delivery from 400+ locations. Upload, transform, and stream — one SDK.

[Start Building](https://app.stack0.dev/)[View docs](https://www.stack0.dev/docs/sdk/cdn)

$0.25 / GB

- Image Processing
- Video Streaming
- Audio Files

TypeScriptPythonGocURL

Copy

```
// Upload and transform imagesconst asset = await stack0.cdn.upload({  projectSlug: 'my-project',  file: imageBuffer,  filename: 'hero.jpg',}) // Generate transform URL (no API call)const thumb = stack0.cdn.getTransformUrl(asset.cdnUrl, {  width: 400,  height: 300,  fit: 'cover',  format: 'webp',})
```

ImagesVideoAudioDocumentsPrivate FilesHLS Streaming

## Built for production

### Smart Image Transforms

Resize, crop with AI focus, convert formats, adjust quality—all via URL parameters.

optionsaccepted

```
{  ?width=400&height=300&fit=cover&format=webp,}
```

Resize, crop with AI focus, convert formats, adjust quality—all via URL parameters.

### Video Transcoding

Upload any video, transcode to HLS with multiple quality variants automatically.

stack0.cdnHLS ready

```
await stack0.cdn.transcode({  outputFormat: 'hls',})
```

response321 ms

```
{  id: "file_16a6d",  status: "HLS ready",  createdAt: "2026-09-02T14:03:06Z",}
```

### Watermarking

Add logo watermarks during upload. 9 position options with opacity and rotation control.

optionsaccepted

```
{  watermark: { position: 'bottom-right', opacity: 50 },}
```

Add logo watermarks during upload. 9 position options with opacity and rotation control.

### Presigned URLs

Generate time-limited download URLs for private files. 1 hour to 7 day expiry.

stack0.cdn200 OK

```
await stack0.cdn.getPresignedDownloadUrl({  expiresIn: '24h',})
```

response303 ms

```
{  id: "file_1iwhf",  status: "200 OK",  createdAt: "2026-09-02T14:03:06Z",}
```

### Adaptive Bitrate

Video automatically switches quality based on viewer's network speed.

optionsaccepted

```
{  variants: ['360p', '720p', '1080p', '4k'],}
```

Video automatically switches quality based on viewer's network speed.

### Accelerated Uploads

Multipart uploads with resumable support. Upload large files reliably.

stack0.cdnstored

```
await stack0.cdn.upload({  resumable: true,})
```

response136 ms

```
{  id: "file_3t0ek",  status: "stored",  createdAt: "2026-09-02T14:03:06Z",}
```

- ### Image Processing

  Resize, crop, convert to WebP/AVIF, add watermarks, and apply effects on-the-fly.
- ### Video Streaming

  HLS adaptive streaming with 360p to 4K variants. Thumbnail generation included.
- ### Audio Files

  Extract audio from video or upload standalone files. MP3, AAC, WAV support.
- ### Document Storage

  Store PDFs, office docs, and any file type with fast CDN delivery.
- ### Private Files

  Secure storage with presigned URLs. Perfect for contracts and sensitive documents.
- ### Global Edge Delivery

  400+ edge locations worldwide. Sub-20ms latency for cached assets.

## Built for real applications

SaaS User AvatarsE-commerce Product ImagesVideo Course PlatformsDocument ManagementPhotography PortfoliosUser-Generated Content

### SaaS User Avatars

Upload, resize, and serve profile pictures with automatic format optimization.

## Simple, usage-based

$20/mo includes $10 of usage. Metered beyond that, at the same rate for everyone.

Storage

$0.25/ GB

---

- Image transforms included
- Video transcoding & streaming
- Private file storage
- Watermarking support
- 400+ edge locations
- React components included
- No egress fees for images

[Get Started](https://app.stack0.dev/)

## Frequently asked questions

How does pricing work?

Pay for storage ($0.25/GB), image transforms ($0.50/1K), video transcoding ($0.005/min), and video streaming bandwidth ($0.05/GB). Metered per feature at the same rate for everyone.

What's the difference between public and private files?

Public files get a permanent CDN URL anyone can access. Private files require presigned URLs with configurable expiration (1 hour to 7 days).

How do image transforms work?

Add transform parameters to your CDN URL—no API call needed. First request generates the image, subsequent requests serve from cache with sub-20ms latency.

What video formats do you support?

Upload any common video format. We transcode to HLS (adaptive streaming) or MP4 (progressive download) with H.264 and H.265 codec support.

Can I migrate from Cloudinary or S3?

Yes. We provide migration tools to bulk import existing assets. Contact support for large migrations.

Is there a file size limit?

No hard limit. We support multipart uploads with resumable capability for files of any size.

## Ready to build?

Get started in minutes.

[Start Building](https://app.stack0.dev/)

---

Source: https://www.stack0.dev/apis/cdn
llms.txt: https://www.stack0.dev/llms.txt
Sitemap: https://www.stack0.dev/sitemap.xml
Documentation: https://www.stack0.dev/docs
OpenAPI spec: https://www.stack0.dev/openapi.json
MCP server: https://api.stack0.dev/mcp
