# Anthropic Claude

### このブロックについて

Anthropic Claude ブロックを使うと、Workflow から Anthropic Claude API を呼び出せます。

このブロックは、Workflows がサポートするあらゆるマルチモーダルタスクで使用できます。

その後、API からの結果を Workflow の出力に直接返すことができます。

結果を他のブロックへの入力として使用することもできます。たとえば、Claude に yes/no の質問を行い、VLM as Classifier ブロックで結果を処理し、その情報を Continue-If ブロックで Workflow のフロー制御に使用できます。

このブロックを使用するには、Anthropic API key が必要です。 [Anthropic API key の作成方法を確認してください。](https://docs.anthropic.com/en/api/admin-api/apikeys/get-api-key)

<figure><img src="/files/8d7d2a9820f6b093c425c13152f87ee3c5f3533c" alt=""><figcaption><p>Single-Label Classification Model ブロック。</p></figcaption></figure>

### このブロックに送信できるもの

Object Detection Model ブロックは次の対象に対して実行できます。

1. Workflow に送信する画像
2. Workflow に送信する動画フレーム
3. Workflow 内で計算される画像の切り抜かれた領域（つまり、Crop ブロックを使用）

### ブロックの設定方法

このブロックを設定する際には、次の情報を指定する必要があります:

* task type。
* Claude に送信する prompt。
* Anthropic API key

Open Prompt はデフォルトの task type です。これにより、独自の prompt を Claude に送信できます。

single-label や multi-label classification など、他の task type も選択できます。これらのタスクは、他の Workflow ブロックが理解できる形式でデータを返すように設定されています。Claude を Workflow 内の他のブロックと併用する予定がある場合に最適です。

<figure><img src="/files/40ada68c24a59116b89624819186c3f08d9f0167" alt=""><figcaption></figcaption></figure>

Additional Properties セクションから、使用する model version も選択できます:

<figure><img src="/files/ad9f1beeb042fda4965a9dda6339f93f12846e72" alt=""><figcaption><p>model version を選択します。</p></figcaption></figure>

### このブロックが返すもの

### ユースケース

このブロックは、cloud vision language model (VLM) を呼び出したいあらゆる Workflow に役立ちます。

自分のハードウェア上で動作する VLM が必要な場合は、Qwen-VL 2.5 ブロックを試すことをおすすめします。

### 予測の形式

下のカードを展開すると、このブロックが返す JSON データを確認できます。

<details>

<summary>予測の形式</summary>

Open Prompt リクエストの場合、このブロックは次の形式でデータを返します:

```json
[
  {
    "output":  , 
    "anthropic_claude": {
      "output": "画像には、AI model task setup のユーザーインターフェースが表示されています。インターフェース内には \"Task Type\" セクションがあり、\"Open Prompt\" が選択されています。その下に \"Prompt\" フィールドがあり、次のテキストが入力されています: \"What is the dock number? Return like A1.\"

また、\"API Key\" フィールドもあり、マスクされた値（セキュリティのため点で表示）が入力されているように見えます。

画像自体には dock number は見当たりません。Prompt フィールドのテキストは、AI model に dock number を特定し、\"A1\" のような特定の形式で応答するよう指示しているようですが、共有された画像には実際の dock number は含まれていません。\",
      "classes": null
    }
  }
]
```

</details>

### デプロイに関する考慮事項

このブロックを使用するには、インターネット接続が必要です。つまり、インターネット接続がない場合、このブロックを edge にデプロイすることはできません。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-jp/workflows/workflow-blocks/run-a-model/anthropic-claude.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
