> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vlm.run/llms.txt
> Use this file to discover all available pages before exploring further.

# google/diffusiongemma-26b-a4b-it

> Calibrated yes/no, choice, and score decisions over text, JSON, images, and PDFs.

Served on two routes. On [chat completions](/gateway/api-reference/post-chat-completions)
it behaves like the Gateway's other chat models. On
[`POST /typesafe/v1/systemone`](/gateway/api-reference/post-systemone) it powers
[System One](/gateway/system-one), answering typed questions with a probability per label,
read in one denoise step rather than generated, so an answer can never be off-schema.

## Capabilities

|                 |                                                                                                                                       |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Routes          | `POST /v1/openai/chat/completions`, `POST /typesafe/v1/systemone`, and `WS /typesafe/ws`                                              |
| Method          | `chat`                                                                                                                                |
| Accepted inputs | `text`, `image_url`. On the decisions route also a `file` or `document_url` part (one PDF), carried in `content`.                     |
| Max images      | 8 per request, 5 MB each, JPEG / PNG / WebP / GIF                                                                                     |
| Video           | Not supported                                                                                                                         |
| Streaming       | Token streaming on chat completions. A read is a single response; [`WS /typesafe/ws`](/gateway/typesafe-streaming) answers per frame. |

On the decisions route, `detail` sets the vision budget per image or page:

| `detail`         | Vision tokens           |
| ---------------- | ----------------------- |
| `auto` (default) | 280, the same as `high` |
| `high`           | 280                     |
| `low`            | 70                      |

<Warning>
  This model rejects `temperature` and `seed` with a `400` rather than ignoring them, which
  differs from the other chat models on the Gateway. Omit both.
</Warning>

## Typed decisions

On `POST /typesafe/v1/systemone` the same model answers typed questions with a probability
per label, read in one denoise step rather than generated, so an answer can never be
off-schema. It is the default engine there, and the most sharply calibrated.

|                    |                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------ |
| Question types     | `noul` (yes/no), `choice` (one of 2 to 128 labels), `score` (a 2 to 10 level rubric) |
| Media              | `image_url` parts, or one `file` / `document_url` PDF, on `content`                  |
| `reasoning_effort` | Not supported on a diffusion engine; a request carrying it is a `422`                |
| Output tokens      | Always `0`. Nothing is generated                                                     |

See [System One](/gateway/system-one) for the request shape and a worked example in four
languages, and [Models](/gateway/typesafe-models) for how this engine compares with the
generative ones.

## Chat completions

The same model on the OpenAI-compatible route, for when you want generated text rather
than a typed decision.

<CodeGroup>
  ```python Python [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://gateway.vlm.run/v1/openai",
      api_key="<VLMRUN_API_KEY>",
  )

  response = client.chat.completions.create(
      model="google/diffusiongemma-26b-a4b-it",
      messages=[{"role": "user", "content": [
          {"type": "text", "text": "What is this page and what is the amount due?"},
          {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{page}"}},
      ]}],
      extra_body={"method": "chat"},
  )

  print(response.choices[0].message.content)
  ```

  ```typescript Node.js [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://gateway.vlm.run/v1/openai",
    apiKey: process.env.VLMRUN_API_KEY,
  });

  const response = await client.chat.completions.create({
    model: "google/diffusiongemma-26b-a4b-it",
    messages: [{ role: "user", content: [
      { type: "text", text: "What is this page and what is the amount due?" },
      { type: "image_url", image_url: { url: `data:image/jpeg;base64,${page}` } },
    ]}],
    // @ts-expect-error gateway extension
    method: "chat",
  });

  console.log(response.choices[0].message.content);
  ```

  ```bash CLI theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  vlmrun gw chat invoice-page.jpg \
    -m google/diffusiongemma-26b-a4b-it --method chat
  ```

  ```bash cURL [expandable] theme={"theme":{"light":"github-light","dark":"dark-plus"}}
  IMAGE=$(base64 -w0 invoice-page.jpg)

  curl https://gateway.vlm.run/v1/openai/chat/completions \
    -H "Authorization: Bearer $VLMRUN_API_KEY" \
    -H "Content-Type: application/json" \
    -d @- <<JSON
  {
    "model": "google/diffusiongemma-26b-a4b-it",
    "method": "chat",
    "messages": [{"role": "user", "content": [
      {"type": "text", "text": "What is this page and what is the amount due?"},
      {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,$IMAGE"}}
    ]}]
  }
  JSON
  ```
</CodeGroup>

Sampling fields are not interchangeable with the other chat models: `temperature` and
`seed` return a `400` here instead of being ignored.

## Related

<CardGroup cols={2}>
  <Card title="System One" icon="scale-balanced" href="/gateway/system-one">
    Question types, inputs, confidence, and cost levers.
  </Card>

  <Card title="System One API" icon="code" href="/gateway/api-reference/post-systemone">
    Request and response reference.
  </Card>
</CardGroup>
