Loading...
    • 開発者ガイド
    • API リファレンス
    • MCP
    • リソース
    • リリースノート
    Search...
    ⌘K

    はじめの一歩

    Claudeの紹介クイックスタート

    モデルと料金

    モデル概要モデルの選択Claude 4.5の新機能Claude 4.5への移行モデルの廃止予定価格設定

    Claudeで構築する

    機能概要Messages API の使用コンテキストウィンドウプロンプトのベストプラクティス

    機能

    プロンプトキャッシングコンテキスト編集拡張思考ストリーミングメッセージバッチ処理引用多言語サポートトークンカウント埋め込みビジョンPDFサポートFiles API検索結果Google Sheetsアドオン

    ツール

    概要ツール使用の実装方法トークン効率的なツール使用細粒度ツールストリーミングBashツールコード実行ツールコンピュータ使用ツールテキストエディタツールWeb fetch toolウェブ検索ツールメモリツール

    エージェントスキル

    概要クイックスタートスキル作成のベストプラクティスAPIでエージェントスキルを使用する

    Agent SDK

    概要Agent SDK リファレンス - TypeScriptPython SDK

    ガイド

    ストリーミング入力権限の処理セッション管理Agent SDKのホスティングシステムプロンプトの変更SDK内のMCPカスタムツールSDKにおけるサブエージェントSDKでのスラッシュコマンドSDK内のエージェントスキルコストと使用量の追跡Todo リストSDK のプラグイン

    API内のMCP

    MCPコネクタリモートMCPサーバー

    Claude on 3rd-party platforms

    Amazon BedrockVertex AI

    プロンプトエンジニアリング

    概要プロンプトジェネレータープロンプトテンプレートの使用プロンプト改善ツール明確で直接的な指示例(マルチショットプロンプト)を使用してClaudeの動作を導くClaudeに考えさせる(CoT)XMLタグを使用Claudeに役割を与える(システムプロンプト)Claudeの応答を事前入力複雑なプロンプトのチェーン化長文コンテキストのヒント拡張思考のヒント

    テストと評価

    成功基準を定義するテストケースを開発する評価ツールの使用レイテンシの削減

    ガードレールを強化

    幻覚を減らす出力の一貫性を高めるジェイルブレイクの軽減handle-streaming-refusalsプロンプトリークの削減Claudeのキャラクターを維持

    管理とモニタリング

    Admin API概要使用量とコストAPIClaude Code Analytics API
    Console
    管理とモニタリング

    Admin API概要

    Admin APIを使用して組織のリソース、メンバー、ワークスペース、APIキーをプログラムで管理する方法について学びます。

    The Admin API is unavailable for individual accounts. To collaborate with teammates and add members, set up your organization in Console → Settings → Organization.

    Admin APIを使用すると、組織メンバー、ワークスペース、APIキーなど、組織のリソースをプログラムで管理できます。これにより、Claude Consoleで手動設定が必要な管理タスクをプログラムで制御できます。

    Admin APIには特別なアクセスが必要です

    Admin APIには、標準のAPIキーとは異なる特別なAdmin APIキー(sk-ant-admin...で始まる)が必要です。管理者ロールを持つ組織メンバーのみが、Claude ConsoleからAdmin APIキーをプロビジョニングできます。

    Admin APIの仕組み

    Admin APIを使用する場合:

    1. x-api-keyヘッダーでAdmin APIキーを使用してリクエストを行います
    2. APIでは以下を管理できます:
      • 組織メンバーとそのロール
      • 組織メンバーの招待
      • ワークスペースとそのメンバー
      • APIキー

    これは以下の用途に便利です:

    • ユーザーのオンボーディング/オフボーディングの自動化
    • ワークスペースアクセスのプログラム管理
    • APIキー使用量の監視と管理

    組織のロールと権限

    組織レベルのロールは5つあります。詳細はこちらをご覧ください。

    ロール権限
    userWorkbenchを使用可能
    claude_code_userWorkbenchとClaude Codeを使用可能
    developerWorkbenchとAPIキーの管理が可能
    billingWorkbenchと請求詳細の管理が可能
    admin上記すべてに加えて、ユーザー管理が可能

    主要概念

    組織メンバー

    組織メンバーの一覧表示、メンバーロールの更新、メンバーの削除ができます。

    Shell
    # 組織メンバーの一覧表示
    curl "https://api.anthropic.com/v1/organizations/users?limit=10" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
    
    # メンバーロールの更新
    curl "https://api.anthropic.com/v1/organizations/users/{user_id}" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
      --data '{"role": "developer"}'
    
    # メンバーの削除
    curl --request DELETE "https://api.anthropic.com/v1/organizations/users/{user_id}" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"

    組織への招待

    ユーザーを組織に招待し、その招待を管理できます。

    # 招待の作成
    curl --request POST "https://api.anthropic.com/v1/organizations/invites" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
      --data '{
        "email": "[email protected]",
        "role": "developer"
      }'
    
    # 招待の一覧表示
    curl "https://api.anthropic.com/v1/organizations/invites?limit=10" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
    
    # 招待の削除
    curl --request DELETE "https://api.anthropic.com/v1/organizations/invites/{invite_id}" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"

    ワークスペース

    リソースを整理するためにワークスペース(コンソール)を作成・管理します:

    # ワークスペースの作成
    curl --request POST "https://api.anthropic.com/v1/organizations/workspaces" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
      --data '{"name": "Production"}'
    
    # ワークスペースの一覧表示
    curl "https://api.anthropic.com/v1/organizations/workspaces?limit=10&include_archived=false" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
    
    # ワークスペースのアーカイブ
    curl --request POST "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/archive" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"

    ワークスペースメンバー

    特定のワークスペースへのユーザーアクセスを管理します:

    # ワークスペースへのメンバー追加
    curl --request POST "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
      --data '{
        "user_id": "user_xxx",
        "workspace_role": "workspace_developer"
      }'
    
    # ワークスペースメンバーの一覧表示
    curl "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members?limit=10" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
    
    # メンバーロールの更新
    curl --request POST "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members/{user_id}" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
      --data '{
        "workspace_role": "workspace_admin"
      }'
    
    # ワークスペースからのメンバー削除
    curl --request DELETE "https://api.anthropic.com/v1/organizations/workspaces/{workspace_id}/members/{user_id}" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"

    APIキー

    APIキーの監視と管理:

    # APIキーの一覧表示
    curl "https://api.anthropic.com/v1/organizations/api_keys?limit=10&status=active&workspace_id=wrkspc_xxx" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY"
    
    # APIキーの更新
    curl --request POST "https://api.anthropic.com/v1/organizations/api_keys/{api_key_id}" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ANTHROPIC_ADMIN_KEY" \
      --data '{
        "status": "inactive",
        "name": "New Key Name"
      }'

    組織情報へのアクセス

    /v1/organizations/meエンドポイントを使用して、組織に関する情報をプログラムで取得します。

    例:

    curl "https://api.anthropic.com/v1/organizations/me" \
      --header "anthropic-version: 2023-06-01" \
      --header "x-api-key: $ADMIN_API_KEY"
    {
      "id": "12345678-1234-5678-1234-567812345678",
      "type": "organization",
      "name": "Organization Name"
    }

    このエンドポイントは、Admin APIキーがどの組織に属するかをプログラムで判断するのに便利です。

    完全なパラメータの詳細とレスポンススキーマについては、組織情報APIリファレンスをご覧ください。

    使用量とコストレポートへのアクセス

    組織の使用量とコストレポートにアクセスするには、使用量とコストAPIエンドポイントを使用します:

    • 使用量エンドポイント(/v1/organizations/usage_report/messages)は、ワークスペース、ユーザー、モデルなどの様々な次元でグループ化された、トークン数やリクエストメトリクスを含む詳細な使用量データを提供します。
    • コストエンドポイント(/v1/organizations/cost_report)は、組織の使用量に関連するコストデータを提供し、ワークスペースや説明別に費用を追跡し、コストを配分できます。

    これらのエンドポイントは、組織の使用量と関連コストに関する詳細な洞察を提供します。

    Claude Codeアナリティクスへのアクセス

    Claude Codeを使用している組織の場合、Claude Code Analytics APIは詳細な生産性メトリクスと使用量の洞察を提供します:

    • Claude Code Analyticsエンドポイント(/v1/organizations/usage_report/claude_code)は、セッション、コード行数、コミット、プルリクエスト、ツール使用統計、ユーザーとモデル別に分類されたコストデータを含む、Claude Code使用量の日次集計メトリクスを提供します。

    このAPIにより、開発者の生産性を追跡し、Claude Codeの採用を分析し、組織のカスタムダッシュボードを構築できます。

    ベストプラクティス

    Admin APIを効果的に使用するために:

    • ワークスペースとAPIキーには意味のある名前と説明を使用する
    • 失敗した操作に対する適切なエラーハンドリングを実装する
    • メンバーロールと権限を定期的に監査する
    • 未使用のワークスペースと期限切れの招待をクリーンアップする
    • APIキーの使用量を監視し、定期的にキーをローテーションする

    FAQ

    • Admin APIの仕組み
    • APIキー
    • Claude Codeアナリティクスへのアクセス
    • FAQ
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC