# Google Gemini


Loads the bundled offline spec (`fastdecisions/specs/gemini.json`) for `POST /v1beta/decisions` and registers `gemini_provider` (`GEMINI_API_KEY`, default model `gemini-decision-1`). [`prep_gemini_input`](#prep_gemini_input) lowers `Msg` histories and nested JSON via [`lower_state`](types.html#lower_state) into structured JSON while lifting `InputImage`, `InputAudio`, `InputVideo`, and `InputFile` parts (data URLs or HTTP/HTTPS URIs) into Interactions API blocks with optional `resolution`.

Translates [`noul`](types.html#noul) `true`/`false` criteria to `true_description`/`false_description` and raises `NotImplementedError` on [`box`](types.html#box) questions. Responses omitting `model` fall back to `gemini-decision-1`, answers are checked and reordered to match `questions`, and HTTP 200 responses with `prompt_feedback.block_reason` raise a non-retryable [`APIError`](fastdecisions.html#apierror).

## prep_gemini_input

``` python
def prep_gemini_input(
    state, # String, JSON dict/list (may contain nested `Msg`/`Part`), `Msg`, `list[Msg]`, `Media`, or mixed list
    resolution:str=None, # Optional `MediaResolution` applied to visual/document blocks
):
```

*Convert Jev-canonical `state` into a Gemini Decisions `input` string or Interactions block list.*
