> ## Documentation Index
> Fetch the complete documentation index at: https://veniceai-feat-models-redesign.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Gemma 4 31B Instruct API

> Google Gemma 4 31B Instruct API on Venice: 250K context, $0.12 input and $0.36 output per 1M tokens. Private, with zero data retention.

export const HubMount = ({view, children, ...props}) => {
  const [hub, setHub] = useState(null);
  const [failed, setFailed] = useState(false);
  useEffect(() => {
    let alive = true;
    const w = window;
    if (!w.__veniceModelHub) {
      const urls = w.location.hostname === 'localhost' ? ['http://localhost:3333/data/model-hub.bundle.json', '/data/model-hub.bundle.json'] : ['/data/model-hub.bundle.json'];
      const load = i => fetch(urls[i], {
        cache: 'no-cache'
      }).then(res => {
        if (!res.ok) throw new Error(`bundle ${res.status}`);
        return res.json();
      }).catch(err => i + 1 < urls.length ? load(i + 1) : Promise.reject(err));
      const Frag = <></>.type;
      const h = (type, props, ...kids) => {
        const T = type;
        const {key, ...rest} = props || ({});
        if (!kids.length) return <T key={key} {...rest} />;
        if (kids.length === 1) return <T key={key} {...rest}>{kids[0]}</T>;
        return <T key={key} {...rest}>{kids.map((kid, i) => <Frag key={i}>{kid}</Frag>)}</T>;
      };
      w.__veniceModelHub = load(0).then(bundle => new Function(`return (${bundle.code})`)()({
        h,
        Fragment: Frag,
        useState,
        useEffect,
        useRef,
        useMemo,
        useCallback
      }));
    }
    w.__veniceModelHub.then(instance => {
      if (alive) setHub(instance);
    }).catch(() => {
      w.__veniceModelHub = null;
      if (alive) setFailed(true);
    });
    return () => {
      alive = false;
    };
  }, []);
  const View = hub ? hub[view] : null;
  if (View) return <View {...props}>{children}</View>;
  if (failed) {
    return <div className="vx-mount is-failed">
        <p className="vx-mount-note">The interactive model catalog could not load. The full data is below.</p>
        {children}
      </div>;
  }
  return <div className="vx-mount" aria-busy="true">
      <div className="vx-mount-skeleton" aria-hidden="true"><span /><span /><span /></div>
      <div className="vx-mount-source">{children}</div>
    </div>;
};

<HubMount view="ModelPage" data={{"family":{"slug":"google-gemma-4-31b-instruct","name":"Google Gemma 4 31B Instruct","modality":"text","task":"chat","provider":"google","description":"Gemma 4 31B is a dense model from Google DeepMind with 31B parameters, delivering frontier-level reasoning performance. It handles text, image, and video input, supports 256K context, function calling, and configurable thinking modes.","primary":"google-gemma-4-31b-it","variants":["google-gemma-4-31b-it"],"created":1775174400,"updated":1775174400,"privacy":["private"],"openWeights":true,"sets":["venice_recommendations"]},"models":[{"id":"google-gemma-4-31b-it","name":"Google Gemma 4 31B Instruct","type":"text","modality":"text","task":"chat","variant":"standard","provider":"google","created":1775174400,"description":"Gemma 4 31B is a dense model from Google DeepMind with 31B parameters, delivering frontier-level reasoning performance. It handles text, image, and video input, supports 256K context, function calling, and configurable thinking modes.","source":"https://huggingface.co/google/gemma-4-31B-it","privacy":"private","sets":["venice_recommendations"],"openWeights":true,"text":{"context":256000,"maxOutput":8192,"quantization":"fp4","reasoning":{"supported":true,"effort":["none","low","medium","high"],"defaultEffort":"low"},"caps":{"tools":true,"structured":true,"vision":true,"maxImages":10,"videoInput":true,"webSearch":true,"logprobs":true}},"pricing":{"input":0.12,"output":0.36,"cacheRead":0.09,"blended":0.18},"headline":{"value":0.18,"unit":"per 1M tokens","basis":"blended"},"endpoints":[{"id":"chat","method":"POST","path":"/chat/completions","name":"Chat Completions","status":"stable","recommended":true},{"id":"responses","method":"POST","path":"/responses","name":"Responses","status":"alpha"}],"family":"google-gemma-4-31b-instruct"}],"related":{"similar":[{"slug":"deepseek-v4-flash-0423","name":"DeepSeek V4 Flash 0423","provider":"deepseek","modality":"text","privacy":["private","e2ee"],"created":1776988800,"headline":{"value":0.17225,"unit":"per 1M tokens","basis":"blended"},"variants":2},{"slug":"glm-4-7-flash-heretic","name":"GLM 4.7 Flash Heretic","provider":"community","modality":"text","privacy":["private"],"created":1770163200,"headline":{"value":0.1525,"unit":"per 1M tokens","basis":"blended"},"variants":1},{"slug":"glm-4-7-flash","name":"GLM 4.7 Flash","provider":"zai","modality":"text","privacy":["private"],"created":1769644800,"headline":{"value":0.145,"unit":"per 1M tokens","basis":"blended"},"variants":1},{"slug":"deepseek-v4-flash-0731","name":"DeepSeek V4 Flash 0731","provider":"deepseek","modality":"text","privacy":["private"],"created":1785456000,"headline":{"value":0.21875,"unit":"per 1M tokens","basis":"blended"},"variants":2}],"versions":[{"slug":"google-gemma-3-27b-instruct","name":"Google Gemma 3 27B Instruct","provider":"google","modality":"text","privacy":["private"],"created":1762214400,"headline":{"value":0.14,"unit":"per 1M tokens","basis":"blended"},"variants":1}]},"providers":{"google":{"slug":"google","name":"Google","logo":"/images/icons/models/google.svg"},"deepseek":{"slug":"deepseek","name":"DeepSeek","logo":"/images/icons/models/deepseek.svg"},"community":{"slug":"community","name":"Community","logo":"/images/icons/models/image.svg"},"zai":{"slug":"zai","name":"Z.ai","logo":"/images/icons/models/Zhipu.svg"}},"faq":[{"q":"How much does the Google Gemma 4 31B Instruct API cost?","a":"$0.12 per 1M input tokens and $0.36 per 1M output tokens, with cached input at $0.09 per 1M. Prices are in USD and can be paid in DIEM at parity."},{"q":"What is the Google Gemma 4 31B Instruct model ID?","a":"Use `google-gemma-4-31b-it` as the `model` parameter."},{"q":"Is the Google Gemma 4 31B Instruct API private?","a":"Google Gemma 4 31B Instruct is private: requests run on infrastructure Venice controls with zero data retention, and prompts and outputs are never stored or used for training."},{"q":"What is the context window of Google Gemma 4 31B Instruct?","a":"250K tokens of context, with up to 8K output tokens per response."},{"q":"What does Google Gemma 4 31B Instruct support?","a":"Google Gemma 4 31B Instruct supports function calling, structured outputs, reasoning, image input, web search and prompt caching. Reasoning effort is adjustable with `reasoning_effort`: none, low, medium and high (default low)."},{"q":"Which endpoint does the Google Gemma 4 31B Instruct API use?","a":"Call `POST /chat/completions`. `/responses` (Alpha) is also supported."}]}} />

<div className="vx-static">
  <Accordion title="Plain-text specification">
    # Google Gemma 4 31B Instruct API

    Google Gemma 4 31B Instruct is a large language model by Google, available on the Venice API as `google-gemma-4-31b-it`. It runs privately, with zero data retention.

    Gemma 4 31B is a dense model from Google DeepMind with 31B parameters, delivering frontier-level reasoning performance. It handles text, image, and video input, supports 256K context, function calling, and configurable thinking modes.

    ## Google Gemma 4 31B Instruct API pricing

    | Model ID | Variant | Privacy | Price |
    | - | - | - | - |
    | `google-gemma-4-31b-it` | Standard | Private | $0.12 input / $0.36 output per 1M tokens |

    ## Google Gemma 4 31B Instruct specifications

    | Spec | Value |
    | - | - |
    | Provider | Google |
    | Released | Apr 3, 2026 |
    | Privacy | Private |
    | Open weights | Yes |
    | Context window | 250K tokens |
    | Max output | 8K tokens |
    | Reasoning effort | none, low, medium, high |
    | Served precision | FP4 |

    ## How to use the Google Gemma 4 31B Instruct API

    Send requests to `POST https://api.venice.ai/api/v1/chat/completions` with `"model": "google-gemma-4-31b-it"` and your API key.

    ```bash theme={null}
    curl https://api.venice.ai/api/v1/chat/completions \
      -H "Authorization: Bearer $VENICE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "google-gemma-4-31b-it",
        "messages": [{ "role": "user", "content": "Explain TEE attestation in two sentences." }],
        "reasoning_effort": "low"
      }'
    ```

    ## Google Gemma 4 31B Instruct API FAQ

    ### How much does the Google Gemma 4 31B Instruct API cost?

    $0.12 per 1M input tokens and $0.36 per 1M output tokens, with cached input at \$0.09 per 1M. Prices are in USD and can be paid in DIEM at parity.

    ### What is the Google Gemma 4 31B Instruct model ID?

    Use `google-gemma-4-31b-it` as the `model` parameter.

    ### Is the Google Gemma 4 31B Instruct API private?

    Google Gemma 4 31B Instruct is private: requests run on infrastructure Venice controls with zero data retention, and prompts and outputs are never stored or used for training.

    ### What is the context window of Google Gemma 4 31B Instruct?

    250K tokens of context, with up to 8K output tokens per response.

    ### What does Google Gemma 4 31B Instruct support?

    Google Gemma 4 31B Instruct supports function calling, structured outputs, reasoning, image input, web search and prompt caching. Reasoning effort is adjustable with `reasoning_effort`: none, low, medium and high (default low).

    ### Which endpoint does the Google Gemma 4 31B Instruct API use?

    Call `POST /chat/completions`. `/responses` (Alpha) is also supported.

    ## Related models

    * [Google Gemma 3 27B Instruct API](/models/google-gemma-3-27b-instruct): $0.12 input / $0.20 output per 1M tokens
    * [DeepSeek V4 Flash 0423 API](/models/deepseek-v4-flash-0423): $0.14 input / $0.28 output per 1M tokens
    * [GLM 4.7 Flash Heretic API](/models/glm-4-7-flash-heretic): $0.07 input / $0.40 output per 1M tokens
    * [GLM 4.7 Flash API](/models/glm-4-7-flash): $0.06 input / $0.40 output per 1M tokens
    * [DeepSeek V4 Flash 0731 API](/models/deepseek-v4-flash-0731): $0.17 input / $0.35 output per 1M tokens
  </Accordion>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.