FETCHAPI

Get a ChatGPT answer to a prompt API

One call sends a prompt to a specified LLM model and returns the model's text response. Each item in the answer is a message section containing the model's reply text. The answer contained 1 message with 1 text section.

1 live route on DataForSEO, from $0.00071 per call. Every route below answered our last live test on 2026-10-06; the gateway re-tests them daily.

Get a keySee it in the catalogUse it from MCP

Price per call, by route

The upstream price you are metered at, cheapest first. A route without a published price says so.

ProviderEndpointPriceTested
ChatGPT API answer to a promptPOST ai_optimization/chat_gpt/llm_responses/live$0.00071$0.71 / 1k calls✓ 2026-10-06pricing ↗

What it returns

From a real call to the route: DataForSEO.

One call sends a prompt to a specified LLM model and returns the model's text response. Each item in the answer is a message section containing the model's reply text. The answer contained 1 message with 1 text section.
result[].items[].typeType of response (e.g., 'message')result[].items[].sections[].textThe model's text response to the promptresult[].items[].sections[].typeSection type (e.g., 'text')result[].model_nameThe LLM model used (e.g., 'gpt-4o-mini-2024-07-18')result[].input_tokensNumber of tokens in the input promptresult[].output_tokensNumber of tokens in the model's responseresult[].datetimeTimestamp of the response

Call it

HTTP with your key in x-api-key, or the call_endpoint tool of our MCP server.

POST /api/gw/dataforseo/ai_optimization/chat_gpt/llm_responses/live$0.00071 / call✓ working · tested 2026-10-062.79 s latency
Parameters
ParameterTypeNotes
model_namestr · bodyJSON body fielde.g. "gpt-4o-mini"
user_promptstr · bodyJSON body fielde.g. "Where can I buy Pokemon cards online?"
HTTP
curl -X POST "https://fetchapi.co/api/gw/dataforseo/ai_optimization/chat_gpt/llm_responses/live" \
  -H "x-api-key: YOUR_KEY" -H "content-type: application/json" \
  -d '[{"model_name": "gpt-4o-mini", "user_prompt": "Where can I buy Pokemon cards online?"}]'
MCP
call_endpoint("dataforseo.ai_optimization_chat_gpt_llm_responses", {}, [{"model_name": "gpt-4o-mini", "user_prompt": "Where can I buy Pokemon cards online?"}])
Real example answer (trimmed) · 2026-10-04
{
  "cost": 0.00071,
  "time": "2.6819 sec.",
  "tasks": [
    {
      "id": "10040440-2697-0612-0000-876ee1e642bd",
      "cost": 0.00071,
      "data": {
        "se": "chat_gpt",
        "api": "ai_optimization",
        "function": "llm_responses",
        "model_name": "gpt-4o-mini",
        "user_prompt": "Where can I buy Pokemon cards online?"
      },
      "path": [
        "v3",
        "ai_optimization",
        "… 2 more"
      ],
      "time": "2.6759 sec.",
      "result": [
        {
          "items": [
            {
              "type": "…",
              "sections": "…"
            }
          ],
          "datetime": "2026-10-04 04:40:11 +00:00",
          "model_name": "gpt-4o-mini-2024-07-18",
          "web_search": false,
          "money_spent": 0.0001095,
          "input_tokens": 26,
          "output_tokens": 176,
          "fan_out_queries": null,
          "reasoning_tokens": 0
        }
      ],
      "status_code": 20000,
      "result_count": 1,
      "status_message": "Ok."
    }
  ],
  "version": "0.1.20260917",
  "status_code": 20000,
  "tasks_count": 1,
  "tasks_error": 0,
  "status_message": "Ok."
}

Related DataForSEO APIs

All 20 DataForSEO jobs →

One key for every API on this page.

Call it over HTTP or from any MCP client. Each key has a rate limit and a monthly cap; calls are metered at the upstream price.