# Gemma 4 31B vs GPT-5.4 mini

Canonical HTML page: [Gemma 4 31B vs GPT-5.4 mini](<https://impossibl.com/compare/google/gemma-4-31b/openai/gpt-5.4-mini>)
Markdown alternative: [Gemma 4 31B vs GPT-5.4 mini as Markdown](<https://impossibl.com/compare/google/gemma-4-31b/openai/gpt-5.4-mini.md>)

Compare API pricing, context windows, and capabilities side by side. Prices are published API usage rates in USD; check billing units and context tiers alongside each price.

## Specifications and pricing

| Specification | Gemma 4 31B | GPT-5.4 mini |
| --- | --- | --- |
| API identifier | google/gemma-4-31b | openai/gpt-5.4-mini |
| Creator | Google | OpenAI |
| Model type | Text generation | Text generation |
| Inputs | text, image | text, image |
| Outputs | text | text |
| Base input price (USD) | $0.99 per million input tokens | $0.75 per million input tokens |
| Base output price (USD) | $1.49 per million output tokens | $4.50 per million output tokens |
| Cache read price (USD) | Not published | $0.075 per million cached input tokens |
| Cache write price (USD) | Not published | Not published |
| One-hour cache write price (USD) | Not published | Not published |
| Audio input token price (USD) | Not published | Not published |
| Context window | 128,000 tokens | 400,000 tokens |
| Tool calling | Not published | Not published |
| Endpoints | /v1/chat/completions | /v1/chat/completions |
| Context pricing tiers (USD per million tokens) | None published | None published |
| Retirement | Not announced in the public catalog | Not announced in the public catalog |

When total input, including cached input, strictly exceeds a context threshold, the highest qualifying tier applies to the whole request. Consult each model's complete Markdown for tier-specific cache rates; an unpublished tier cache price does not establish the base cache rate.

## Gemma 4 31B vs GPT-5.4 mini: side-by-side summary

Gemma 4 31B and GPT-5.4 mini are available through the Impossibl API.

They share the `/v1/chat/completions` endpoint. Set the model identifier to select the model for a supported request.

Gemma 4 31B is created by Google. It has a 128,000-token context window. Base API pricing (USD): $0.99 per million input tokens; $1.49 per million output tokens.

GPT-5.4 mini is created by OpenAI. It has a 400,000-token context window. Base API pricing (USD): $0.75 per million input tokens; $4.50 per million output tokens.

## Model details

- [Gemma 4 31B: full model facts as Markdown](<https://impossibl.com/google/gemma-4-31b.md>); [HTML model page](<https://impossibl.com/google/gemma-4-31b>)
- [GPT-5.4 mini: full model facts as Markdown](<https://impossibl.com/openai/gpt-5.4-mini.md>); [HTML model page](<https://impossibl.com/openai/gpt-5.4-mini>)

For compatible text or embedding models with token pricing, the HTML comparison page provides a shared workload calculator. It excludes cache creation, tool calls, taxes, balance-purchase fees, and workspace-specific adjustments.

## Sources and related links

Prices, capabilities, limits, and availability describe the public Impossibl API offering. An unpublished fact is unknown; a published zero price is zero. Compare matching billing units and check context tiers before estimating costs.

- [Public Impossibl model catalog](<https://api.impossibl.com/v1/models>)
- [Full model directory as JSON](<https://impossibl.com/models.json>)
- [Model directory as Markdown](<https://impossibl.com/models.md>)
- [API quickstart](<https://impossibl.com/docs/agent-quickstart>)
- [Model documentation](<https://impossibl.com/docs/models>)
