---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/media/type-aliases/MediaRef.md'
description: >-
  A reference to another media participating in a multi-input verb (`merge`,
  `diff`, `apply_patch`, `slides.update_image`).
---

# Type Alias: MediaRef

```ts
type MediaRef =
  | {
      id: string;
      kind: "id";
    }
  | {
      kind: "builder";
      plan: MediaPlan;
    };
```

Defined in: [src/batteries/media/plan.ts:41](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/media/plan.ts#L41)

A reference to another media participating in a multi-input verb (`merge`, `diff`,
`apply_patch`, `slides.update_image`).

## Remarks

The `id` variant is the canonical model-facing form — the pipe syntax is an inline
`@id` token (`merge with=@018f…`) and the ops form carries the same id. The `builder`
variant is implementor-only (a nested chain: `mp(a).diff(mp(b).convert('txt'))`) and is
not expressible in a flat pipe string.
