# `LlmCall.Media.Request`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/media/request.ex#L1)

A provider-neutral image or video generation request.

This is a separate request from `LlmCall.Request` on purpose: dedicated media
endpoints take a prompt and media parameters, not messages, a system prompt, or
tools. Flattening a completion request into `{prompt, n, size}` would be a hidden
convention.

`references` are images or videos the generation is conditioned on. An
adapter may still refuse a source it cannot carry (a `{:base64, _}` image
without a media type, a video reference to an image-only endpoint); those are
validation errors, not silent drops.

# `modality`

```elixir
@type modality() :: :image | :video
```

# `params`

```elixir
@type params() :: %{
  optional(:n) =&gt; pos_integer() | nil,
  optional(:size) =&gt; String.t() | nil,
  optional(:aspect_ratio) =&gt; String.t() | nil,
  optional(:duration_s) =&gt; pos_integer() | nil,
  optional(:seed) =&gt; non_neg_integer() | nil,
  optional(:negative_prompt) =&gt; String.t() | nil
}
```

# `t`

```elixir
@type t() :: %LlmCall.Media.Request{
  modality: modality(),
  model: String.t(),
  params: params(),
  prompt: String.t(),
  provider_options: map(),
  references: nil | [LlmCall.Content.Image.t() | LlmCall.Content.Video.t()]
}
```

---

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