Anthropic finds over 10,000 vulnerabilities with Project GlasswingSynthID expands to Google Search and ChromeGoal mode now available across all Codex platformsCodex Thursday adds remote Mac controlAnthropic publishes early Project Glasswing resultsAnthropic updates vulnerability disclosure dashboardReleases new science-focused AI skills toolGemini 3.5 Flash released with enhanced research toolsGoogle launches ADK for Kotlin and Android 0.1.0Gemini 3.5 Flash officially launchedAI solves long-standing open math problem for first timeGoogle announces Gemini Omni for video creationUse multiple agents with Gemini OmniOpenAI Introduces Guaranteed Capacity for Long-Term ComputeGemini for Science assists with research tasksSynthID watermark and verification tool added to AI imagesGoogle I/O 2026 to unveil new AI breakthroughsOpenAI boosts image provenance and verificationKPMG rolls out Claude globally, starting with taxGoogle adds Managed Agents to the Gemini APIAnthropic finds over 10,000 vulnerabilities with Project GlasswingSynthID expands to Google Search and ChromeGoal mode now available across all Codex platformsCodex Thursday adds remote Mac controlAnthropic publishes early Project Glasswing resultsAnthropic updates vulnerability disclosure dashboardReleases new science-focused AI skills toolGemini 3.5 Flash released with enhanced research toolsGoogle launches ADK for Kotlin and Android 0.1.0Gemini 3.5 Flash officially launchedAI solves long-standing open math problem for first timeGoogle announces Gemini Omni for video creationUse multiple agents with Gemini OmniOpenAI Introduces Guaranteed Capacity for Long-Term ComputeGemini for Science assists with research tasksSynthID watermark and verification tool added to AI imagesGoogle I/O 2026 to unveil new AI breakthroughsOpenAI boosts image provenance and verificationKPMG rolls out Claude globally, starting with taxGoogle adds Managed Agents to the Gemini API
🔒 公式発表のみ掲載。噂・リーク・情報商材は載せません。
← Back to glossary

Input Token

入力トークン

にゅうりょくとおくん

Definition

Input tokens are the tokens contained in the prompt and context you send to a model, and they determine limits and part of the cost. They are a basic unit for estimating API usage fees.

LLMのAPI料金表を見ると「入力トークンあたり○ドル」という記載があります。この「入力トークン」がどこからどこまでを指すのかを正確に理解することは、コスト管理の第一歩です。入力トークンとは、LLMに送信するプロンプト全体(システムプロンプト、会話履歴、ユーザーの質問など)をトークナイザーで分割した結果の最小単位で、API利用料金の計算基準の一つです。

入力トークンに含まれるもの

入力トークンとしてカウントされるのは、プロンプトに含まれるすべてのテキストです。具体的には、システムプロンプト過去の会話履歴(マルチターンの場合)、ユーザーの最新メッセージ関数定義やツールの説明、そしてRAGで取得した参考文書などがすべて入力トークンに含まれます。会話が長くなるほど履歴が蓄積され、入力トークン数は毎ターン増加していきます。

コンテキストウィンドウとの関係

各モデルにはコンテキストウィンドウ(入力+出力の合計トークン上限)が設定されています。GPT-4oは128Kトークン、Claude 3.5 Sonnetは200Kトークン、Gemini 1.5 Proは最大200万トークンといった具合です。入力トークンが多いほど、出力に使えるトークンの余裕が減ります。コンテキストウィンドウは入力と出力で共有される有限のリソースであることを意識する必要があります。

コスト最適化の戦略

入力トークンのコストを抑えるための戦略はいくつかあります。システムプロンプトの簡潔化として、冗長な指示を削り、本質的な制約だけを残します。会話履歴の管理として、古いメッセージを要約するか、直近の数ターンだけを保持するスライディングウィンドウ方式を採用します。RAGの精度向上として、取得する参考文書を関連性の高いものだけに絞ります。

トークン数の見積もり

英語では1トークンがおよそ4文字に相当しますが、日本語は1文字が1〜3トークンに分割されることが多く、同じ情報量でも英語より多くのトークンを消費します。正確なトークン数はOpenAIのtiktokenライブラリや、各社が提供するトークナイザーで事前に確認できます。プロダクション環境では、リクエストごとのトークン数をモニタリングし、異常な増加を検知する仕組みを設けることが重要です。

料金体系の理解

入力トークンの単価は、一般的に出力トークンよりも安価です。これは、入力の処理(既存テキストの読み込み)が出力の生成(新しいトークンの予測)より計算コストが低いためです。たとえばGPT-4oでは入力が出力の約4分の1の単価に設定されています。このため、長いプロンプトで詳細な指示を与え、出力を短く抑えるほうがコスト効率が良い場合があります。

Related articles

h
hayami

Stay on top of OpenAI, Google & Anthropic updates. An AI digest for business professionals.

Source Policy

We use only official sources. Each article links to the original announcement so you can verify it yourself.

© 2026 hayami. All rights reserved.