0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Claude API チートシート 2026 — モデル・料金・制限をまとめて確認

0
Posted at

2026年5月時点のAnthropicの公式ドキュメントをもとに作成しています。

モデル一覧

モデル ID コンテキスト 用途
Claude Opus 4.7 claude-opus-4-7 1M 複雑な推論・最高難度のタスク
Claude Sonnet 4.6 claude-sonnet-4-6 1M ほとんどの本番ワークロード
Claude Haiku 4.5 claude-haiku-4-5-20251001 200K 高速・コスト重視のタスク

💡 Opus 4.7とSonnet 4.6はどちらも1Mトークンのコンテキストを追加料金なしで利用できます。


API料金(100万トークンあたり)

モデル 入力 出力 Batch入力 Batch出力
Opus 4.7 $5.00 $25.00 $2.50 $12.50
Sonnet 4.6 $3.00 $15.00 $1.50 $7.50
Haiku 4.5 $1.00 $5.00 $0.50 $2.50

⚠️ Batch APIは50%割引ですが、処理に最大24時間かかります(非同期のみ)。


プロンプトキャッシュ

キャッシュ種別 料金
キャッシュ書き込み(5分TTL) 入力料金の1.25倍
キャッシュ書き込み(1時間TTL) 入力料金の2倍
キャッシュヒット 入力料金の約0.1倍(最大90%節約)

💡 システムプロンプトや繰り返し使うコンテキスト、長いドキュメントに最適です。


サブスクリプションプラン(APIとは別)

プラン 月払い 年払い 備考
Free $0 $0 Sonnet 4.6、5時間ごとにリセット
Pro $20/月 $17/月 全モデル + Claude Code
Max 5x $100/月 Proの5倍の利用量
Max 20x $200/月 Proの20倍の利用量
Team Standard $25/席 $20/席 最小5席
Team Premium $125/席 $100/席 Claude Code & Cowork含む

⚠️ サブスクリプションとAPIは別課金です。APIは常にトークン単位で請求されます。


基本的なAPI呼び出し

import anthropic

client = anthropic.Anthropic(api_key="your_key")

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "こんにちは!"}
    ]
)
print(message.content[0].text)

Batch API

import anthropic

client = anthropic.Anthropic()

batch = client.messages.batches.create(
    requests=[
        {
            "custom_id": "request-1",
            "params": {
                "model": "claude-sonnet-4-6",
                "max_tokens": 1024,
                "messages": [{"role": "user", "content": "こんにちは!"}]
            }
        }
    ]
)
print(batch.id)

使い分けのポイント

  • Haiku → 分類・要約・大量処理など軽いタスク向け
  • Sonnet → ほとんどの本番用途に最適、コスパ最強
  • Opus → 複雑な推論が必要な場合のみ(Sonnetの約1.7倍、Haikuの5倍のコスト)
  • Batch API → リアルタイム不要なワークロードに(50%安い)
  • プロンプトキャッシュ → 繰り返し使うシステムプロンプトに(最大90%節約)
  • Opus 4.7は新しいTokenizerを使用 — 同じ入力でもOpus 4.6より最大35%多くトークンを消費する可能性あり。max_tokensの設定を見直しましょう。
  • Opus 4.7はデフォルト以外のtemperaturetop_ptop_kを拒否 — 400エラーになるため、これらのパラメータは省略してください。

参考になったら ❤️ をもらえると嬉しいです!

英語版→https://dev.to/hiyoyok/claude-api-cheatsheet-2026-models-pricing-limits-in-one-place-35g
HiyokoBar → https://hiyokoko.gumroad.com/l/hiyokobar
X → @hiyoyok

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?