> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openinary.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How Transformations Work

> URL structure for on-the-fly image and video transformations, caching behavior, and cache invalidation with Openinary.

Transformations live in the URL. Nothing is pre-processed, and there is no build step.

```http theme={null}
{base}/t/{transformations}/{path}
{base}/t/w_800,h_600,c_fill,f_webp/photos/portrait.jpg
```

The first request for a given URL renders the variant and caches it. Every later request is served from that cache, so a URL costs work once no matter how often it is hit. Images render inline and come back as bytes; videos are queued and answer `202` until they are ready.

Deleting or re-uploading a file [invalidates its variants](https://docs.openinary.dev/api-reference/cache/invalidate.md). The full endpoint and parameter reference is in [Transform Media](https://docs.openinary.dev/api-reference/media/transform.md).

## Your base URL

Every example in these docs uses `{base}`. It is the only thing that differs between the two ways of running Openinary, so substitute it once and every URL here is literally correct.

| Running on | `{base}` |
| - | - |
| Cloud | `https://cdn.openinary.dev/b/{bucketId}` |
| Self-hosted | your instance origin, e.g. `https://media.example.com` |

On Cloud, the `bucketId` is the `/b/.../` segment of the `url` returned by an upload, and it appears in every public URL you serve. Everything after `{base}` is identical on both: same transformation syntax, same upload and storage endpoints.

## Explore transformations

> [card] [Image Transformations](https://docs.openinary.dev/media-transformations/image-transformations.md)
>
> Resize, crop, rotate, and convert images, with saliency-aware cropping and smart format selection.

> [card] [Video Transformations](https://docs.openinary.dev/media-transformations/video-transformations.md)
>
> Resize, trim, extract frames, and re-encode videos with quality control.

> [card] [Upload & Prewarm](https://docs.openinary.dev/media-transformations/upload-and-prewarm.md)
>
> Upload files and pre-generate transformed variants so the first public request
> is already cached.

> [card] [Signed URLs](https://docs.openinary.dev/media-transformations/signed-urls.md)
>
> Restrict transformations to those explicitly authorized by your backend.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.