OpenRouter の google/gemma-4-31b-it:free モデル API,無料,コンテキスト 262,144 トークン。curl・Python・JavaScript のコード例とライブテスト。
Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...
- 種類
- モデル
- プロバイダー
- OpenRouter
- モデル ID
google/gemma-4-31b-it:free- 料金
- 無料
- キーなしで利用
- いいえ
- キーの環境変数
OPENROUTER_API_KEY- ベース URL(OpenAI 互換)
https://openrouter.ai/api/v1- コンテキスト
- 262,144 トークン
- 入力
- 画像, テキスト, 動画
- 機能
- 推論, JSON 出力, ツール呼び出し
- 開発者の評価
- まだ評価がありません
- ドキュメント
- https://openrouter.ai/google/gemma-4-31b-it:free
- 最終確認
- 2026-12-05T01:26:39+00:00
コード例
cURL
curl https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{"model":"google/gemma-4-31b-it:free","messages":[{"role":"user","content":"こんにちは。一文で自己紹介してください。"}]}'Python
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
r = client.chat.completions.create(
model="google/gemma-4-31b-it:free",
messages=[{"role": "user", "content": "こんにちは。一文で自己紹介してください。"}],
)
print(r.choices[0].message.content)JavaScript
// npm install openai
import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY })
const r = await client.chat.completions.create({
model: 'google/gemma-4-31b-it:free',
messages: [{ role: 'user', content: 'こんにちは。一文で自己紹介してください。' }],
})
console.log(r.choices[0].message.content)
人気の検索
よくある質問
Google: Gemma 4 31B (free) の API は無料ですか?
はい。Google: Gemma 4 31B (free) は API キーを使って無料で利用できます(プロバイダーのレート制限の範囲内)。
コードから Google: Gemma 4 31B (free) を呼び出すには?
Google: Gemma 4 31B (free) は https://openrouter.ai/api/v1 で OpenAI 互換 API を提供しています。このベース URL を指定すれば、任意の OpenAI SDK(Python、JavaScript など)で利用できます。 モデル ID:google/gemma-4-31b-it:free。 ストリーミング・JSON・再試行に対応したすぐ使えるコードを開発者ツールキットで提供しています。
Google: Gemma 4 31B (free) のコンテキストウィンドウは?
Google: Gemma 4 31B (free) は最大 262,144 トークンのコンテキスト(プロンプトと履歴)を扱えます。
Google: Gemma 4 31B (free) の代替は?
カタログ内の類似 API:gemma-4-26B-A4B-it · AkashML, gemma-4-26B-A4B-it · Cloudflare, gemma-4-26B-A4B-it · DeepInfra, gemma-4-26B-A4B-it · Google, gemma-4-26B-A4B-it · Makora。
代替候補
- gemma-4-26B-A4B-it · AkashML — 有料
- gemma-4-26B-A4B-it · Cloudflare — 有料
- gemma-4-26B-A4B-it · DeepInfra — 有料
- gemma-4-26B-A4B-it · Google — 有料
- gemma-4-26B-A4B-it · Makora — 有料
- gemma-4-26B-A4B-it · NextBit — 有料
- gemma-4-26B-A4B-it · Parasail — 有料
- gemma-4-26B-A4B-it · PrimeIntellect — 有料
- gemma-4-26B-A4B-it · Venice — 有料
- gemma-4-31B-it · CoreWeave — 有料
- gemma-4-31B-it · Crusoe — 有料
- gemma-4-31B-it · DeepInfra — 有料