# AssetVariant

```ts
type AssetVariant = {
  bytes: number;
  createdAt?: string;
  height?: number;
  preset: VariantEntryPreset;
  rungs?: HlsRung[];
  sourceFrom?:   | VariantPreset
     | "upload"
     | "transform-route"
     | "hls-transcode"
     | "cdn-probe";
  url: string;
  width?: number;
};
```

Defined in: packages/asset-client/src/index.ts:244

## Properties

### bytes

```ts
bytes: number;
```

Defined in: packages/asset-client/src/index.ts:258

Byte size of the stored variant file.

***

### createdAt?

```ts
optional createdAt?: string;
```

Defined in: packages/asset-client/src/index.ts:281

ISO timestamp this variant was written. Absent on pre-trace variants.

***

### height?

```ts
optional height?: number;
```

Defined in: packages/asset-client/src/index.ts:256

Pixel height. Same caveat as `width`.

***

### preset

```ts
preset: VariantEntryPreset;
```

Defined in: packages/asset-client/src/index.ts:250

What this entry IS. Usually a named preset; can also be a
`transform-<hash>` cache artifact — see [VariantEntryPreset](/api/nitida/asset-client/type-aliases/variantentrypreset/) before
passing it to [getAssetUrl](/api/nitida/asset-client/functions/getasseturl/).

***

### rungs?

```ts
optional rungs?: HlsRung[];
```

Defined in: packages/asset-client/src/index.ts:298

**`preset: "hls"` only** — the ladder's rungs, in MASTER ORDER.

The reason this exists: an entry that only says *there is a ladder* leaves
a consumer that plans a composition exactly as blind as no entry at all,
because the ceiling of a composition is its weakest ingredient and there is
no upscale. Before this field the only way to learn a clip's real rungs was
to fetch the master playlist — or worse, download the asset.

`rungs[0]` is the rung every client OPENS on (RFC 8216 §6.3.4 for native
HLS; hls.js with `startLevel` unset uses "the first level in the
manifest"), so the order is a delivery fact — do not sort it in place.

Use [hlsLadderAlignment](/api/nitida/asset-client/functions/hlsladderalignment/) rather than eyeballing `segments`: a ladder
can be complete and still unable to adapt.

***

### sourceFrom?

```ts
optional sourceFrom?: 
  | VariantPreset
  | "upload"
  | "transform-route"
  | "hls-transcode"
  | "cdn-probe";
```

Defined in: packages/asset-client/src/index.ts:271

Where the bytes for this variant came from. Useful for quality
traceability — a `thumb` with `sourceFrom: "original"` is the
canonical case, while `sourceFrom: "lg"` means it was derived
from an already-encoded WebP (slight quality compounding).

  - `"upload"` → first-write at `/assets/process`. The bytes came
    straight from the client's PUT.
  - `VariantPreset` → regenerated from that preset's variant.

Absent on variants written before the trace field existed.

***

### url

```ts
url: string;
```

Defined in: packages/asset-client/src/index.ts:252

Public CDN URL of this variant.

***

### width?

```ts
optional width?: number;
```

Defined in: packages/asset-client/src/index.ts:254

Pixel width. Absent for `original`-only assets where image processing was skipped, or for video presets.