# 「LLM Responses Claude」タスクの設定

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/ai_optimization/claude/llm_responses/task_post`

**Tags:** DataForSEO

Claude のプロンプトを待たずにキューに登録し、タスク `id` を返します。DataForSEO のエンベロープに包まれます。データは `tasks[0].result`、結果は `tasks[0].status_code` に格納され、拒否されたリクエストでも HTTP 200 が返ります。先に `get_dataforseo_ai_claude_llm_responses_models` で `task_post_supported` を確認し、`get_dataforseo_ai_claude_llm_responses_fetch` で取得してください。

### 料金の参考情報

- 計測方法: 報告されたレスポンスコスト。
- 参考リクエスト見積もり: 0.701 USD。
- 参照用の顧客乗数: 1.0。確定済みの顧客金額に再度適用しないでください。

参照用のメタデータのみであり、アカウントへの見積もり、保証された価格、支出上限ではありません。リソースクレジットは Felo クレジットではありません。最終的な請求は Felo の請求記録に従います。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **no**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": [
      "object",
      "null"
    ],
    "oneOf": [
      {
        "type": "object",
        "properties": {
          "user_prompt": {
            "type": "string",
            "description": "<em>AI モデルへのプロンプト</em><br><strong>必須フィールド</strong><br>AI モデルに送信する質問またはタスク<br><code>user_prompt</code> フィールドには<strong>最大 500 文字</strong>を指定できます"
          },
          "model_name": {
            "type": "string",
            "description": "<em>AI モデルの名前</em><br><strong>必須フィールド</strong><br><code>model_name</code > は実際のモデル名とバージョン名で構成されます<br>基本モデル名を指定した場合、その最新バージョンがデフォルトで設定されます<br>たとえば <code>claude-opus-4-0</code> を指定すると、<code>claude-opus-4-20250514</code> が自動的に <code>model_name</code> に設定されます<br>別途 <code>https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/models</code> にリクエストを送信すると、利用可能な LLM モデルの一覧を取得できます"
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>AI レスポンスの最大トークン数</em><br>任意フィールド<br>最小値: <code>1</code><br>最大値: <code>4096</code><br>デフォルト値: <code>2048</code><br><strong>注意:</strong> <code>web_search</code> を <code>true</code> に設定した場合、またはリクエストで推論モデルを指定した場合、出力トークン数が指定した <code>max_output_tokens</code> の上限を超えることがあります<br><strong>注意 2:</strong> <code>use_reasoning</code> を <code>true</code> に設定した場合、<code>max_output_tokens</code> の最小値は <code>1025</code> です"
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>AI レスポンスのランダム性</em><br>任意フィールド<br>値が大きいほど出力が多様になります<br>値が小さいほど出力が集中します<br>最小値: <code>0</code><br>最大値: <code>1</code><br>デフォルト値: <code>0.7</code><p><strong>注意:</strong> 同じリクエストで <code>temperature</code> と <code>top_p</code> を併用することはできません"
          },
          "top_p": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>AI レスポンスの多様性</em><br>任意フィールド <br>トークンの選択を制限してレスポンスの多様性を制御します<br>最小値: <code>0</code><br>最大値: <code>1</code> <br>デフォルト値: <code>null</code><p><strong>注意:</strong> 同じリクエストで <code>top_p</code> と <code>temperature</code> を併用することはできません"
          },
          "web_search": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>現在の情報のためのウェブ検索を有効化</em><br>任意フィールド<br>有効にすると、AI モデルは現在のウェブ情報にアクセスして引用できます<br><strong>注意:</strong> <code>web_search</code> をサポートするモデルの一覧については、<a href=\"https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/models/\">Models エンドポイント</a>を参照してください <br>デフォルト値: <code>false</code><br>このパラメーターのコストは<a title=\"Anthropic API Pricing\" href=\"https://docs.anthropic.com/en/docs/about-claude/pricing\" target=\"_blank\" rel=\"noopener noreferrer\">料金ページ</a>で計算できます"
          },
          "force_web_search": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>AI エージェントにウェブ検索を強制</em><br>任意フィールド<br>このパラメーターを有効にするには、<code>web_search</code> も有効にする必要があります<br>有効にすると、AI モデルは現在のウェブ情報にアクセスして引用することが強制されます<br>デフォルト値: <code>false</code><br><strong>注意:</strong> パラメーターを <code>true</code> に設定しても、レスポンスでウェブソースが引用される保証はありません"
          },
          "web_search_country_iso_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ウェブ検索に使用するロケーションの ISO 国コード</em><br>任意フィールド<br>使用可能な値: <code>'AR','AT','AU','BE','BR','CA','CH','CL','CN','DE','DK','ES','FI','FR','GB','HK','ID','IN','IT','JP','KR','MX','MY','NL','NO','NZ','PH','PL','PT','RU','SA','SE','TR','TW','US','ZA'</code>"
          },
          "web_search_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ウェブ検索に使用するロケーションの都市名</em><br>任意フィールド<br>"
          },
          "system_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>AI の動作に関する指示</em><br>任意フィールド<br>AI の役割、トーン、または特定の動作を定義します<br><code>system_message</code> フィールドには<strong>最大 500 文字</strong>を指定できます"
          },
          "message_chain": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ],
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "メッセージの発信元ユーザーのロール"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "メッセージテキスト"
                    }
                  }
                }
              ]
            },
            "description": "会話履歴\n任意フィールド\n以前の会話ターンを表すメッセージオブジェクトの配列\n各オブジェクトには次が必要です:\nrole 文字列（user または ai のロール）\nmessage 文字列（メッセージ内容、最大 500 文字）\n配列には最大 10 個のメッセージオブジェクトを指定できます\n注意: Perplexity モデルでは、メッセージは user と AI のロールで厳密に交互にする必要があります（user → ai）\n例:\n\"message_chain\": [{\"role\":\"user\",\"message\":\"Hello, what’s up?\"},{\"role\":\"ai\",\"message\":\"Hello! I’m doing well, thank you. How can I assist you today?\"}]"
          },
          "use_reasoning": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>AI モデルの推論を有効化</em><br>任意フィールド<br>有効にすると、モデルはレスポンスを生成する前に推論を行います<br><code>reasoning</code> をサポートするモデルの一覧については、<a href=\"https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/models/\" target=\"_blank\">Models エンドポイント</a>を参照してください<br>デフォルト値: <code>false</code><br><strong>注意:</strong> <code>true</code> に設定した場合、<code>max_output_tokens</code> の最小値は <code>1025</code> です<br><strong>注意 2:</strong> <code>true</code> に設定した場合、<code>force_web_search</code> は <code>false</code> に設定する必要があります<br><strong>注意 3:</strong> <code>true</code> に設定した場合、<code>temperature</code> と <code>top_p</code> は使用できません"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ユーザー定義のタスク識別子</em><br>任意フィールド<br><em>文字数上限は 255 です</em><br>このパラメーターを使ってタスクを識別し、結果と照合できます<br>指定した <code>tag</code> の値は、レスポンスの <code>data</code> オブジェクトに含まれます"
          },
          "postback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>タスク結果送信用の URL</em><br>任意フィールド<br>タスクが完了すると、結果を <code>gzip</code> 形式で圧縮し、指定した <code>postback_url</code> に POST リクエストを送信します<br>‘$id’ 文字列を <code>$id</code> 変数として、‘$tag’ を URL エンコードされた <code>$tag</code> 変数として使用できます。リクエストの送信前に必要な値を設定します。<br>例:<br><code>http://your-server.com/postbackscript?id=$id</code><br><code>http://your-server.com/postbackscript?id=$id&amp;tag=$tag</code><br><strong>注意:</strong> <code>postback_url</code> 内の特殊文字は URL エンコードされます<br>たとえば、<code>#</code> 文字は <code>%23</code> にエンコードされます<p>詳細については、<a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">ヘルプセンター</a>を参照してください"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>タスク完了通知の URL</em><br>任意フィールド<br>タスクが完了すると、指定した URL に GET リクエストを送信して通知します<br>‘$id’ 文字列を <code>$id</code> 変数として、‘$tag’ を URL エンコードされた <code>$tag</code> 変数として使用できます。リクエストの送信前に必要な値を設定します<br>例:<br><code>http://your-server.com/pingscript?id=$id</code><br><code>http://your-server.com/pingscript?id=$id&amp;tag=$tag</code><br><strong>注意:</strong> <code>pingback_url</code> 内の特殊文字は URL エンコードされます<br>たとえば、<code>#</code> 文字は <code>%23</code> にエンコードされます<p>詳細については、<a href=\"https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api\" target=\"_blank\" rel=\"noopener noreferrer\">ヘルプセンター</a>を参照してください"
          }
        },
        "example": [
          {
            "system_message": "communicate as if we are in a business meeting",
            "message_chain": [
              {
                "role": "user",
                "message": "Hello, what’s up?"
              },
              {
                "role": "ai",
                "message": "Hello! I’m doing well, thank you. How can I assist you today? Are there any specific topics or projects you’d like to discuss in our meeting?"
              }
            ],
            "max_output_tokens": 1024,
            "temperature": 0.3,
            "web_search_country_iso_code": "FR",
            "model_name": "claude-sonnet-4-0",
            "web_search": true,
            "user_prompt": "provide information on how relevant the amusement park business is in France now"
          }
        ]
      }
    ]
  },
  "example": [
    {
      "system_message": "communicate as if we are in a business meeting",
      "message_chain": [
        {
          "role": "user",
          "message": "Hello, what’s up?"
        },
        {
          "role": "ai",
          "message": "Hello! I’m doing well, thank you. How can I assist you today? Are there any specific topics or projects you’d like to discuss in our meeting?"
        }
      ],
      "max_output_tokens": 1024,
      "temperature": 0.3,
      "web_search_country_iso_code": "FR",
      "model_name": "claude-sonnet-4-0",
      "web_search": true,
      "user_prompt": "provide information on how relevant the amusement park business is in France now"
    }
  ]
}
```

## Responses

### 200 — 操作成功

Headers:
- `X-Request-Id` (string) — Felo サポートに問い合わせる際に伝えるリクエスト識別子。

**application/json**

Schema: object | null

```json
{
  "type": [
    "object",
    "null"
  ],
  "oneOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_AiOptimizationClaudeLlmResponsesTaskPostResponseInfo"
    }
  ]
}
```

### 400 — リクエストを処理できませんでした。リクエストパラメータを確認してください。

### 401 — 有効な Felo API キーが必要です。

### 402 — 請求要件が満たされていないため、リクエストを続行できません。

### 403 — このアカウントにはこの操作を行う権限がありません。

### 429 — リクエストまたは支出の上限に達しました。

### 502 — サービスがリクエストを完了できませんでした。

### 503 — API または請求サービスが一時的に利用できません。

### 504 — リクエストの処理中にサービスがタイムアウトしました。

### default — エラーレスポンス。上流のパススルーレスポンスはプロバイダーの形式を使用する場合があります

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_AiOptimizationClaudeLlmResponsesTaskPostResponseInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationClaudeLlmResponsesTaskPostResponseInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseInfo"
    },
    {
      "type": "object",
      "properties": {
        "tasks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_AiOptimizationClaudeLlmResponsesTaskPostTaskInfo"
              }
            ]
          },
          "description": "<em>タスクの配列</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_AiOptimizationClaudeLlmResponsesTaskPostTaskInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationClaudeLlmResponsesTaskPostTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "object",
            "null"
          ],
          "description": "<em>結果の配列</em><br>この場合、値は <code>null</code> になります"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "API の現在のバージョン"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "一般的なステータスコード\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "一般的な情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "合計実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "tasks 配列内のタスク数",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "エラーで返された tasks 配列内のタスク数",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスク識別子\n当社システム内で UUID 形式の一意のタスク識別子"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "タスクのステータスコード\nDataForSEO によって生成され、次の範囲の値になります: 10000-60000\nレスポンスコードの完全な一覧はこちらです"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "タスクの情報メッセージ\n一般的な情報メッセージの完全な一覧はこちらです"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "実行時間（秒）"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "タスクの総コスト（USD）",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "result 配列内の要素数",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL パス"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "POST リクエストで指定したものと同じパラメーターを含みます"
    }
  }
}
```
