# `Jido.Chat.Media`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.0.0/lib/jido/chat/media.ex#L1)

Normalized media entry used in `Jido.Chat.Incoming`.

# `input`

```elixir
@type input() ::
  t()
  | Jido.Chat.Content.Image.t()
  | Jido.Chat.Content.Audio.t()
  | Jido.Chat.Content.Video.t()
  | Jido.Chat.Content.File.t()
  | map()
  | String.t()
```

# `t`

```elixir
@type t() :: %Jido.Chat.Media{
  duration: nil | nil | integer(),
  filename: nil | nil | binary(),
  height: nil | nil | integer(),
  kind: :image | :audio | :video | :file,
  media_type: nil | nil | binary(),
  metadata: map(),
  size_bytes: nil | nil | integer(),
  url: nil | nil | binary(),
  width: nil | nil | integer()
}
```

# `new`

Creates a media struct from map input.

# `normalize`

```elixir
@spec normalize(input()) :: t()
```

Normalizes supported attachment inputs into a canonical media struct.

# `normalize_many`

```elixir
@spec normalize_many([input()]) :: [t()]
```

Normalizes a list of attachments into canonical media structs.

# `schema`

Returns the Zoi schema for Media.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
