> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/ja/burokku/blocks/run-a-model/llama3-2-vision.md).

# Llama 3.2 Vision

OpenRouter経由でLlama 3.2 Visionを実行します。

## v2

Llama 3.2 Vision モデルに質問してください。

任意のテキストプロンプトや定義済みのものを指定できます。このブロックは次の種類のプロンプトをサポートします。

* **自由入力プロンプト** (`制約なし`) - 任意のプロンプトを使用して生の応答を生成します
* **テキスト認識（OCR）** (`ocr`) - モデルは画像内のテキストを認識します
* **視覚質問応答** (`visual-question-answering`) - モデルはプロンプトで送信された質問に答えます
* **キャプション生成（短文）** (`caption`) - モデルは画像の短い説明を提供します
* **キャプション生成** (`detailed-caption`) - モデルは画像の詳細な説明を提供します
* **単一ラベル分類** (`classification`) - モデルは画像コンテンツを指定されたクラスのいずれかとして分類します
* **複数ラベル分類** (`multi-label-classification`) - モデルは画像コンテンツを指定されたクラスの1つ以上として分類します
* **プロンプト不要の物体検出** (`object-detection`) - モデルは画像内の目立つ物体を検出し、バウンディングボックスを返します
* **構造化出力生成** (`structured-answering`) - モデルは指定されたフィールドを持つ JSON 応答を返します

#### 🛠️ APIプロバイダーとモデルバリアント

Llama 3.2 Vision は次を介して提供されます [OpenRouter](https://openrouter.ai/)。デフォルトではこのブロックは **Roboflow管理の OpenRouter キー** を使用し、Roboflow クレジットに課金されます - 追加設定は不要です。Roboflow の請求を回避するには、ご自身の `sk-or-...` キーを `api_key` フィールドに入力してください。

次の `privacy_level` フィールドで、どの OpenRouter プロバイダーがリクエストを処理できるかを制御します：

* **データ収集なし** *（デフォルト）* – プロバイダーはあなたの入力を学習に使用できません。
* **データ収集を許可** – より広いプロバイダープール。
* **ゼロデータ保持** – 最も厳格で、何も保持しないプロバイダーに制限されます。

#### 💡 さらに読む資料と許容利用ポリシー

{% hint style="warning" %}
**モデルライセンス**

次を確認してください [Llama 3.2 ライセンス](https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE) をご利用前に。
{% endhint %}

### 型識別子

ステップで次の識別子を使用してください `"type"` フィールド： `roboflow_core/llama_vision@v2` をワークフローにステップとして追加します。

### プロパティ

| **名前**                    | **型**            | **説明**                                                                                                                                | 参照 |
| ------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -- |
| `name`                    | `str`            | このステップの一意の識別子を入力してください。                                                                                                               | ❌  |
| `api_key`                 | `str`            | OpenRouter API キー。デフォルトでは Roboflow 管理のキーが使用され、Roboflow 経由でクレジット課金されます。ご自身の `sk-or-...` キーを指定すると、Roboflow の請求なしで OpenRouter を直接呼び出せます。 | ✅  |
| `privacy_level`           | `str`            | プロバイダーのプライバシーフィルター。より厳しいレベルほどプロバイダーの候補が減り、管理キーでの 1 回あたりのコストが増える場合があります。                                                               | ❌  |
| `max_tokens`              | `int`            | モデルが応答で生成できるトークンの最大数。                                                                                                                 | ❌  |
| `temperature`             | `float`          | モデルからサンプリングする温度。0.0〜2.0 の範囲の値で、値が高いほど生成結果はよりランダム／「創造的」になります。                                                                          | ✅  |
| `max_concurrent_requests` | `int`            | 画像バッチに対する同時リクエスト数。指定しない場合、このブロックは Workflows Execution Engine でグローバルに設定された値をデフォルトとして使用します。レート制限に達する場合は制限してください。                        | ❌  |
| `task_type`               | `str`            | モデルが実行するタスクの種類。値によって必要なパラメータと出力応答が決まります。                                                                                              | ❌  |
| `prompt`                  | `str`            | Llama モデルへのテキストプロンプト。                                                                                                                 | ✅  |
| `output_structure`        | `Dict[str, str]` | 期待される JSON 応答の構造を持つ辞書。                                                                                                                | ❌  |
| `classes`                 | `List[str]`      | 使用するクラスのリスト。                                                                                                                          | ✅  |
| `model_version`           | `str`            | 使用するモデル。                                                                                                                              | ✅  |

次の **参照** 列は、ワークフロー実行時に利用可能な動的値でプロパティをパラメータ化できることを示します `ワークフロー` 実行時。詳細は *Bindings* を参照してください。

### 実行時の互換性

`requires_internet` - エアギャップ／オフライン環境：このブロックは、完全にオフライン／エアギャップな環境からは到達できないサービスに依存しています。

### 入力と出力のバインディング

利用可能な接続はバインディングの種類に依存します。どのバインディング種類が `Llama 3.2 Vision` バージョンで `v2` を持っているか確認してください。

<details>

<summary>入力と出力のバインディング</summary>

* 入力
  * `api_key` (*Union\[*[*`ROBOFLOW_MANAGED_KEY`*](/workflows/ja/gaido/developer-guide/kinds/roboflow-managed-key.md)*,* [*`シークレット`*](/workflows/ja/gaido/developer-guide/kinds/secret.md)*,* [*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)*]*): OpenRouter API キー。デフォルトでは Roboflow 管理のキーが使用され、Roboflow 経由でクレジット課金されます。ご自身の `sk-or-...` キーを指定すると、Roboflow の請求なしで OpenRouter を直接呼び出せます。
  * `temperature` ([*`float`*](/workflows/ja/gaido/developer-guide/kinds/float.md)): モデルからサンプリングする温度。0.0〜2.0 の範囲の値で、値が高いほど生成結果はよりランダム／「創造的」になります。
  * `images` ([*`image`*](/workflows/ja/gaido/developer-guide/kinds/image.md)): 推論対象の画像。
  * `prompt` ([*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)): Llama モデルへのテキストプロンプト。
  * `classes` ([*`list_of_values`*](/workflows/ja/gaido/developer-guide/kinds/list-of-values.md)): 使用するクラスのリスト。
  * `model_version` ([*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)): 使用するモデル。
* 出力
  * `出力` (*Union\[*[*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/ja/gaido/developer-guide/kinds/language-model-output.md)*]*): 文字列値の場合 `文字列` ): あるいは LLM / VLM の出力の場合 `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/ja/gaido/developer-guide/kinds/list-of-values.md)): 任意の型の値のリスト。

</details>

<details>

<summary>JSON定義の例</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/llama_vision@v2",
	    "api_key": "rf_key:account",
	    "privacy_level": "<block_does_not_provide_example>",
	    "max_tokens": "<block_does_not_provide_example>",
	    "temperature": "<block_does_not_provide_example>",
	    "max_concurrent_requests": "<block_does_not_provide_example>",
	    "images": "$inputs.image",
	    "task_type": "<block_does_not_provide_example>",
	    "prompt": "私のプロンプト",
	    "output_structure": {
	        "my_key": "description"
	    },
	    "classes": [
	        "class-a",
	        "class-b"
	    ],
	    "model_version": "11B - OpenRouter"
	}
```

</details>

## v1

Llama 3.2 Vision モデルの視覚機能を使って質問してください。

任意のテキストプロンプトや定義済みのものを指定できます。このブロックは次の種類のプロンプトをサポートします。

* **自由入力プロンプト** (`制約なし`) - 任意のプロンプトを使用して生の応答を生成します
* **テキスト認識（OCR）** (`ocr`) - モデルは画像内のテキストを認識します
* **視覚質問応答** (`visual-question-answering`) - モデルはプロンプトで送信された質問に答えます
* **キャプション生成（短文）** (`caption`) - モデルは画像の短い説明を提供します
* **キャプション生成** (`detailed-caption`) - モデルは画像の詳細な説明を提供します
* **単一ラベル分類** (`classification`) - モデルは画像コンテンツを指定されたクラスのいずれかとして分類します
* **複数ラベル分類** (`multi-label-classification`) - モデルは画像コンテンツを指定されたクラスの1つ以上として分類します
* **構造化出力生成** (`structured-answering`) - モデルは指定されたフィールドを持つ JSON 応答を返します

{% hint style="warning" %}
**構造化プロンプトに関する問題**

構造化出力（この場合は JSON ドキュメント）が期待されると、モデルはかなり予測しにくくなる傾向があります。その問題は次のようなタスクに影響する可能性があります `structured-answering`, `classification` または `multi-label-classification`.

その原因は、モデルに埋め込まれた不適切なコンテンツに対するかなり敏感な「フィルター」にあるようです。
{% endhint %}

#### 🛠️ APIプロバイダーとモデルバリアント

Llama Vision 3.2 モデルは次を介して提供されます [OpenRouter API](https://openrouter.ai/) を通じて提供されており、 [OpenRouter API キー](https://openrouter.ai/docs/api-keys) の入力が必要です。

サポートされているモデルのバージョンは次のとおりです。

* 小さいバージョン（`11B`）はより高速で安価ですが、 `90B` バージョンを使用すると、より良い結果品質が期待できます
* `通常版` バージョンは有料（通常はより高速）API であり、 `無料版` は OpenRouter クライアント向けに無料で利用できます（2025/01/01 時点）。

現時点では、OpenRouter が Llama 3.2 Vision モデルの唯一のプロバイダーですが、状況が変わった場合はお知らせします。

{% hint style="warning" %}
**API 利用料金**

OpenRouter は、モデルへのアクセスを提供し、利用に応じて料金が発生する外部のサードパーティです。使用前に料金をご確認ください：

* [Llama 3.2 Vision 11B（通常版）](https://openrouter.ai/meta-llama/llama-3.2-11b-vision-instruct/providers)
* [Llama 3.2 Vision 90B（通常版）](https://openrouter.ai/meta-llama/llama-3.2-90b-vision-instruct/providers)
  {% endhint %}

#### 💡 さらに読む資料と許容利用ポリシー

{% hint style="warning" %}
**モデルライセンス**

こちらを確認してください [モデルライセンス](https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE) をご利用前に。
{% endhint %}

[こちらをクリック](https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/MODEL_CARD_VISION.md) して元のモデルカードをご覧ください。

このモデルの使用は Meta の [許容利用ポリシー](https://www.llama.com/llama3/use-policy/).

### 型識別子

ステップで次の識別子を使用してください `"type"` フィールド： `roboflow_core/llama_3_2_vision@v1` をワークフローにステップとして追加します。

### プロパティ

| **名前**                    | **型**            | **説明**                                                                                                                            | 参照 |
| ------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------- | -- |
| `name`                    | `str`            | このステップの一意の識別子を入力してください。                                                                                                           | ❌  |
| `task_type`               | `str`            | モデルが実行するタスクの種類。値によって必要なパラメータと出力応答が決まります。                                                                                          | ❌  |
| `prompt`                  | `str`            | Llama モデルへのテキストプロンプト。                                                                                                             | ✅  |
| `output_structure`        | `Dict[str, str]` | 期待される JSON 応答の構造を持つ辞書。                                                                                                            | ❌  |
| `classes`                 | `List[str]`      | 使用するクラスのリスト。                                                                                                                      | ✅  |
| `api_key`                 | `str`            | あなたの Llama Vision API キー（プロバイダーに依存します。例：OpenRouter API キー）。                                                                       | ✅  |
| `model_version`           | `str`            | 使用するモデル。                                                                                                                          | ✅  |
| `max_tokens`              | `int`            | モデルが応答で生成できるトークンの最大数。                                                                                                             | ❌  |
| `temperature`             | `float`          | モデルからサンプリングする温度。0.0〜2.0 の範囲の値で、値が高いほど生成結果はよりランダム／「創造的」になります。                                                                      | ✅  |
| `max_concurrent_requests` | `int`            | 入力画像のバッチが提供されたときに、ブロックによって実行できる同時リクエスト数。指定しない場合、このブロックは Workflows Execution Engine でグローバルに設定された値をデフォルトとして使用します。制限に達した場合は制限してください。 | ❌  |

次の **参照** 列は、ワークフロー実行時に利用可能な動的値でプロパティをパラメータ化できることを示します `ワークフロー` 実行時。詳細は *Bindings* を参照してください。

### 実行時の互換性

`requires_internet` - エアギャップ／オフライン環境：このブロックは、完全にオフライン／エアギャップな環境からは到達できないサービスに依存しています。

### 入力と出力のバインディング

利用可能な接続はバインディングの種類に依存します。どのバインディング種類が `Llama 3.2 Vision` バージョンで `v1` を持っているか確認してください。

<details>

<summary>入力と出力のバインディング</summary>

* 入力
  * `images` ([*`image`*](/workflows/ja/gaido/developer-guide/kinds/image.md)): 推論対象の画像。
  * `prompt` ([*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)): Llama モデルへのテキストプロンプト。
  * `classes` ([*`list_of_values`*](/workflows/ja/gaido/developer-guide/kinds/list-of-values.md)): 使用するクラスのリスト。
  * `api_key` ([*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)): あなたの Llama Vision API キー（プロバイダーに依存します。例：OpenRouter API キー）。
  * `model_version` ([*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)): 使用するモデル。
  * `temperature` ([*`float`*](/workflows/ja/gaido/developer-guide/kinds/float.md)): モデルからサンプリングする温度。0.0〜2.0 の範囲の値で、値が高いほど生成結果はよりランダム／「創造的」になります。
* 出力
  * `出力` (*Union\[*[*`文字列`*](/workflows/ja/gaido/developer-guide/kinds/string.md)*,* [*`language_model_output`*](/workflows/ja/gaido/developer-guide/kinds/language-model-output.md)*]*): 文字列値の場合 `文字列` ): あるいは LLM / VLM の出力の場合 `language_model_output`.
  * `classes` ([`list_of_values`](/workflows/ja/gaido/developer-guide/kinds/list-of-values.md)): 任意の型の値のリスト。

</details>

<details>

<summary>JSON定義の例</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/llama_3_2_vision@v1",
	    "images": "$inputs.image",
	    "task_type": "<block_does_not_provide_example>",
	    "prompt": "私のプロンプト",
	    "output_structure": {
	        "my_key": "description"
	    },
	    "classes": [
	        "class-a",
	        "class-b"
	    ],
	    "api_key": "xxx-xxx",
	    "model_version": "11B (Free) - OpenRouter",
	    "max_tokens": "<block_does_not_provide_example>",
	    "temperature": "<block_does_not_provide_example>",
	    "max_concurrent_requests": "<block_does_not_provide_example>"
	}
```

</details>
