# `ExAthena.StructuredOutput`
[🔗](https://github.com/udin-io/ex_athena/blob/v0.7.1/lib/ex_athena/structured_output.ex#L1)

Strict structured-output helper. Requires provider `:structured_output` capability.

Unlike `ExAthena.Structured`, which falls back to fenced-block extraction and
retries, this module sends the `response_format` straight through to the
provider and decodes the JSON exactly once. Use it with providers that
natively enforce a JSON schema (e.g. Ollama via req_llm's OpenAI adapter).

Returns `{:error, :no_structured_output}` when the provider (or a per-request
`:capabilities` override) does not advertise `structured_output: true`.

# `request`

```elixir
@spec request(String.t(), String.t() | atom() | map(), keyword()) ::
  {:ok, map()} | {:error, :no_structured_output | :invalid_json | term()}
```

---

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