入力
$2.00
USD / 100万トークン
出力
$12.00
USD / 100万トークン
キャッシュ読み取り
$0.20
USD / 100万トークン
キャッシュ書き込み
$0.375
USD / 100万トークン
AI エージェントに任せる
このプロンプトを Claude Code、Cursor、Codex などのコーディングエージェントに貼り付けてください。ドキュメントの場所と API キーの使い方をエージェントに伝えます。
Integrate the model `gemini-3.1-pro` from Lovely Router into this project through the native Anthropic Messages API. - Docs (read first): https://lovelyrouter.com/docs/models/anthropic.md - Use the official Anthropic SDK and only change the base URL to https://lovelyrouter.com (or set ANTHROPIC_BASE_URL=https://lovelyrouter.com). Endpoints: POST https://lovelyrouter.com/v1/messages and /v1/messages/count_tokens, unchanged from Anthropic, so Anthropic's docs are the reference for every parameter. `Authorization: Bearer` works too. - Model id: `gemini-3.1-pro`. GET https://lovelyrouter.com/v1/models lists every model with its price. - Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `x-api-key: $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys. - Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large. - Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt. My task: <describe what you want to build or get>
チャネルグループ別の料金
| チャネルグループ | 入力 | 出力 | キャッシュ読み取り |
|---|---|---|---|
Gemini · Value Pooled capacity | $2.00 | $12.00 | $0.20 |
呼び出し例
クイックスタート →Anthropic Messages API
curl https://lovelyrouter.com/v1/messages \
-H "x-api-key: $LOVELY_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model": "gemini-3.1-pro", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello"}]}'よくある質問
Gemini 3.1 Pro の 100 万トークンあたりの料金は?
最も安いチャネルグループで、入力 100 万トークンあたり $2.00、出力 100 万トークンあたり $12.00 です。入力 10,000・出力 1,000 トークンのリクエストは約 $0.032 です。
Gemini 3.1 Pro はプロンプトキャッシュに対応していますか?
はい。キャッシュ読み取りは 100 万トークンあたり $0.20 なので、同じリクエストで入力 9,000 トークンをキャッシュから読むと約 $0.016 です。Lovely Router は同じ会話を同じチャネルに保ち、キャッシュを有効に保ちます。
Gemini 3.1 Pro のコンテキストウィンドウは?
1.05M トークンです。
Gemini 3.1 Pro はどの API 形式を使いますか?
Anthropic Messages API, OpenAI Chat Completions, Gemini API。お使いの公式 SDK のベース URL を Lovely Router に変え、Lovely Router の API キーを使ってください。
サブスクリプションやレート制限はありますか?
サブスクリプションはありません。プリペイド残高をチャージしてトークン単位で支払います。API キーごとに毎分リクエスト数と同時実行数の上限を設定できます。