OpenAI DataForSEO AI Optimization Chat GPT LLM Responses Live

按实际用量计费
ae_dataforseo_ai_optimization_chat_gpt_llm_responses_live

通过 DataForSEO 调用 ChatGPT 模型生成回答。请按本接口参数要求,将任务放入 request_body 数组。

效率工具
按实际用量计费

价格说明

单次费用为(较大值(1200 × 实际计费用量(美元), 0))AE积分。各项条件同时适用,按所选条件计算合计费用。

费用受提交的任务数量、所选模型、实际输入与输出用量(包括推理用量)及联网搜索等可选功能影响,按本次调用的实际计费用量结算。输出 token 上限不是实际输出用量。

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
request_bodyarray是暂无参数说明。—
request_body[].tagstring | null否暂无参数说明。—
request_body[].top_pnumber | null否暂无参数说明。—
request_body[].model_namestring否<em>name of the AI model</em><br><strong>required field</strong><br><code>model_name</code >consists of the actual model name and version name;<br>if the basic model name is specified, its latest version will be set by default;<br>for example, if <code>gpt-4.1</code> is specified, the <code>gpt-4.1-2025-04-14</code> will be set as <code>model_name</code> automatically;<br>you can receive the list of available LLM models by making a separate request to the <code>https://api.dataforseo.com/v3/ai_optimization/chat_gpt/llm_responses/models</code>—
request_body[].web_searchboolean | null否暂无参数说明。—
request_body[].temperaturenumber | null否暂无参数说明。—
request_body[].user_promptstring否<em>prompt for the AI model</em><br><strong>required field</strong><br>the question or task you want to send to the AI model;<br>you can specify <strong>up to 500 characters</strong> in the <code>user_prompt</code> field—
request_body[].message_chainarray | null否暂无参数说明。—
request_body[].message_chain[].rolestring | null否暂无参数说明。—
request_body[].message_chain[].messagestring | null否暂无参数说明。—
request_body[].system_messagestring | null否暂无参数说明。—
request_body[].web_search_citystring | null否暂无参数说明。—
request_body[].force_web_searchboolean | null否暂无参数说明。—
request_body[].max_output_tokensinteger | null否暂无参数说明。—
request_body[].web_search_country_iso_codestring | null否暂无参数说明。—

调用示例

复制请求代码,查看对应的返回示例。

POST/agent-api/v1/tool/executeX-Api-Key
请求代码request.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_dataforseo_ai_optimization_chat_gpt_llm_responses_live' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": [
      {
        "max_output_tokens": 200,
        "model_name": "gpt-4o-mini",
        "system_message": "You are a concise assistant. Answer in exactly one short Chinese sentence.",
        "tag": "workbuddy-verify-gpt",
        "user_prompt": "用一句中文回答:ChatGPT Plus 消费者订阅能否用来给 OpenAI API 平台鉴权?API 是否与订阅分开计费?"
      }
    ]
  }
}'
返回示例response.json
JSON部分内容
{
  "status_code": 20000,
  "status_message": "Ok.",
  "tasks": [
    {
      "data": {
        "api": "ai_optimization",
        "function": "llm_responses",
        "max_output_tokens": 200,
        "model_name": "gpt-4o-mini",
        "se": "chat_gpt",
        "system_message": "You are a concise assistant. Answer in exactly one short Chinese sentence."
      },
      "id": "11161236-2802-0612-0000-c855768aaf53",
      "path": [
        "v3"
      ],
      "result": [
        {
          "datetime": "2026-11-16 12:36:04 +00:00",
          "fan_out_queries": null,
          "items": [
            {}
          ],
          "model_name": "gpt-4o-mini-2024-07-18",
          "search_results": null,
          "web_search": false
        }
      ],
      "result_count": 1,
      "status_code": 20000
    }
  ],
  "tasks_count": 1,
  "tasks_error": 0,
  "time": "1.5468 sec."
}

返回示例仅展示部分内容,不代表完整响应;复制内容为合法 JSON。