# Gemma 4 31B API, paid in crypto

> Google’s open-weight Gemma 4 31B by API at $0.19 / $0.38 per 1M tokens, 5% below the median host price. Apache 2.0, paid in crypto, no KYC.

- URL: https://llmwithcrypto.com/models/gemma-4-31b/
- Last updated: 2026-10-23
- Publisher: LLMwithCrypto (https://llmwithcrypto.com)

Google’s open-weight Gemma 4 31B instruct model, Apache 2.0, on an OpenAI-compatible endpoint. Billed per token from a crypto balance at 5% below the median of five hosts. No KYC — no ID, no selfie, no documents.

**Quick answer — What does the Gemma 4 31B API cost with crypto?**

As of 23 October 2026, Gemma 4 31B (API id `gemma-4-31b`) costs $0.19 per million input tokens and $0.38 per million output tokens on **LLMwithCrypto**, 5% below the median of 5 hosts. Its context is 256K tokens. Gemma 4 is Google’s open-weight model, not Gemini. Pay in crypto, no KYC.

## How does our price compare with other hosts?

List prices per million tokens on each host's own pricing page, read on 23 October 2026; promotions are left out. Ours is the median of these prices minus 5%; every host is in the [price index](https://llmwithcrypto.com/data/open-model-api-price-index-2026/).

| Host | Input / 1M | Output / 1M |
| --- | --- | --- |
| **LLMwithCrypto** | $0.19 | $0.38 |
| Together AI | $0.39 | $0.97 |
| DeepInfra | $0.20 | $0.40 |
| Novita AI | $0.14 | $0.40 |
| SambaNova Cloud | $0.38 | $1.15 |
| Parasail | $0.15 | $0.40 |

*Prices checked on October 23, 2026.*

## How do I call Gemma 4 31B?

With the OpenAI SDK, as for any OpenAI-compatible API: set the base URL to `https://llmwithcrypto.com/api/v1`, read your key from `LLMWITHCRYPTO_API_KEY`, and pass `gemma-4-31b` as the model. Pass your API key as a Bearer token in the Authorization header, as the OpenAI SDK does.

*gemma_4_31b.py*

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://llmwithcrypto.com/api/v1",
    api_key=os.environ["LLMWITHCRYPTO_API_KEY"],
)

resp = client.chat.completions.create(
    model="gemma-4-31b",
    messages=[{"role": "user", "content": "Rewrite this paragraph in plain English for a twelve-year-old reader."}],
)
print(resp.choices[0].message.content)
print(resp.usage)  # prompt_tokens and completion_tokens: what the call costs

```

## What is Gemma 4 31B good for?

Gemma 4 31B is the largest Gemma 4 model, the instruct version Google published with open weights, with a context of about 256K tokens. Five hosts list it; prices cluster between $0.14 and $0.39 per million input tokens.

We position it as a compact multilingual model: rewriting, translation, short reasoning and chat at a low price. It is an open model from Google, not the Gemini API, which we do not sell.

## What licence does Gemma 4 31B come with?

Apache 2.0. The Gemma 4 model card on Hugging Face points to Google’s Gemma 4 licence page, which applies Apache 2.0 (read 22 October 2026); earlier Gemma versions came with the separate Gemma Terms of Use. Hosting Gemma 4 as an API is allowed. Each model keeps its own licence and use policy (for example Meta’s Llama Acceptable Use Policy and the “Built with Llama” notice); using a model through us means accepting them.

## Gemma 4 31B questions

### Is Gemma 4 the same as Gemini?

No. Gemma models are open weights Google releases for anyone to run; Gemini is Google’s closed model. We do not sell access to GPT, Claude, Gemini or Grok: their makers forbid reselling API access without their approval, and we do not have it.

### Some hosts sell a “turbo” Gemma 4. Is it the same?

Not quite: on 23 October 2026 DeepInfra listed a separate gemma-4-31B-it-turbo at a lower price. Our table and our median use the standard instruct model only.

### Is my data stored?

We do not store your prompts or the model’s answers: once a response is sent, its text is gone. Each call leaves one log line with the time, the account, the model and the token counts, deleted after 30 days.

## Sources

1. [Together AI pricing](https://www.together.ai/pricing) — Together AI (read 2026-10-23)
2. [DeepInfra pricing](https://deepinfra.com/pricing) — DeepInfra (read 2026-10-23)
3. [Novita AI pricing](https://novita.ai/pricing) — Novita AI (read 2026-10-23)
4. [SambaNova Cloud pricing](https://cloud.sambanova.ai/plans/pricing) — SambaNova Cloud (read 2026-10-23)
5. [Parasail pricing](https://www.parasail.io/pricing) — Parasail (read 2026-10-23)
6. [Gemma 4 31B model card](https://huggingface.co/google/gemma-4-31B-it) — Google on Hugging Face (read 2026-10-22)
7. [Gemma 4 licence](https://ai.google.dev/gemma/docs/gemma_4_license) — Google (read 2026-10-22)

---

LLMwithCrypto: LLMwithCrypto is an OpenAI-compatible LLM API for open-weight models — DeepSeek V4 Pro, DeepSeek V4.1 Flash, DeepSeek R1, Qwen3.5 397B A17B, Qwen3 235B A22B Instruct, gpt-oss-120b, gpt-oss-20b, GLM-4.7, Llama 3.3 70B Instruct, Gemma 4 31B, Mistral Large 3, Mistral Small 4 — paid per token from a prepaid crypto balance, at 5% below the median price of the public hosts. No KYC: no ID, no selfie, no documents. Prompts and outputs are not stored.
