# Gemma 4 31B API，加密货币支付

> 通过 API 调用 Google 的开源权重模型 Gemma 4 31B，每 1M tokens $0.19 / $0.38，比主机商价格中位数低 5%。Apache 2.0，加密货币支付，无需 KYC。

- URL: https://llmwithcrypto.com/zh/models/gemma-4-31b/
- 最后更新: 2026-10-23
- 发布者: LLMwithCrypto (https://llmwithcrypto.com)

Google 的开源权重 Gemma 4 31B instruct 模型，Apache 2.0，运行在 OpenAI 兼容 endpoint 上。按 token 从加密货币余额计费，比五家主机商的中位数低 5%。无需 KYC——无需身份证、无需自拍、无需文件。

**快速回答 — 用加密货币调用 Gemma 4 31B API 要多少钱？**

截至 2026 年 10 月 23 日，Gemma 4 31B（API id `gemma-4-31b`）在 **LLMwithCrypto** 上每百万输入 tokens 为 $0.19，每百万输出 tokens 为 $0.38，比 5 家托管商 的中位数低 5%。其上下文为 256K tokens。Gemma 4 是 Google 的开源权重模型，不是 Gemini。加密货币支付，无需 KYC。

## 我们的价格与其他托管方相比如何？

各托管方自家定价页面上每百万 tokens 的标价，读取于 2026 年 10 月 23 日；不含促销活动。我们的价格是这些价格的中位数减去 5%；每个托管方都在[价格索引](https://llmwithcrypto.com/zh/data/open-model-api-price-index-2026/)中。

| 托管商 | 输入 / 1M | 输出 / 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 |

*价格核查于 2026年10月23日.*

## 如何调用 Gemma 4 31B？

使用 OpenAI SDK，与任何 OpenAI 兼容 API 一样：将 base URL 设为 `https://llmwithcrypto.com/api/v1`，从 `LLMWITHCRYPTO_API_KEY` 读取你的密钥，并将 `gemma-4-31b` 作为 model 传入。像 OpenAI SDK 那样，把 API 密钥作为 Bearer token 放在 Authorization header 中传入。

*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

```

## Gemma 4 31B 适合做什么？

Gemma 4 31B 是 Gemma 4 系列中最大的模型，是 Google 以开源权重发布的 instruct 版本，上下文约为 256K tokens。有五家主机商列出它；价格集中在每百万输入 tokens $0.14 到 $0.39 之间。

我们将其定位为一款紧凑的多语言模型：以低价完成改写、翻译、简短推理和聊天。它是来自 Google 的开源模型，并非我们不出售的 Gemini API。

## Gemma 4 31B 采用什么许可证？

Apache 2.0。Hugging Face 上的 Gemma 4 模型卡指向 Google 的 Gemma 4 许可证页面，该页面适用 Apache 2.0（查阅于 2026 年 10 月 22 日）；更早的 Gemma 版本附带单独的 Gemma Terms of Use。将 Gemma 4 作为 API 托管是允许的。每个模型保留自己的许可证和使用政策（例如 Meta 的 Llama Acceptable Use Policy 和“Built with Llama”声明）；通过我们使用某个模型即表示接受这些条款。

## Gemma 4 31B 常见问题

### Gemma 4 和 Gemini 是同一个吗？

不是。Gemma 模型是 Google 发布、任何人都可以运行的开源权重模型；Gemini 是 Google 的闭源模型。我们不出售 GPT、Claude、Gemini 或 Grok 的访问权限：其开发商禁止未经其批准转售 API 访问，而我们并未获得该批准。

### 有些主机商出售“turbo”版 Gemma 4。是同一个吗？

并不完全是：2026 年 10 月 23 日，DeepInfra 单独列出了一个价格更低的 gemma-4-31B-it-turbo。我们的表格和中位数仅使用标准 instruct 模型。

### 我的数据会被存储吗？

我们不保存你的提示词或模型的回答：响应一旦发出，其文本即消失。每次调用只留一行日志，记录时间、账户、模型和 token 数量，30 天后删除.

## 来源

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

---

LLMwithCrypto: LLMwithCrypto 是一个兼容 OpenAI 的开放权重模型 LLM API，涵盖 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，按 token 从预付加密货币余额中扣费，价格比公共托管商的中位价低 5%。无需 KYC：无需身份证件、无需自拍、无需文件。不存储提示词和输出。
