# `LlmCall.Media.Dialect.OpenAI.Images`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/media/dialect/openai/images.ex#L1)

OpenAI image generation (`POST /v1/images/generations`).

Dedicated image endpoints take a prompt and media parameters, so this codec
implements `LlmCall.Media.Codec` rather than the completion behaviour.

`references` are rejected: image edits and variations require a multipart
upload, which the transport owns. `response_format` is a legacy parameter for the
retired DALL·E models and is unsupported by the GPT image models, which always
return base64; a caller that still needs it can set it through
`provider_options.openai`.

`sizes` declares the union across OpenAI image models. The core has no model
catalog, so a size a specific model rejects surfaces as a provider error.

# `validate_request`

```elixir
@spec validate_request(LlmCall.Media.Request.t(), LlmCall.Config.t()) ::
  :ok | {:error, LlmCall.Error.t()}
```

Runs the shared media validation pipeline with the codec's own checks.

---

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