# ตั้งงาน LLM Responses ของ Claude

**API:** Data API

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

**Tags:** DataForSEO

เข้าคิวคำสั่ง Claude แทนการรอ และคืน `id` ของงาน ห่อด้วย envelope ของ DataForSEO: ข้อมูลอยู่ใน `tasks[0].result` ผลลัพธ์อยู่ใน `tasks[0].status_code` — คำขอที่ถูกปฏิเสธยังคงคืน HTTP 200 ตรวจสอบ `task_post_supported` ใน `get_dataforseo_ai_claude_llm_responses_models` ก่อน แล้วดึงผลด้วย `get_dataforseo_ai_claude_llm_responses_fetch`

### ข้อมูลอ้างอิงราคา

- การวัดปริมาณการใช้งาน: ต้นทุนการตอบกลับที่รายงาน
- ค่าประมาณคำขออ้างอิง: USD 0.701
- ตัวคูณอ้างอิงสำหรับลูกค้า: 1.0 ห้ามนำไปใช้ซ้ำกับยอดที่เรียกเก็บจากลูกค้าแล้ว

เป็นข้อมูลเมตาอ้างอิงเท่านั้น ไม่ใช่ใบเสนอราคาสำหรับบัญชี ไม่ใช่ราคาที่รับประกัน และไม่ใช่เพดานการใช้จ่าย เครดิตของทรัพยากรไม่ใช่เครดิต Felo ยอดเรียกเก็บขั้นสุดท้ายเป็นไปตามบันทึกการเรียกเก็บเงินของ Felo

## Related links

- [endpoint Models](<https://docs.dataforseo.com/v3/ai_optimization/claude/llm_responses/models/>)
- [ราคา](<https://docs.anthropic.com/en/docs/about-claude/pricing>)
- [Help Center](<https://dataforseo.com/help-center/pingbacks-postbacks-with-dataforseo-api>)

## 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>ระบุได้<strong>สูงสุด 500 อักขระ</strong>ในฟิลด์ <code>user_prompt</code>"
          },
          "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>คุณสามารถรับรายการโมเดล LLM ที่ใช้ได้โดยส่งคำขอแยกไปที่ <code>https://api.dataforseo.com/v3/ai_optimization/claude/llm_responses/models</code>"
          },
          "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> หรือระบุโมเดล reasoning ในคำขอ จำนวนโทเคนเอาต์พุตอาจเกินขีดจำกัด <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> ได้ที่endpoint Models; <br>ค่าเริ่มต้น: <code>false</code>;<br>ค่าใช้จ่ายของพารามิเตอร์นี้คำนวณได้จากหน้าราคา"
          },
          "force_web_search": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>บังคับให้ AI agent ใช้การค้นหาเว็บ</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>ระบุได้<strong>สูงสุด 500 อักขระ</strong>ในฟิลด์ <code>system_message</code>"
          },
          "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>เปิดใช้ reasoning สำหรับโมเดล AI</em><br>ฟิลด์ไม่บังคับ<br>เมื่อเปิดใช้งาน โมเดลจะทำ reasoning ก่อนสร้างการตอบกลับ<br>ดูรายการโมเดลที่รองรับ <code>reasoning</code> ได้ที่endpoint Models<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>เมื่องานเสร็จสิ้น เราจะส่งคำขอ POST พร้อมผลลัพธ์ที่บีบอัดในรูปแบบ <code>gzip</code> ไปยัง <code>postback_url</code> ที่คุณระบุ<br>คุณสามารถใช้สตริง ‘$id’ เป็นตัวแปร <code>$id</code> และ ‘$tag’ เป็นตัวแปร <code>$tag</code> ที่เข้ารหัส URL ได้ เราจะตั้งค่าที่จำเป็นก่อนส่งคำขอ<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>ดูข้อมูลเพิ่มเติมได้ที่Help Center ของเรา"
          },
          "pingback_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>URL แจ้งเตือนเมื่องานเสร็จสิ้น</em><br>ฟิลด์ไม่บังคับ<br>เมื่องานเสร็จสิ้น เราจะแจ้งให้คุณทราบผ่านคำขอ GET ที่ส่งไปยัง URL ที่คุณระบุ<br>คุณสามารถใช้สตริง ‘$id’ เป็นตัวแปร <code>$id</code> และ ‘$tag’ เป็นตัวแปร <code>$tag</code> ที่เข้ารหัส URL ได้ เราจะตั้งค่าที่จำเป็นก่อนส่งคำขอ<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>ดูข้อมูลเพิ่มเติมได้ที่Help Center ของเรา"
          }
        },
        "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 — จำเป็นต้องใช้คีย์ API ของ Felo ที่ถูกต้อง

### 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": "รหัสสถานะของงาน\nสร้างโดย DataForSEO โดยอยู่ในช่วงต่อไปนี้ได้: 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"
    }
  }
}
```
