Roboflow

GoogleGoogleReleased Mar 2025Custom

Gemma 3 12B

We don't benchmark Gemma 3 12B.

It is an open-weight model from Google under a custom license; check its commercial-use terms. Test it side by side in the Playground.

Gemma 3 12B Interactive Demo

Model settings

Thinking level

Max output tokens

Default 65,536 · max 65,536

Sign in to adjust thinking and output length per run.

Results appear here. Add an image or pick an example to run Gemma 3 12B.

Gemma 3 12B Overview

Gemma 3 12B, announced by Google DeepMind on March 12, 2025, is part of the open-weight Gemma 3 family, designed to provide a balance between capability and accessibility. With around 12 billion parameters, it supports multimodal input (text + images) and outputs text, making it useful for reasoning, summarization, Q&A, and visual understanding tasks. The model supports an input context of 128,000 tokens and typically generates up to ~8,000 tokens in output.

Gemma 3 12B Pricing

Gemma 3 12B costs $0.050 per 1M input tokens and $0.150 per 1M output tokens.

Input$0.050 / 1M tokens
Output$0.150 / 1M tokens

Pricing updated Dec 3, 2026

Deploy Gemma 3 12B with an API

Gemma 3 12B runs as a hosted REST endpoint through Roboflow Workflows. Pick a task, then hand the prompt to your coding agent or copy the code. Deploying the workflow into a free Roboflow workspace replaces the your-workspace and YOUR_API_KEY placeholders with your own.

Connect your agent to Roboflow (once)

Add the Roboflow MCP server

claude mcp add --transport http roboflow https://mcp.roboflow.com/mcp

Run /mcp and authorize Roboflow in your browser when the OAuth flow opens.

Start a new Claude Code session so the MCP loads, then paste the prompt below (it works the same in any agent).

Deploy this workflow to your Roboflow workspace to use it.

Integrate the Roboflow "Gemma 3 12B" workflow into my app.

- Endpoint: POST https://serverless.roboflow.com/<your-workspace>/workflows/gemma-3-12b-captioning
- Auth: send my Roboflow API key as `api_key` in the request body, read from the ROBOFLOW_API_KEY env var (never hardcode).
- Body: { "api_key": ..., "inputs": { `image`: { type: "url" | "base64", value } } }.
- Billing: this workflow needs no provider API key — inference runs on my Roboflow credits. A BYO provider key can be added to the model step in the Roboflow workflow editor later.

With the Roboflow MCP connected, call `workflows_get` on "gemma-3-12b-captioning" to read the exact input schema (the source of truth), then `workflows_run` on a sample image to confirm the output shape before writing code (the MCP is authenticated, so this needs no key). Without the MCP, use the contract above.

Before running the app, set up these keys so it does not error at runtime:
- `ROBOFLOW_API_KEY` (sent as `api_key`) from https://app.roboflow.com/settings/api
Create a .gitignore'd .env with these variables, using placeholder values for any I haven't given you. Then pause and tell me directly, in your reply: the full path to the .env file, exactly which keys I need to paste in, and the link to get each one. Wait for me to confirm I've added them before you run anything. Do not run the app until I confirm.

Then add the integration to my codebase: match my project's language, framework, and conventions; read every key from environment variables (never hardcode); add basic error handling; and include a small runnable example. If you can't tell what language my project uses, ask me.
Installpip install inference-sdk

Deploy this workflow to your Roboflow workspace to use it.

# Inference runs on your Roboflow credits — no provider API key needed. To bill your own provider account instead, add an api_key to the model step in the Roboflow workflow editor.
# 1. Import the library
from inference_sdk import InferenceHTTPClient

# 2. Connect to your workflow
client = InferenceHTTPClient(
  api_url="https://serverless.roboflow.com",
  api_key="YOUR_API_KEY"
)

# 3. Run your workflow on an image
result = client.run_workflow(
  workspace_name="your-workspace",
  workflow_id="gemma-3-12b-captioning",
  images={
    "image": "YOUR_IMAGE.jpg"  # Path to your image file
  },
  use_cache=True  # cache workflow definition for 15 minutes
)

# 4. Get your results
print(result)

Deploy this workflow to your Roboflow workspace to use it.

// Inference runs on your Roboflow credits — no provider API key needed. To bill your own provider account instead, add an api_key to the model step in the Roboflow workflow editor.
const response = await fetch('https://serverless.roboflow.com/your-workspace/workflows/gemma-3-12b-captioning', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    inputs: {
      "image": {"type": "url", "value": "IMAGE_URL"}
    }
  })
});

const result = await response.json();
console.log(result);

Deploy this workflow to your Roboflow workspace to use it.

# Inference runs on your Roboflow credits — no provider API key needed. To bill your own provider account instead, add an api_key to the model step in the Roboflow workflow editor.
curl --location 'https://serverless.roboflow.com/your-workspace/workflows/gemma-3-12b-captioning' \
--header 'Content-Type: application/json' \
--data '{
  "api_key": "YOUR_API_KEY",
  "inputs": {
    "image": {"type": "url", "value": "IMAGE_URL"}
  }
}'

Gemma 3 12B License

Custom License · Model-specific license

Gemma 3 12B ships under a custom, model-specific license rather than a standard permissive or restrictive one, so the Gemma 3 12B license has to be read directly. Custom model licenses range from effectively permissive to research-only.

Commercial use
Varies. Custom model licenses commonly restrict commercial use, cap monthly active users, or carve out specific industries — check the Gemma 3 12B terms before you build on it.
Modification
Usually permitted for fine-tuning, but check whether derivative weights inherit the same license and naming requirements.
Redistribution
Often restricted. Look for attribution, naming, and acceptable-use requirements that apply to any copy you share.

Uncertainty around licensing can delay or stop a project, and acceptable-use policies attached to custom licenses are binding terms rather than guidance. Review them alongside the Gemma 3 12B license before production deployment.

Do I need a commercial license for Gemma 3 12B?

If the custom terms rule out your use case, a commercial license from the rights holder is the way through. Roboflow's licensing page lists the supported models whose commercial license is included in a Roboflow plan, so it is worth checking whether Gemma 3 12B — or a permissively licensed alternative — fits your deployment.

Do not hesitate to reach out with questions for your commercial project. Our team will help you start solving business problems on the first call. See Roboflow commercial licensing for the models included in each plan.

Talk to sales

Custom licenses are model-specific. Always check the per-model License Notes section above and the linked official license text.

License information is provided as a guide and is not legal advice.

Gemma 3 12B Details

Details

Categoryopen
ModalityMultimodal
Context Window128K
Parameters12B
LicenseCustom
Release DateMar 2025

Vision Tasks

CaptioningChart Question AnsweringClassificationDocument Question AnsweringImage TaggingMulti-Label ClassificationOCRVision LanguageVisual Question Answering

Usage

Past 30 Days

Alternatives to Gemma 3 12B

Other models worth comparing for similar use cases.

Gemma 4 12B is an open-weight multimodal model from Google in the Gemma 4 family.
Mistral Small 3.1 24B, released on March 17, 2025, is an open-weight multimodal model from Mistral AI, distributed under the Apache-2.0 license.
Pixtral-12B is a vision-language model introduced by Mistral AI in September 2024 under the Apache 2.0 license, designed to process both text and images in a unified context.
Gemma 3 27B, announced on March 12, 2025, is the largest open-weight model in Google DeepMind’s Gemma 3 family.
GPT-5 Mini, released by OpenAI on August 7, 2025, is a mid-tier variant of the GPT-5 family that balances cost, speed, and capability.