> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# メタデータを抽出 (構造化)

> サポートされている大規模言語モデル (LLM) にAIリクエストを送信し、抽出されたメタデータを一連のキー/値ペアとして返します。

抽出の構造を定義するには、メタデータテンプレートまたはフィールドのリストを指定します。テンプレート作成の詳細については、[メタデータテンプレートのカスタマイズ](https://support.box.com/hc/en-us/articles/360044194033-Customizing-Metadata-Templates)を参照するか、[メタデータテンプレートAPI](/guides/metadata/templates/create)を使用してください。

このエンドポイントは、[抽出エージェント (強化)](/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent) もサポートしています。

サポートされているファイル形式と言語については、[ファイルからメタデータを抽出する (構造化)](/guides/box-ai/ai-tutorials/extract-metadata-structured) APIガイドを参照してください。

<Note>
  このリソースは、バージョン2024.0のエンドポイントで使用されています。 詳細については、 [**Box APIのバージョン管理**](/ja/guides/api-calls/api-versioning-strategy/)を参照してください。

  「[Box SDKのバージョニング戦略](/ja/guides/tooling/sdks/sdk-versioning/)について詳しく学ぶ。」
</Note>


## OpenAPI

````yaml box-openapi-jp.json POST /ai/extract_structured
openapi: 3.0.2
info:
  title: Box Platform API
  description: >-
    [Box
    Platform](https://developer.box.com)では、[Box](https://box.com)内に保存されているコンテンツへのアクセス権限を付与する機能が提供されています。また、ファイルとフォルダの基本操作、会社内のユーザーの管理、リーガルホールドやリテンションポリシーなどの複雑なトピックのためのエンドポイントも提供されています。
  termsOfService: https://cloud.app.box.com/s/rmwxu64h1ipr41u49w3bbuvbsa29wku9
  contact:
    name: Box, Inc
    url: https://developer.box.com
    email: devrel@box.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: '2024.0'
  x-box-commit-hash: 92c221bf9d
servers:
  - url: https://api.box.com/2.0
    description: Box Platform APIサーバー。
security:
  - OAuth2Security: []
tags:
  - name: AI
    description: サポート対象のLLMの操作に使用される、一連のエンドポイント。
    x-box-tag: ai
  - name: AI Studio
    description: AI Studioの操作に使用される、一連のエンドポイント。
    x-box-tag: ai_studio
  - name: アプリ項目の関連付け
    x-box-tag: app_item_associations
  - name: 承認
    description: ユーザー承認プロセスを管理するために使用される、一連のエンドポイント。
    x-box-tag: authorization
    x-box-priority: true
  - name: Box Signリクエスト
    description: Box Signリクエストは、署名用ファイルを送信するために使用されます。
    x-box-tag: sign_requests
  - name: Classifications
    description: 分類ラベルは、機密性の高いコンテンツやセキュリティ上の制限が適用されるコンテンツに使用されます。
    x-box-tag: classifications
  - name: ファイルの分類
    description: 分類ラベルは、機密性の高いファイルやセキュリティ上の制限が適用されるファイルに使用されます。
    x-box-tag: file_classifications
  - name: フォルダの分類
    description: 分類ラベルは、機密性の高いフォルダやセキュリティ上の制限が適用されるフォルダに使用されます。
    x-box-tag: folder_classifications
  - name: Collaborations
    description: コラボレーションは、アクセス制限リストと同様に、ユーザーやグループがファイルやフォルダにアクセスする際の権限を定義します。
    x-box-tag: user_collaborations
  - name: コラボレーション (リスト)
    description: ファイル、フォルダ、保留、グループコラボレーションを取得するために使用される、一連のエンドポイント。
    x-box-tag: list_collaborations
  - name: Collections
    description: コレクションを利用して、ファイル、フォルダ、ウェブリンクを1つのフォルダにまとめることなくグループ化できます。
    x-box-tag: collections
  - name: Comments
    description: >-
      コメントは、ユーザーがファイルに対して生成するメッセージです。コメントを使用すると、複数のユーザーがファイル上でコラボレーションし、コンテンツに対するフィードバックについて話し合うことができます。
    x-box-tag: comments
  - name: Device Pinners
    description: Device Pinnerを使用すると、どのデバイスでネイティブBoxアプリケーションの使用を許可するかを企業レベルで制御できます。
    x-box-tag: device_pinners
  - name: ドメインの制限 (ユーザーの除外)
    description: 特定の企業に許可されたコラボレーションドメインのリストによって課せられた制限からユーザーを除外できる、一連のエンドポイント。
    x-box-tag: collaboration_allowlist_exempt_targets
  - name: コラボレーションに対するドメインを制限
    description: ユーザーが企業のファイルやフォルダでコラボレーションできるドメインを管理する、一連のエンドポイント。
    x-box-tag: collaboration_allowlist_entries
  - name: ダウンロード
    description: ダウンロードを利用して、ファイルをアプリケーションのサーバーに保存することも、エンドユーザーがブラウザで直接保存することもできます。
    x-box-tag: downloads
  - name: メールエイリアス
    description: メールエイリアスを使用することで、ユーザーのログイン用プライマリメールアドレスに加えて複数のメールアドレスを指定できます。
    x-box-tag: email_aliases
  - name: Events
    description: イベントを利用して、企業内の任意のユーザー (複数可) またはサービスによって実行される操作をアプリケーションが登録できます。
    x-box-tag: events
  - name: ファイルリクエスト
    description: >-
      ファイルリクエストを利用すると、任意のユーザーに対してファイルとそれに関連付けられたメタデータを迅速かつ安全にリクエストできます。ユーザーは、既存のファイルリクエストを基にして新しいファイルリクエストを作成できるほか、ファイルリクエストの設定を更新したり、プログラムによってファイルリクエストの有効化、無効化、削除を実行したりできます。
    x-box-tag: file_requests
  - name: ファイルバージョンリーガルホールド
    description: >-
      リーガルホールドとは、係争中の訴訟や当然予期される訴訟で、関連する可能性のあるさまざまな形式の情報を企業が保全するために利用できるプロセスのことです。ファイルバージョンリーガルホールドは、特定のファイルバージョンに割り当てられているすべてのポリシーを表します。
    x-box-tag: file_version_legal_holds
  - name: ファイルバージョンリテンション
    description: >-
      リテンションポリシーは、指定した期間にわたってコンテンツが完全に削除されるのを防止します。ファイルバージョンリテンションとは、保持されているファイルバージョンのレコードです。
    x-box-tag: file_version_retentions
  - name: ファイルバージョン
    description: ファイルの特定のバージョンを管理するために使用される、一連のエンドポイント。
    x-box-tag: file_versions
  - name: Files
    description: >-
      ファイルは、フォルダとともに、Box
      APIの中核を成します。ファイルはアップロードおよびダウンロードが可能で、コンテンツに関する重要なメタデータ情報を保持できます。
    x-box-tag: files
  - name: フォルダロック
    description: フォルダロックでは、特定のフォルダが移動または削除されないように、フォルダ所有者によって設定されるアクセス制限を定義します。
    x-box-tag: folder_locks
  - name: Folders
    description: >-
      フォルダは、ファイルとともに、Box
      APIの中核を成します。フォルダはアップロードおよびダウンロードが可能で、コンテンツに関する重要なメタデータ情報を保持できます。
    x-box-tag: folders
  - name: 統合マッピング
    description: 統合マッピングを使用すると、ユーザーはパートナーアプリからのコンテンツがBoxのどこに保存されるかを管理できます。
    x-box-tag: integration_mappings
  - name: グループメンバーシップ
    description: グループメンバーシップは、ユーザーがグループに属していることを示します。
    x-box-tag: memberships
  - name: Groups
    description: 企業内に作成されたグループ。
    x-box-tag: groups
  - name: Invites
    description: 招待は、ユーザーを企業に招待するために使用されます。
    x-box-tag: invites
  - name: リーガルホールドポリシー
    description: >-
      リーガルホールドとは、係争中の訴訟や当然予期される訴訟で、関連する可能性のあるさまざまな形式の情報を企業が保全するために利用できるプロセスのことです。
    x-box-tag: legal_hold_policies
  - name: リーガルホールドポリシー割り当て
    description: >-
      リーガルホールドポリシー割り当ては、ポリシーとカストディアンの関係です。この場合、カストディアンにはユーザー、フォルダ、ファイル、またはファイルバージョンを指定できます。
    x-box-tag: legal_hold_policy_assignments
  - name: メタデータカスケードポリシー
    description: メタデータカスケードポリシーには、フォルダに適用されているメタデータインスタンスを、そのフォルダ内の項目にどのように適用するかが記載されています。
    x-box-tag: metadata_cascade_policies
  - name: メタデータインスタンス (ファイル)
    description: メタデータインスタンスには、テンプレートとファイル間の関係が記載されています。これには、各フィールドに割り当てられている値が含まれます。
    x-box-tag: file_metadata
  - name: メタデータインスタンス (フォルダ)
    description: メタデータインスタンスには、テンプレートとフォルダ間の関係が記載されています。これには、各フィールドに割り当てられている値が含まれます。
    x-box-tag: folder_metadata
  - name: メタデータ階層
    description: メタデータ階層とは、企業内のメタデータを整理して管理するために役立つ、階層型分類システムです。
    x-box-tag: metadata_taxonomies
  - name: メタデータテンプレート
    description: メタデータテンプレートには、ファイルに割り当てることができる、一連の再利用可能なキー/値ペアが記載されています。
    x-box-tag: metadata_templates
  - name: 最近使用した項目
    description: 最近使用した項目は、ユーザーが最近アクセスしたファイルやフォルダなどの項目を表します。
    x-box-tag: recent_items
  - name: リテンションポリシー
    description: >-
      リテンションポリシーは、指定した期間にわたってコンテンツが完全に削除されるのを防止します。管理者はリテンションポリシーを作成して特定のフォルダや企業全体に割り当てることができます。
    x-box-tag: retention_policies
  - name: リテンションポリシー割り当て
    description: >-
      リテンションポリシー割り当ては、ポリシーとフォルダや企業の関係です。割り当てを作成すると、そのフォルダや企業に属するすべてのファイルバージョンにリテンションが適用されます。
    x-box-tag: retention_policy_assignments
  - name: 検索
    description: Box APIを使用すると、ファイルコンテンツ検索クエリを使用してBox内のコンテンツを探すことができます。
    x-box-tag: search
  - name: セッション終了
    description: セッション終了APIを使用すると、グループのロールと権限を検証し、グループのセッションを終了させる非同期ジョブを作成できます。
    x-box-tag: session_termination
  - name: 共有リンク (ファイル)
    description: >-
      ファイル共有リンクは、Boxに保存されているファイルを対象として生成されるURLです。これにより、リソースへの直接的な読み取り専用アクセスが可能になります。
    x-box-tag: shared_links_files
  - name: 共有リンク (フォルダ)
    description: >-
      フォルダ共有リンクは、Boxに保存されているフォルダを対象として生成されるURLです。これにより、リソースへの直接的な読み取り専用アクセスが可能になります。
    x-box-tag: shared_links_folders
  - name: 共有リンク (ウェブリンク)
    description: >-
      ファイル用ウェブリンクは、Box内のウェブリンクを対象として生成されるURLです。これにより、リソースへの直接的な読み取り専用アクセスが可能になります。
    x-box-tag: shared_links_web_links
  - name: 共有リンク (アプリ項目)
    description: Boxに保存されているアプリ項目に対して生成されるURL。これにより、リソースへの直接的な読み取り専用アクセスが可能になります。
    x-box-tag: shared_links_app_items
  - name: Shield情報バリア
    description: >-
      BoxのShield情報バリアは、倫理的境界を定義します。倫理的境界とは、利益相反につながり、結果として倫理的または法的に問題のあるビジネス活動につながる可能性があるやり取りまたは通信を防ぐメカニズムです。
    x-box-tag: shield_information_barriers
  - name: Shield情報バリアのセグメント
    description: >-
      Shield情報バリアのセグメントは、ユーザーの定義済みグループを表します。セグメントがグループと異なる点は、ユーザーが所属できるセグメントが1つのみであることです。
    x-box-tag: shield_information_barrier_segments
  - name: Shield情報バリアのセグメントメンバー
    description: Shield情報バリアのセグメントメンバーは、特定のセグメントに割り当てられたユーザーを表します。
    x-box-tag: shield_information_barrier_segment_members
  - name: Shield情報バリアレポート
    description: Shield情報バリアレポートには、情報バリアが有効化されるときに完全に削除される既存のコラボレーションに関する情報が含まれます。
    x-box-tag: shield_information_barrier_reports
  - name: Shield情報バリアのセグメント制限
    description: Shield情報バリアのセグメント制限とは、コンテンツ (ファイルまたはフォルダ) の所有者に基づいて適用されるアクセス制限です。
    x-box-tag: shield_information_barrier_segment_restrictions
  - name: Box Signテンプレート
    description: >-
      署名テンプレートを使用すると、署名リクエストの作成時に、あらかじめ定義されたBox
      Signテンプレートを使用できます。このテンプレートに含まれるプレースホルダには、リクエストの作成時にデータが自動的に入力されます。
    x-box-tag: sign_templates
  - name: Skills
    description: >-
      Box
      Skillsは、ファイルの基盤となるメタデータを強化することを目的として、Boxにアップロードされたファイルにカスタム処理を実行するための機能です。
    x-box-tag: skills
  - name: 標準およびZonesのストレージポリシー
    description: ストレージポリシー割り当ては、特定の企業内の項目に対するストレージゾーンを表します。
    x-box-tag: storage_policies
  - name: 標準およびZonesのストレージポリシー割り当て
    description: ストレージポリシー割り当ては、ストレージゾーンと割り当てられた項目 (特定のゾーンに保存されているファイルなど) の間の関係を表します。
    x-box-tag: storage_policy_assignments
  - name: タスク割り当て
    description: タスク割り当てでは、完了するためにどのタスクをどのユーザーに割り当てるかを定義します。
    x-box-tag: task_assignments
  - name: Tasks
    description: >-
      ユーザーはタスクを使用することで、ファイルのコラボレータに対して、ファイルのレビューや作業の一部の完了をリクエストできます。タスクは、開発者がファイル中心のワークフローを作成するために使用できます。
    x-box-tag: tasks
  - name: サービス利用規約
    description: サービス利用規約を管理するために使用される、一連のエンドポイント。
    x-box-tag: terms_of_services
  - name: サービス利用規約のユーザーステータス
    description: 特定ユーザーのサービス利用規約のステータスを管理するために使用される、一連のエンドポイント。
    x-box-tag: terms_of_service_user_statuses
  - name: フォルダの移動
    description: ユーザーが所有するすべての項目 (ファイル、フォルダ、およびワークフロー) を別のユーザーのアカウントに移動するためのAPI。
    x-box-tag: transfer
  - name: ごみ箱内のファイル
    description: 削除されて現在ごみ箱にあるファイル。
    x-box-tag: trashed_files
  - name: ごみ箱内のフォルダ
    description: 削除されて現在ごみ箱にあるフォルダ。
    x-box-tag: trashed_folders
  - name: ごみ箱内の項目
    description: 削除されて現在ごみ箱にある項目。
    x-box-tag: trashed_items
  - name: ごみ箱内のウェブリンク
    description: 削除されて現在ごみ箱にあるウェブリンク。
    x-box-tag: trashed_web_links
  - name: アップロード
    description: >-
      直接ファイルアップロードAPIは最大50 MBのファイルをサポートしており、1回のAPIリクエストですべてのバイナリデータをBox
      APIに送信します。
    x-box-tag: uploads
  - name: アップロード (分割)
    description: >-
      分割アップロードエンドポイントは20
      MB以上のファイルをサポートしており、アプリケーションでファイルを複数のパーツに分割してアップロードすることで、エラーのキャッチと個別のパーツの再送信を詳細に制御できます。
    x-box-tag: chunked_uploads
  - name: ユーザーのアバター
    description: >-
      ユーザーのアバターとは、ユーザー画像を表すためにBoxにアップロードされたJPGファイルまたはPNGファイルです。これはユーザーアカウントで表示されます。
    x-box-tag: avatars
  - name: Users
    description: >-
      Box APIは、管理対象ユーザーアカウントでログインする実際の従業員や、App
      Userを使用して強力な自動化ワークフローを推進するアプリケーションなど、さまざまなユーザーをサポートしています。
    x-box-tag: users
  - name: 電子すかし (ファイル)
    description: >-
      電子すかしとは、埋め込みファイルのプレビューに適用される半透明のオーバーレイです。電子すかしには、ビューアーのメールアドレスまたはユーザーIDと、ファイルのアクセス日時が表示されます。
    x-box-tag: file_watermarks
  - name: 電子すかし (フォルダ)
    description: >-
      電子すかしとは、埋め込みフォルダのプレビューに適用される半透明のオーバーレイです。電子すかしには、ビューアーのメールアドレスまたはユーザーIDと、フォルダコンテンツのアクセス日時が表示されます。
    x-box-tag: folder_watermarks
  - name: ウェブリンク
    description: ウェブリンクとは、URLを指すオブジェクトです。これらのオブジェクトはBoxウェブアプリケーション内ではブックマークとも呼ばれます。
    x-box-tag: web_links
  - name: Webhooks
    description: >-
      Webhookを使用すると、Boxコンテンツのイベントを監視し、イベントの発生時に任意のURLへの通知を受け取ることができます。たとえば、ファイルがダウンロードされるのを待ち、ダウンロード後に共有リンクを削除するワークフローを作成できます。
    x-box-tag: webhooks
  - name: ワークフロー (リスト)
    description: Box Relayワークフローは、名前が付けられたフローのコレクションを表すオブジェクトです。
    x-box-tag: workflows
  - name: zipダウンロード
    description: zipダウンロードは、ファイルやフォルダを含むZIPアーカイブを作成するリクエストが成功したことを表します。
    x-box-tag: zip_downloads
externalDocs:
  description: Box Developerドキュメント。
  url: https://developer.box.com
paths:
  /ai/extract_structured:
    post:
      tags:
        - AI
      summary: メタデータを抽出 (構造化)
      description: >-
        サポートされている大規模言語モデル (LLM) にAIリクエストを送信し、抽出されたメタデータを一連のキー/値ペアとして返します。


        抽出の構造を定義するには、メタデータテンプレートまたはフィールドのリストを指定します。テンプレート作成の詳細については、[メタデータテンプレートのカスタマイズ](https://support.box.com/hc/en-us/articles/360044194033-Customizing-Metadata-Templates)を参照するか、[メタデータテンプレートAPI](/guides/metadata/templates/create)を使用してください。


        このエンドポイントは、[抽出エージェント
        (強化)](/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent)
        もサポートしています。


        サポートされているファイル形式と言語については、[ファイルからメタデータを抽出する
        (構造化)](/guides/box-ai/ai-tutorials/extract-metadata-structured)
        APIガイドを参照してください。
      operationId: post_ai_extract_structured
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiExtractStructured'
      responses:
        '200':
          description: LLMからの回答を含む成功したレスポンス。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiExtractStructuredResponse'
        '500':
          description: 予期しないサーバーエラー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
        default:
          description: 予期しないエラー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientError'
      x-codeSamples:
        - lang: curl
          label: メタデータを抽出 (構造化)
          source: |-
            curl -i -L 'https://api.box.com/2.0/ai/extract_structured' \
                 -H 'content-type: application/json' \
                 -H 'authorization: Bearer <ACCESS_TOKEN>' \
                 -d '{
                    "items": [
                      {
                        "id": "12345678",
                        "type": "file",
                        "content": "This is file content."
                      }
                    ],
                    "metadata_template": {
                        "template_key": "",
                        "type": "metadata_template",
                        "scope": ""
                    },
                    "fields": [
                        {
                          "key": "name",
                          "description": "The name of the person.",
                          "displayName": "Name",
                          "prompt": "The name is the first and last name from the email address.",
                          "type": "string",
                          "options": [
                            {
                              "key": "First Name"
                            },
                            {
                              "key": "Last Name"
                            }
                          ]
                        }
                    ],
                    "ai_agent": {
                      "type": "ai_agent_extract_structured",
                      "long_text": {
                        "model": "azure__openai__gpt_4o_mini"
                        },
                      "basic_text": {
                        "model": "azure__openai__gpt_4o_mini"
                     }
                  }
               }'
        - lang: dotnet
          label: メタデータを抽出 (構造化)
          source: >-
            await client.Ai.CreateAiExtractStructuredAsync(requestBody: new
            AiExtractStructured(items: Array.AsReadOnly(new [] {new
            AiItemBase(id: file.Id)})) { Fields = Array.AsReadOnly(new [] {new
            AiExtractStructuredFieldsField(key: "firstName") { DisplayName =
            "First name", Description = "Person first name", Prompt = "What is
            the your first name?", Type = "string" },new
            AiExtractStructuredFieldsField(key: "lastName") { DisplayName =
            "Last name", Description = "Person last name", Prompt = "What is the
            your last name?", Type = "string" },new
            AiExtractStructuredFieldsField(key: "dateOfBirth") { DisplayName =
            "Birth date", Description = "Person date of birth", Prompt = "What
            is the date of your birth?", Type = "date" },new
            AiExtractStructuredFieldsField(key: "age") { DisplayName = "Age",
            Description = "Person age", Prompt = "How old are you?", Type =
            "float" },new AiExtractStructuredFieldsField(key: "hobby") {
            DisplayName = "Hobby", Description = "Person hobby", Prompt = "What
            is your hobby?", Type = "multiSelect", Options =
            Array.AsReadOnly(new [] {new
            AiExtractStructuredFieldsOptionsField(key: "guitar"),new
            AiExtractStructuredFieldsOptionsField(key: "books")}) },new
            AiExtractStructuredFieldsField(key: "address") { DisplayName =
            "Address", Description = "Person address", Type = "struct", Prompt =
            "Extract the full mailing address.", Fields = Array.AsReadOnly(new
            [] {new AiExtractSubField(key: "street") { DisplayName = "Street",
            Type = "string" },new AiExtractSubField(key: "city") { DisplayName =
            "City", Type = "string" },new AiExtractSubField(key: "state") {
            DisplayName = "State", Type = "string" },new AiExtractSubField(key:
            "zip") { DisplayName = "Zip", Type = "string" },new
            AiExtractSubField(key: "country") { DisplayName = "Country", Type =
            "string" }}) },new AiExtractStructuredFieldsField(key:
            "work_history") { DisplayName = "Work history", Description =
            "Person work history", Type = "table", Prompt = "Extract each job as
            a row.", Fields = Array.AsReadOnly(new [] {new
            AiExtractSubField(key: "job_title") { DisplayName = "Job title",
            Type = "string" },new AiExtractSubField(key: "company") {
            DisplayName = "Company", Type = "string" },new
            AiExtractSubField(key: "start_year") { DisplayName = "Start year",
            Type = "string" },new AiExtractSubField(key: "end_year") {
            DisplayName = "End year", Type = "string" }}) }}),
            IncludeConfidenceScore = true, IncludeReference = true });
        - lang: swift
          label: メタデータを抽出 (構造化)
          source: >-
            try await client.ai.createAiExtractStructured(requestBody:
            AiExtractStructured(fields: [AiExtractStructuredFieldsField(key:
            "firstName", displayName: "First name", description: "Person first
            name", prompt: "What is the your first name?", type: "string"),
            AiExtractStructuredFieldsField(key: "lastName", displayName: "Last
            name", description: "Person last name", prompt: "What is the your
            last name?", type: "string"), AiExtractStructuredFieldsField(key:
            "dateOfBirth", displayName: "Birth date", description: "Person date
            of birth", prompt: "What is the date of your birth?", type: "date"),
            AiExtractStructuredFieldsField(key: "age", displayName: "Age",
            description: "Person age", prompt: "How old are you?", type:
            "float"), AiExtractStructuredFieldsField(key: "hobby", displayName:
            "Hobby", description: "Person hobby", prompt: "What is your hobby?",
            type: "multiSelect", options:
            [AiExtractStructuredFieldsOptionsField(key: "guitar"),
            AiExtractStructuredFieldsOptionsField(key: "books")]),
            AiExtractStructuredFieldsField(key: "address", displayName:
            "Address", description: "Person address", type: "struct", prompt:
            "Extract the full mailing address.", fields: [AiExtractSubField(key:
            "street", displayName: "Street", type: "string"),
            AiExtractSubField(key: "city", displayName: "City", type: "string"),
            AiExtractSubField(key: "state", displayName: "State", type:
            "string"), AiExtractSubField(key: "zip", displayName: "Zip", type:
            "string"), AiExtractSubField(key: "country", displayName: "Country",
            type: "string")]), AiExtractStructuredFieldsField(key:
            "work_history", displayName: "Work history", description: "Person
            work history", type: "table", prompt: "Extract each job as a row.",
            fields: [AiExtractSubField(key: "job_title", displayName: "Job
            title", type: "string"), AiExtractSubField(key: "company",
            displayName: "Company", type: "string"), AiExtractSubField(key:
            "start_year", displayName: "Start year", type: "string"),
            AiExtractSubField(key: "end_year", displayName: "End year", type:
            "string")])], items: [AiItemBase(id: file.id)],
            includeConfidenceScore: true, includeReference: true))
        - lang: java
          label: メタデータを抽出 (構造化)
          source: >-
            client.getAi().createAiExtractStructured(new
            AiExtractStructured.Builder(Arrays.asList(new
            AiItemBase(file.getId()))).fields(Arrays.asList(new
            AiExtractStructuredFieldsField.Builder("firstName").description("Person
            first name").displayName("First name").prompt("What is the your
            first name?").type("string").build(), new
            AiExtractStructuredFieldsField.Builder("lastName").description("Person
            last name").displayName("Last name").prompt("What is the your last
            name?").type("string").build(), new
            AiExtractStructuredFieldsField.Builder("dateOfBirth").description("Person
            date of birth").displayName("Birth date").prompt("What is the date
            of your birth?").type("date").build(), new
            AiExtractStructuredFieldsField.Builder("age").description("Person
            age").displayName("Age").prompt("How old are
            you?").type("float").build(), new
            AiExtractStructuredFieldsField.Builder("hobby").description("Person
            hobby").displayName("Hobby").prompt("What is your
            hobby?").type("multiSelect").options(Arrays.asList(new
            AiExtractStructuredFieldsOptionsField("guitar"), new
            AiExtractStructuredFieldsOptionsField("books"))).build(), new
            AiExtractStructuredFieldsField.Builder("address").description("Person
            address").displayName("Address").prompt("Extract the full mailing
            address.").type("struct").fields(Arrays.asList(new
            AiExtractSubField.Builder("street").displayName("Street").type("string").build(),
            new
            AiExtractSubField.Builder("city").displayName("City").type("string").build(),
            new
            AiExtractSubField.Builder("state").displayName("State").type("string").build(),
            new
            AiExtractSubField.Builder("zip").displayName("Zip").type("string").build(),
            new
            AiExtractSubField.Builder("country").displayName("Country").type("string").build())).build(),
            new
            AiExtractStructuredFieldsField.Builder("work_history").description("Person
            work history").displayName("Work history").prompt("Extract each job
            as a row.").type("table").fields(Arrays.asList(new
            AiExtractSubField.Builder("job_title").displayName("Job
            title").type("string").build(), new
            AiExtractSubField.Builder("company").displayName("Company").type("string").build(),
            new AiExtractSubField.Builder("start_year").displayName("Start
            year").type("string").build(), new
            AiExtractSubField.Builder("end_year").displayName("End
            year").type("string").build())).build())).aiAgent(aiExtractStructuredAgentBasicTextConfig).includeConfidenceScore(true).includeReference(true).build())
        - lang: node
          label: メタデータを抽出 (構造化)
          source: |-
            await client.ai.createAiExtractStructured({
              fields: [
                {
                  key: 'firstName',
                  displayName: 'First name',
                  description: 'Person first name',
                  prompt: 'What is the your first name?',
                  type: 'string',
                } satisfies AiExtractStructuredFieldsField,
                {
                  key: 'lastName',
                  displayName: 'Last name',
                  description: 'Person last name',
                  prompt: 'What is the your last name?',
                  type: 'string',
                } satisfies AiExtractStructuredFieldsField,
                {
                  key: 'dateOfBirth',
                  displayName: 'Birth date',
                  description: 'Person date of birth',
                  prompt: 'What is the date of your birth?',
                  type: 'date',
                } satisfies AiExtractStructuredFieldsField,
                {
                  key: 'age',
                  displayName: 'Age',
                  description: 'Person age',
                  prompt: 'How old are you?',
                  type: 'float',
                } satisfies AiExtractStructuredFieldsField,
                {
                  key: 'hobby',
                  displayName: 'Hobby',
                  description: 'Person hobby',
                  prompt: 'What is your hobby?',
                  type: 'multiSelect',
                  options: [
                    { key: 'guitar' } satisfies AiExtractStructuredFieldsOptionsField,
                    { key: 'books' } satisfies AiExtractStructuredFieldsOptionsField,
                  ],
                } satisfies AiExtractStructuredFieldsField,
                {
                  key: 'address',
                  displayName: 'Address',
                  description: 'Person address',
                  type: 'struct',
                  prompt: 'Extract the full mailing address.',
                  fields: [
                    {
                      key: 'street',
                      displayName: 'Street',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'city',
                      displayName: 'City',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'state',
                      displayName: 'State',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'zip',
                      displayName: 'Zip',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'country',
                      displayName: 'Country',
                      type: 'string',
                    } satisfies AiExtractSubField,
                  ],
                } satisfies AiExtractStructuredFieldsField,
                {
                  key: 'work_history',
                  displayName: 'Work history',
                  description: 'Person work history',
                  type: 'table',
                  prompt: 'Extract each job as a row.',
                  fields: [
                    {
                      key: 'job_title',
                      displayName: 'Job title',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'company',
                      displayName: 'Company',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'start_year',
                      displayName: 'Start year',
                      type: 'string',
                    } satisfies AiExtractSubField,
                    {
                      key: 'end_year',
                      displayName: 'End year',
                      type: 'string',
                    } satisfies AiExtractSubField,
                  ],
                } satisfies AiExtractStructuredFieldsField,
              ],
              items: [new AiItemBase({ id: file.id })],
              includeConfidenceScore: true,
              includeReference: true,
              aiAgent: aiExtractStructuredAgentBasicTextConfig,
            } satisfies AiExtractStructured);
        - lang: python
          label: メタデータを抽出 (構造化)
          source: |-
            client.ai.create_ai_extract_structured(
                [AiItemBase(id=file.id)],
                fields=[
                    CreateAiExtractStructuredFields(
                        key="firstName",
                        display_name="First name",
                        description="Person first name",
                        prompt="What is the your first name?",
                        type="string",
                    ),
                    CreateAiExtractStructuredFields(
                        key="lastName",
                        display_name="Last name",
                        description="Person last name",
                        prompt="What is the your last name?",
                        type="string",
                    ),
                    CreateAiExtractStructuredFields(
                        key="dateOfBirth",
                        display_name="Birth date",
                        description="Person date of birth",
                        prompt="What is the date of your birth?",
                        type="date",
                    ),
                    CreateAiExtractStructuredFields(
                        key="age",
                        display_name="Age",
                        description="Person age",
                        prompt="How old are you?",
                        type="float",
                    ),
                    CreateAiExtractStructuredFields(
                        key="hobby",
                        display_name="Hobby",
                        description="Person hobby",
                        prompt="What is your hobby?",
                        type="multiSelect",
                        options=[
                            CreateAiExtractStructuredFieldsOptionsField(key="guitar"),
                            CreateAiExtractStructuredFieldsOptionsField(key="books"),
                        ],
                    ),
                    CreateAiExtractStructuredFields(
                        key="address",
                        display_name="Address",
                        description="Person address",
                        type="struct",
                        prompt="Extract the full mailing address.",
                        fields=[
                            AiExtractSubField(key="street", display_name="Street", type="string"),
                            AiExtractSubField(key="city", display_name="City", type="string"),
                            AiExtractSubField(key="state", display_name="State", type="string"),
                            AiExtractSubField(key="zip", display_name="Zip", type="string"),
                            AiExtractSubField(key="country", display_name="Country", type="string"),
                        ],
                    ),
                    CreateAiExtractStructuredFields(
                        key="work_history",
                        display_name="Work history",
                        description="Person work history",
                        type="table",
                        prompt="Extract each job as a row.",
                        fields=[
                            AiExtractSubField(
                                key="job_title", display_name="Job title", type="string"
                            ),
                            AiExtractSubField(key="company", display_name="Company", type="string"),
                            AiExtractSubField(
                                key="start_year", display_name="Start year", type="string"
                            ),
                            AiExtractSubField(
                                key="end_year", display_name="End year", type="string"
                            ),
                        ],
                    ),
                ],
                ai_agent=ai_extract_structured_agent_basic_text_config,
                include_confidence_score=True,
                include_reference=True,
            )
components:
  schemas:
    AiExtractStructured:
      description: AIによる抽出 (構造化) リクエストオブジェクト。
      type: object
      properties:
        items:
          description: LLMで処理する項目。現在使用できるのはファイルのみです。
          type: array
          items:
            $ref: '#/components/schemas/AiItem--Base'
          maxItems: 25
          minItems: 1
          uniqueItems: true
        metadata_template:
          description: >-
            抽出するフィールドを含むメタデータテンプレート。リクエストを機能させるには、`metadata_template`または`fields`を指定する必要がありますが、両方を指定することはできません。
          type: object
          properties:
            template_key:
              description: メタデータテンプレートの名前。
              type: string
              example: invoiceTemplate
            type:
              description: 値は常に`metadata_template`。
              type: string
              example: metadata_template
              enum:
                - metadata_template
            scope:
              description: >-
                メタデータテンプレートのスコープ。globalまたはenterpriseを指定できます。


                - **global**スコープは、任意のBox Enterpriseで利用できるテンプレートに使用されます。

                -
                **enterprise**スコープは、特定のEnterprise内で作成されたテンプレートを表し、そのEnterpriseのIDが含まれます。
              type: string
              example: enterprise_12345
              maxLength: 40
        fields:
          description: >-
            指定された項目から抽出するフィールド。リクエストを機能させるには、`metadata_template`または`fields`を指定する必要がありますが、両方を指定することはできません。
          type: array
          items:
            type: object
            description: 指定された項目から抽出するフィールド。
            required:
              - key
            properties:
              key:
                description: フィールドの一意の識別子。
                type: string
                example: name
              description:
                description: フィールドの説明。
                type: string
                example: The name of the person.
              displayName:
                description: フィールドの表示名。
                type: string
                example: Name
              prompt:
                description: キーに関するコンテキスト。キーの確認方法やフォーマットの方法を含めることができます。
                type: string
                example: Name is the first and last name from the email address
              type:
                description: >-
                  フィールドのタイプ。`string`、`float`、`date`、`enum`、`multiSelect`、`taxonomy`、`struct`、`table`が含まれますが、これらに限定されるものではありません。
                type: string
                example: enum
              options:
                description: >-
                  このフィールドのオプションのリスト。多くの場合、`enum`および`multiSelect`フィールドタイプと組み合わせて使用します。
                type: array
                items:
                  type: object
                  required:
                    - key
                  properties:
                    key:
                      description: オプションの一意の識別子。
                      type: string
                      example: First Name
                example:
                  - key: First Name
                  - key: Last Name
              fields:
                description: >-
                  このフィールドにネストされたフィールド。`struct`および`table`フィールドタイプとともに使用して、ネスト構造を定義します。
                type: array
                items:
                  $ref: '#/components/schemas/AiExtractSubField'
              taxonomy_key:
                description: >-
                  メタデータ階層の識別子。メタデータ階層ソースの`key`に対応します。`taxonomy`タイプのフィールドを使用する場合は必須です。
                type: string
                example: certification_taxonomy
              namespace:
                description: メタデータ階層ソースの名前空間。既存のメタデータ階層から`taxonomy`タイプのフィールドを使用する場合は必須です。
                type: string
                example: enterprise_123
              options_rules:
                example:
                  multiSelect: false
                  selectableLevels:
                    - 1
                    - 2
                allOf:
                  - $ref: '#/components/schemas/AiOptionsRules'
          minItems: 1
          uniqueItems: true
        ai_agent:
          allOf:
            - $ref: '#/components/schemas/AiExtractStructuredAgent'
            - description: >-
                抽出 (構造化) に使用されるAIエージェント。指定しなかった場合、デフォルトではエージェント (標準)
                になります。抽出エージェント (強化) を使用する場合の詳細については、[抽出エージェント
                (強化)](/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent)
                を参照してください。
        include_confidence_score:
          description: 抽出された各フィールドの信頼度スコアを返すかどうかを示すフラグ。
          type: boolean
          example: true
        include_reference:
          description: 抽出された各フィールドの参照を返すかどうかを示すフラグ。
          type: boolean
          example: true
        taxonomy_sources:
          description: >-
            抽出 (構造化)
            に使用するメタデータ階層ソース。既存のファイルまたはメタデータ階層になります。リクエストを機能させるには、`fields`も指定する必要があります。`taxonomy_sources`は`metadata_template`ではサポートされていません。
          type: array
          items:
            $ref: '#/components/schemas/AiTaxonomySource'
          example:
            - type: taxonomy
              taxonomy_key: certification_taxonomy
              namespace: enterprise_123
            - type: file
              taxonomy_key: industry_taxonomy
              id: '1234567890'
          uniqueItems: true
      required:
        - items
      title: AIによる抽出 (構造化) リクエスト
      x-box-tag: ai
    AiExtractStructuredResponse:
      description: AIによる抽出 (構造化) のレスポンス。
      type: object
      properties:
        answer:
          $ref: '#/components/schemas/AiExtractResponse'
        created_at:
          description: プロンプトに対する回答が作成された時点のISO日付形式のタイムスタンプ。
          type: string
          format: date-time
          example: '2012-12-12T10:53:43-08:00'
        completion_reason:
          description: 応答が終了した理由。
          type: string
          example: done
        confidence_score:
          description: JSON形式の辞書として抽出された各フィールドの信頼度スコアレベルと数値。フィールドが抽出されなかった場合は空になります。
          type: object
          additionalProperties: {}
        reference:
          description: JSON形式の辞書として抽出された各フィールドの参照。フィールドが抽出されなかった場合は空になります。
          type: object
          additionalProperties: {}
        ai_agent_info:
          $ref: '#/components/schemas/AiAgentInfo'
      required:
        - answer
        - created_at
      title: AIによる抽出 (構造化) のレスポンス
      x-box-resource-id: ai_extract_structured_response
      x-box-tag: ai
    ClientError:
      description: 一般的なエラー。
      type: object
      properties:
        type:
          description: 値は常に`error`になります。
          type: string
          example: error
          enum:
            - error
          nullable: false
        status:
          description: レスポンスのHTTPステータス。
          type: integer
          format: int32
          example: 400
          nullable: false
        code:
          description: Box固有のエラーコード。
          type: string
          example: item_name_invalid
          enum:
            - created
            - accepted
            - no_content
            - redirect
            - not_modified
            - bad_request
            - unauthorized
            - forbidden
            - not_found
            - method_not_allowed
            - conflict
            - precondition_failed
            - too_many_requests
            - internal_server_error
            - unavailable
            - item_name_invalid
            - insufficient_scope
        message:
          description: エラーについての短い説明メッセージ。
          type: string
          example: Method Not Allowed
          nullable: false
        context_info:
          description: >-
            このエラーに関する追加コンテキストを含む自由形式のオブジェクト。使用できるフィールドは、エンドポイントごとに定義されています。`message`は唯一の例です。
          type: object
          example:
            message: Something went wrong
          additionalProperties: {}
          nullable: true
        help_url:
          description: このエラーの原因に関する詳細情報にリンクされたURL。
          type: string
          example: >-
            https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/
          nullable: false
        request_id:
          description: Boxサポートに連絡するときに使用できる、このレスポンスの一意の識別子。
          type: string
          example: abcdef123456
          nullable: false
      title: クライアントエラー
      x-box-resource-id: client_error
    AiItem--Base:
      description: LLMで処理する項目。
      type: object
      properties:
        id:
          description: ファイルのID。
          type: string
          example: '123'
        type:
          description: 項目の種類。現在、この値に指定できるのは`file`のみです。
          type: string
          example: file
          enum:
            - file
        content:
          description: 項目のコンテンツ (多くの場合はテキストレプリゼンテーション)。
          example: This is file content.
          type: string
      required:
        - id
        - type
      title: AI項目 (Base)
      x-box-variant: base
      x-box-variants:
        - base
    AiExtractSubField:
      description: AI抽出で使用される構造化および表のフィールドタイプのネストされたフィールドの定義。
      type: object
      properties:
        key:
          description: ネストされたフィールドの一意の識別子。
          type: string
          example: street_name
        description:
          description: ネストされたフィールドの説明。
          type: string
          example: The street name of the address.
        displayName:
          description: ネストされたフィールドの表示名。
          type: string
          example: Street Name
        prompt:
          description: ネストされたフィールドに関するコンテキスト。ネストされたフィールドの確認方法やフォーマットの方法を含めることができます。
          type: string
          example: The street name from the address section
        type:
          description: >-
            ネストされたフィールドのタイプ。`string`、`float`、`date`、`number`、`text`、`boolean`、`enum`、`multiSelect`のタイプが許可されています。
          type: string
          example: string
        options:
          description: このネストされたフィールドのオプションのリスト。`enum`および`multiSelect`のタイプで使用します。
          type: array
          items:
            $ref: '#/components/schemas/AiExtractFieldOption'
      required:
        - key
      title: AIによる抽出 (構造化) のネストされたフィールド
    AiOptionsRules:
      description: >-
        `taxonomy`タイプのテンプレートフィールドのオブジェクト。メタデータ階層オプションの設定を含みます。`taxonomy`タイプのフィールドを使用する場合は必須です。
      type: object
      properties:
        multi_select:
          description: フィールドが複数選択フィールドかどうかを示します。trueの場合、フィールドは複数の値を持つことができます。
          type: boolean
          example: true
        selectable_levels:
          description: フィールドに選択可能なレベル。選択可能なメタデータ階層のレベルを制限するために使用します。
          type: array
          items:
            type: integer
            description: 選択可能なメタデータ階層のレベル。
            example: 1
      title: AIオプションのルール
    AiExtractStructuredAgent:
      description: AIによる抽出 (構造化) リクエストの処理に使用されるAIエージェント。
      type: object
      oneOf:
        - $ref: '#/components/schemas/AiAgentReference'
        - $ref: '#/components/schemas/AiAgentExtractStructured'
      title: AIによる抽出 (構造化) リクエストのエージェント
    AiTaxonomySource:
      description: 抽出 (構造化) に使用するメタデータ階層ソース。既存のCSVファイルまたはメタデータ階層になります。
      type: object
      oneOf:
        - $ref: '#/components/schemas/AiTaxonomyReference'
        - $ref: '#/components/schemas/AiTaxonomyFileReference'
      title: AIメタデータ階層ソース
    AiExtractResponse:
      description: AIによる抽出のレスポンス。このレスポンスのコンテンツは、リクエストされた構成に応じて異なる場合があります。
      type: object
      additionalProperties: {}
      title: AIによる抽出のレスポンス
      x-box-resource-id: ai_extract_response
      x-box-tag: ai
    AiAgentInfo:
      description: リクエストで使用されるモデルおよびプロセッサに関する情報。
      type: object
      properties:
        models:
          description: リクエストに使用されるモデル。
          type: array
          items:
            type: object
            properties:
              name:
                description: リクエストに使用されるモデルの名前。
                type: string
                example: azure__openai__text_embedding_ada_002
              provider:
                description: リクエストに使用されるモデルを所有するプロバイダ。
                type: string
                example: azure
              supported_purpose:
                description: リクエストに使用されるモデルで利用されるサポートされている目的。
                type: string
                example: embedding
        processor:
          description: リクエストに使用されるプロセッサ。
          type: string
          example: basic_text
      title: リクエストで使用されるモデルおよびプロセッサに関する情報。
    AiExtractFieldOption:
      description: AI抽出フィールドのオプション。
      type: object
      properties:
        key:
          description: オプションの一意の識別子。
          type: string
          example: First Name
      required:
        - key
      title: AI抽出フィールドのオプション
    AiAgentReference:
      description: クエリの処理に使用されるAIエージェント。
      type: object
      properties:
        type:
          description: クエリの処理に使用されるAIエージェントのタイプ。
          type: string
          example: ai_agent_id
          enum:
            - ai_agent_id
          nullable: false
        id:
          description: >-
            エージェントのID。これは、カスタムエージェントの場合は数値ID (例: `14031`)、組み込みのエージェントの場合は一意の識別子
            (例: [抽出エージェント
            (強化)](/guides/box-ai/ai-tutorials/extract-metadata-structured#enhanced-extract-agent)
            の場合は`enhanced_extract_agent`) になります。
          type: string
          example: '14031'
          nullable: false
      required:
        - type
        - id
      title: AIエージェントの参照
      x-box-resource-id: ai_agent_reference
      x-box-tag: ai
    AiAgentExtractStructured:
      description: 抽出 (構造化) に使用されるAIエージェント。
      type: object
      properties:
        type:
          description: 抽出に使用されるAIエージェントのタイプ。
          type: string
          example: ai_agent_extract_structured
          enum:
            - ai_agent_extract_structured
          nullable: false
        long_text:
          $ref: '#/components/schemas/AiAgentLongTextTool'
        basic_text:
          $ref: '#/components/schemas/AiAgentBasicTextTool'
        basic_image:
          $ref: '#/components/schemas/AiAgentBasicTextTool'
      required:
        - type
      title: 抽出 (構造化) リクエスト用のAIエージェント
      x-box-resource-id: ai_agent_extract_structured
      x-box-tag: ai
    AiTaxonomyReference:
      description: 抽出 (構造化) に使用するメタデータ階層ソース。リクエストを機能させるには、`fields`も指定する必要があります。
      type: object
      properties:
        type:
          description: メタデータ階層ソースのタイプ。
          type: string
          example: taxonomy
          enum:
            - taxonomy
        taxonomy_key:
          description: メタデータ階層の識別子。メタデータ階層ソースの`taxonomy_key`に対応します。
          type: string
          example: certification_taxonomy
        namespace:
          description: メタデータ階層ソースの名前空間。
          type: string
          example: enterprise_123
      title: AIメタデータ階層の参照
    AiTaxonomyFileReference:
      description: 抽出 (構造化) に使用されるメタデータ階層の`.csv`ファイル。リクエストを機能させるには、`fields`も指定する必要があります。
      type: object
      properties:
        type:
          description: メタデータ階層ソースのタイプ。
          type: string
          example: file
          enum:
            - file
        taxonomy_key:
          description: メタデータ階層の識別子。メタデータ階層ソースの`taxonomy_key`に対応します。
          type: string
          example: certification_taxonomy
        id:
          description: メタデータ階層ソースのID。タイプが`file`の場合は必須、タイプが`taxonomy`の場合はサポートされていません。
          type: string
          example: '1234567890'
      title: AIメタデータ階層のファイル参照
    AiAgentLongTextTool:
      description: 長いテキストの処理に使用されるAIエージェントプロセッサ。
      type: object
      allOf:
        - $ref: '#/components/schemas/AiAgentBasicTextTool'
        - properties:
            embeddings:
              type: object
              properties:
                model:
                  description: 埋め込みを計算するためのAIエージェントに使用されるモデル。
                  type: string
                  example: azure__openai__text_embedding_ada_002
                strategy:
                  type: object
                  properties:
                    id:
                      description: 埋め込みを計算するためのAIエージェントに使用される戦略。
                      type: string
                      example: basic
                    num_tokens_per_chunk:
                      description: チャンクごとのトークンの数。
                      type: integer
                      example: 64
                      maximum: 512
                      minimum: 1
      title: AIエージェントの長いテキストツール
      x-box-tag: ai
    AiAgentBasicTextTool:
      description: 基本テキストの処理に使用されるAIエージェントプロセッサ。
      type: object
      allOf:
        - $ref: '#/components/schemas/AiAgentBasicTextToolBase'
        - properties:
            system_message:
              description: LLMが、その役割と実行するべき内容を「理解」するのを支援するためのシステムメッセージ。
              type: string
              example: You are a helpful travel assistant specialized in budget travel
            prompt_template:
              description: >-
                プロンプトテンプレートには、リクエストのコンテキスト情報とユーザープロンプトが含まれます。`prompt_template`パラメータを渡す場合、`{user_question}`および`{content}`の入力を**含める必要があります**。`{current_date}`は、用途に応じて省略できます。
              type: string
              example: >-
                It is `{current_date}`, consider these travel options
                `{content}` and answer the `{user_question}`.
              maxLength: 10000
              pattern: >-
                (\{user_question\}[\s\S]*?\{content\}|\{content\}[\s\S]*?\{user_question\})
      title: AIエージェントの基本テキストツール
      x-box-tag: ai
    AiAgentBasicTextToolBase:
      description: 基本テキストの処理に使用されるAIエージェントプロセッサ。
      type: object
      properties:
        model:
          description: >-
            基本テキストに対するAIエージェントで使用されるモデル。特定のモデル値については、[利用可能なモデルのリスト](/guides/box-ai/ai-models)を参照してください。
          type: string
          example: azure__openai__gpt_4o_mini
        num_tokens_for_completion:
          description: 完了に必要なトークンの数。
          type: integer
          example: 8400
          minimum: 1
        llm_endpoint_params:
          $ref: '#/components/schemas/AiLlmEndpointParams'
      title: AIエージェントの基本テキストツール
      x-box-tag: ai
    AiLlmEndpointParams:
      description: モデル固有のLLMエンドポイントのパラメータ。
      type: object
      oneOf:
        - $ref: '#/components/schemas/AiLlmEndpointParamsOpenAi'
        - $ref: '#/components/schemas/AiLlmEndpointParamsGoogle'
        - $ref: '#/components/schemas/AiLlmEndpointParamsAWS'
        - $ref: '#/components/schemas/AiLlmEndpointParamsIBM'
      title: AI LLMエンドポイントパラメータ
    AiLlmEndpointParamsOpenAi:
      description: AI LLMエンドポイントパラメータ (OpenAI) オブジェクト。
      type: object
      properties:
        type:
          description: OpenAI用のAI LLMエンドポイントパラメータオブジェクトのタイプ。このパラメータは**必須**です。
          type: string
          example: openai_params
          enum:
            - openai_params
          nullable: false
        temperature:
          description: >-
            使用するサンプリングtemperature
            (0～2の間)。0.8のような高い値を指定すると、出力がよりランダムになるのに対し、0.2のような低い値を指定すると、出力はより焦点を絞った、決定的なものになります。一般的には、この値と`top_p`の両方ではなく、いずれかを変更することをお勧めします。
          type: number
          example: 0
          maximum: 2
          minimum: 0
          nullable: true
        top_p:
          description: >-
            temperatureによるサンプリングの代替手段
            (核サンプリングと呼ばれます)。この場合、モデルは`top_p`の確率質量を持つトークンの結果を考慮します。つまり、0.1の場合は、上位10%の確率質量で構成されるトークンのみが考慮されます。一般的には、この値とtemperatureの両方ではなく、いずれかを変更することをお勧めします。
          type: number
          example: 1
          maximum: 1
          minimum: 0.1
          nullable: true
        frequency_penalty:
          description: >-
            \-2.0から2.0までの数値。正の値の場合は、新しいトークンがこれまでにテキストに出現した回数に基づいてそのトークンにペナルティを与え、モデルが同じ行をそのまま繰り返す可能性を低減させます。
          type: number
          example: 1.5
          maximum: 2
          minimum: -2
          nullable: true
        presence_penalty:
          description: >-
            \-2.0から2.0までの数値。正の値の場合は、新しいトークンがこれまでにテキストに出現したかどうかに基づいてそのトークンにペナルティを与え、モデルが新しいトピックについて語る可能性を引き上げます。
          type: number
          example: 1.5
          maximum: 2
          minimum: -2
          nullable: true
        stop:
          description: APIがトークンをそれ以上生成するのを停止する、最大4つのシーケンス。
          type: string
          example: <|im_end|>
          nullable: true
      required:
        - type
      title: AI LLMエンドポイントパラメータ (OpenAI)
      x-box-resource-id: ai_llm_endpoint_params_openai
    AiLlmEndpointParamsGoogle:
      description: AI LLMエンドポイントパラメータ (Google) オブジェクト。
      type: object
      properties:
        type:
          description: Google用のAI LLMエンドポイントパラメータオブジェクトのタイプ。このパラメータは**必須**です。
          type: string
          example: google_params
          enum:
            - google_params
          nullable: false
        temperature:
          description: >-
            temperatureはレスポンス生成時のサンプリングに使用されます。レスポンス生成は`top-P`と`top-K`が適用された場合に発生します。temperatureは、トークン選択におけるランダム性の程度を制御します。
          type: number
          example: 0
          maximum: 2
          minimum: 0
          nullable: true
        top_p:
          description: >-
            `Top-P`では、モデルが出力用にトークンを選択する方法を変更します。トークンは、確率の合計が`top-P`値に等しくなるまで、確率の高いもの
            (`top-K`を参照) から低いものへと選択されます。
          type: number
          example: 1
          maximum: 2
          minimum: 0.1
          nullable: true
        top_k:
          description: >-
            `Top-K`では、モデルが出力用にトークンを選択する方法を変更します。`top-K`が小さい場合、次に選択されるトークンは、モデルの語彙に含まれるすべてのトークンの中で最も確率の高いものであることになります
            (グリーディデコードとも呼ばれます)。`top-K`が大きい場合は、temperatureを使用して、最も確率が高い上位3つのトークンから次のトークンが選択されることになります。
          type: number
          example: 1
          maximum: 2
          minimum: 0.1
          nullable: true
      required:
        - type
      title: AI LLMエンドポイントパラメータ (Google)
      x-box-resource-id: ai_llm_endpoint_params_google
    AiLlmEndpointParamsAWS:
      description: AI LLMエンドポイントパラメータ (AWS) オブジェクト。
      type: object
      properties:
        type:
          description: AWS用のAI LLMエンドポイントパラメータオブジェクトのタイプ。このパラメータは**必須**です。
          type: string
          example: aws_params
          enum:
            - aws_params
          nullable: false
        temperature:
          description: >-
            使用するサンプリングtemperature
            (0～1の間)。0.8のような高い値を指定すると、出力がよりランダムになるのに対し、0.2のような低い値を指定すると、出力はより焦点を絞った、決定的なものになります。一般的には、この値と`top_p`の両方ではなく、いずれかを変更することをお勧めします。
          type: number
          example: 0.5
          maximum: 1
          minimum: 0
          nullable: true
        top_p:
          description: >-
            temperatureによるサンプリングの代替手段
            (核サンプリングと呼ばれます)。この場合、モデルは`top_p`の確率質量を持つトークンの結果を考慮します。つまり、0.1の場合は、上位10%の確率質量で構成されるトークンのみが考慮されます。一般的には、この値とtemperatureの両方ではなく、いずれかを変更することをお勧めします。
          type: number
          example: 0.5
          maximum: 1
          minimum: 0
          nullable: true
      required:
        - type
      title: AI LLMエンドポイントパラメータ (AWS)
      x-box-resource-id: ai_llm_endpoint_params_aws
    AiLlmEndpointParamsIBM:
      description: AI LLMエンドポイントパラメータ (IBM) オブジェクト。
      type: object
      properties:
        type:
          description: IBM用のAI LLMエンドポイントパラメータオブジェクトのタイプ。このパラメータは**必須**です。
          type: string
          example: ibm_params
          enum:
            - ibm_params
          nullable: false
        temperature:
          description: >-
            使用するサンプリングtemperature
            (0～1の間)。0.8のような高い値を指定すると、出力がよりランダムになるのに対し、0.2のような低い値を指定すると、出力はより焦点を絞った、決定的なものになります。一般的には、この値と`top_p`の両方ではなく、いずれかを変更することをお勧めします。
          type: number
          example: 0.5
          nullable: true
        top_p:
          description: >-
            temperatureによるサンプリングの代替手段
            (核サンプリングと呼ばれます)。この場合、モデルは`top_p`の確率質量を持つトークンの結果を考慮します。つまり、0.1の場合は、上位10%の確率質量で構成されるトークンのみが考慮されます。一般的には、この値とtemperatureの両方ではなく、いずれかを変更することをお勧めします。
          type: number
          example: 0.5
          maximum: 1
          minimum: 0.1
          nullable: true
        top_k:
          description: >-
            `Top-K`では、モデルが出力用にトークンを選択する方法を変更します。`top-K`が小さい場合、次に選択されるトークンは、モデルの語彙に含まれるすべてのトークンの中で最も確率の高いものであることになります
            (グリーディデコードとも呼ばれます)。`top-K`が大きい場合は、temperatureを使用して、最も確率が高い上位3つのトークンから次のトークンが選択されることになります。
          type: number
          example: 1
          nullable: true
      required:
        - type
      title: AI LLMエンドポイントパラメータ (IBM)
      x-box-resource-id: ai_llm_endpoint_params_ibm
  securitySchemes:
    OAuth2Security:
      type: oauth2
      description: >-
        The access token received from the authorization server in the OAuth 2.0
        flow.
      flows:
        authorizationCode:
          authorizationUrl: https://account.box.com/api/oauth2/authorize
          tokenUrl: https://api.box.com/oauth2/token
          scopes:
            root_readonly: Boxに格納されているすべてのファイルとフォルダの読み取り
            root_readwrite: Boxに格納されているすべてのファイルとフォルダの読み取りと書き込み
            manage_app_users: App Userのプロビジョニングと管理
            manage_managed_users: 管理対象ユーザーのプロビジョニングと管理
            manage_groups: 企業のグループの管理
            manage_webhook: APIを使用したプログラムによるWebhookの作成
            manage_enterprise_properties: Enterpriseのプロパティを管理
            manage_data_retention: データリテンションポリシーの管理
            manage_legal_hold: リーガルホールドの管理

````