# Live ChatGPT LLM Responses

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/ai_optimization/chat_gpt/llm_responses/live`

**Tags:** DataForSEO

Sends a `user_prompt` to a ChatGPT model and returns its reply, synchronously. `model_name` picks the model - see `get_dataforseo_ai_chat_gpt_llm_responses_models`, and an unlisted name is rejected outright. `max_output_tokens`, `temperature` and `top_p` behave as they do on the vendor's own API, and `web_search` or `force_web_search` let it browse. Returns `model_name`, `input_tokens`, `output_tokens`, `reasoning_tokens`, `web_search`, `money_spent`, `datetime`, `items` and `fan_out_queries`. Read `money_spent` on the response to see what a prompt actually cost. Wrapped in DataForSEO's envelope: data in `tasks[0].result`, outcome in `tasks[0].status_code` - a rejected request still returns HTTP 200. ⚠️ This is a general LLM call routed through a data provider, not an SEO measurement. If you want to know what ChatGPT tells users about a brand, `post_dataforseo_ai_chat_gpt_llm_scraper_live` reproduces the consumer experience instead.

### Pricing reference

- Metering: Reported response cost.
- Reference request estimate: USD 0.0695.
- Reference customer multiplier: 1.0. Do not apply it again to a settled customer amount.

Reference metadata only, not an account quote, a guaranteed price or a spending cap. Resource credits are not Felo credits. Final charges follow Felo billing records.

## 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>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"
          },
          "model_name": {
            "type": "string",
            "description": "<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>"
          },
          "max_output_tokens": {
            "type": [
              "integer",
              "null"
            ],
            "description": "<em>maximum number of tokens in the AI response</em><br>optional field<br>minimum value for reasoning models (e.g., <code>reasoning</code> is <code>true</code> in the <a href=\"/v3/ai_optimization/chat_gpt/llm_responses/models/\" target=\"_blank\">Models endpoint</a>): <code>1024</code>;<br>minimum value for non-reasoning models: <code>16</code>;<br>maximum value: <code>4096</code>;<br>default value: <code>2048</code><br><strong>Note:</strong> if <code>web_search</code> is set to <code>true</code> or the reasoning model is specified in the request, the output token count may exceed the specified <code>max_output_tokens</code> limit"
          },
          "temperature": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>randomness of the AI response</em><br>optional field<br>higher values make output more diverse; <br>lower values make output more focused;<br>minimum value: <code>0</code><br>maximum value: <code>2</code><br>default value: <code>0.94</code><br><strong>Note:</strong> not supported in reasoning models"
          },
          "top_p": {
            "type": [
              "number",
              "null"
            ],
            "description": "<em>diversity of the AI response</em><br>optional field <br>controls diversity of the response by limiting token selection;<br>minimum value: <code>0</code><br>maximum value: <code>1</code> <br>default value: <code>0.92</code><p><strong>Note:</strong>  <code>top_p</code> cannot be used together with <code>temperature</code> in the same request"
          },
          "web_search": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>enable web search</em><br>optional field<br>when enabled, the AI model can access and cite current web information;<br>default value: <code>false</code>;<br><strong>Note:</strong> refer to the <a href=\"https://docs.dataforseo.com/v3/ai_optimization/chat_gpt/llm_responses/models/\">Models endpoint</a> for a list of models that support <code>web_search</code>;"
          },
          "force_web_search": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "<em>force AI agent to use web search</em><br>optional field<br>to enable this parameter, <code>web_search</code> must also be enabled;<br>when enabled, the AI model is forced to access and cite current web information;<br>default value: <code>false</code>;<br><strong>Note:</strong> even if the parameter is set to <code>true</code>, there is no guarantee web sources will be cited in the response <br><strong>Note #2:</strong> not supported in reasoning models"
          },
          "web_search_country_iso_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>ISO country code of the location</em><br>optional field<br>to enable this parameter, <code>web_search</code> must also be enabled;<br>when enabled, the AI model will search the web from the country you specify;<br><strong>Note:</strong> not supported in <code>o3-mini</code>, <code>o1-pro</code>, <code>o1</code> models"
          },
          "web_search_city": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>city name of the location</em><br>optional field<br><strong>Note:</strong> not supported in <code>o3-mini</code>, <code>o1-pro</code>, <code>o1</code> models"
          },
          "system_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>instructions for the AI behaviour</em><br>optional field<br>defines the AI's role, tone, or specific behavior <br>you can specify <strong>up to 500 characters</strong> in the <code>system_message</code> field"
          },
          "message_chain": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": [
                "object",
                "null"
              ],
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "role of the user from whom the message originates"
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "message text"
                    }
                  }
                }
              ]
            },
            "description": "conversation history\noptional field\narray of message objects representing previous conversation turns;\neach object must contain:\nrole string with either user or ai role;\nmessage string with message content (max 500 characters);\nyou can specify maximum of 10 message objects in the array;\nNote: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);\nexample:\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?\"}]"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response"
          }
        },
        "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": 200,
            "temperature": 0.3,
            "top_p": 0.5,
            "model_name": "gpt-4.1-mini",
            "web_search": true,
            "web_search_country_iso_code": "FR",
            "web_search_city": "Paris",
            "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": 200,
      "temperature": 0.3,
      "top_p": 0.5,
      "model_name": "gpt-4.1-mini",
      "web_search": true,
      "web_search_country_iso_code": "FR",
      "web_search_city": "Paris",
      "user_prompt": "provide information on how relevant the amusement park business is in France now"
    }
  ]
}
```

## Responses

### 200 — Successful operation

Headers:
- `X-Request-Id` (string) — Request identifier to include when contacting Felo support.

**application/json**

Schema: object | null

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

### 400 — The request could not be processed. Check the request parameters.

### 401 — A valid Felo API key is required.

### 402 — The request cannot proceed because a billing requirement is not met.

### 403 — The account is not permitted to perform this operation.

### 429 — A request or spending limit has been reached.

### 502 — The service could not complete the request.

### 503 — The API or billing service is temporarily unavailable.

### 504 — The service timed out while processing the request.

### default — Error response; upstream passthrough responses may use provider formats

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveResponseInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveResponseInfo`

```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_AiOptimizationChatGptLlmResponsesLiveTaskInfo"
              }
            ]
          },
          "description": "<em>array of tasks</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveResultInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveResultInfo`

```json
{
  "type": "object",
  "properties": {
    "model_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>name of the AI model used</em>"
    },
    "input_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>number of tokens in the input</em><br>total count of tokens processed"
    },
    "output_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>number of tokens in the output</em><br>total count of tokens generated in the AI response"
    },
    "reasoning_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "description": "<em>number of reasoning tokens</em><br>total count of tokens used to generate reasoning content"
    },
    "web_search": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "<em>indicates if web search was used</em>"
    },
    "money_spent": {
      "type": [
        "number",
        "null"
      ],
      "description": "<em>cost of AI tokens, USD</em><br>the price charged by the third-party AI model provider for according to its <a href=\"https://platform.openai.com/docs/pricing\" target=\"_blank\">Pricing</a>"
    },
    "datetime": {
      "type": [
        "string",
        "null"
      ],
      "description": "<em>date and time when the result was received</em><br>in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”<br>example:<br><code class=\"long-string\">2019-11-15 12:57:46 +00:00</code>"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "object",
          "null"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/Response36Afe1097B20_BaseAiOptimizationLlmResponseElementItem"
          }
        ]
      },
      "description": "<em>array of response items</em><br>contains structured AI response data"
    },
    "fan_out_queries": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "<em>array of fan-out queries</em><br>contains related search queries derived from the main query to provide a more comprehensive response"
    }
  }
}
```

### Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveTaskInfo

`#/components/schemas/Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveTaskInfo`

```json
{
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo"
    },
    {
      "type": "object",
      "properties": {
        "result": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "object",
              "null"
            ],
            "oneOf": [
              {
                "$ref": "#/components/schemas/Response36Afe1097B20_AiOptimizationChatGptLlmResponsesLiveResultInfo"
              }
            ]
          },
          "description": "<em>array of results</em>"
        }
      }
    }
  ]
}
```

### Response36Afe1097B20_BaseAiOptimizationLlmResponseElementItem

`#/components/schemas/Response36Afe1097B20_BaseAiOptimizationLlmResponseElementItem`

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "type of element"
    }
  },
  "additionalProperties": false,
  "discriminator": {
    "propertyName": "type",
    "mapping": {
      "reasoning": "#/components/schemas/Response36Afe1097B20_ReasoningAiOptimizationLlmResponseElementItem",
      "message": "#/components/schemas/Response36Afe1097B20_MessageAiOptimizationLlmResponseElementItem"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseInfo`

```json
{
  "properties": {
    "version": {
      "type": [
        "string",
        "null"
      ],
      "description": "the current version of the API"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "general status code\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "general informational message\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "total execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "tasks_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array",
      "format": "int64"
    },
    "tasks_error": {
      "type": [
        "integer",
        "null"
      ],
      "description": "the number of tasks in the tasks array returned with an error",
      "format": "int64"
    }
  }
}
```

### Response36Afe1097B20_BaseResponseTaskInfo

`#/components/schemas/Response36Afe1097B20_BaseResponseTaskInfo`

```json
{
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "task identifier\nunique task identifier in our system in the UUID format"
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "status code of the task\ngenerated by DataForSEO, can be within the following range: 10000-60000\nyou can find the full list of the response codes here"
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "informational message of the task\nyou can find the full list of general informational messages here"
    },
    "time": {
      "type": [
        "string",
        "null"
      ],
      "description": "execution time, seconds"
    },
    "cost": {
      "type": [
        "number",
        "null"
      ],
      "description": "total tasks cost, USD",
      "format": "double"
    },
    "result_count": {
      "type": [
        "integer",
        "null"
      ],
      "description": "number of elements in the result array",
      "format": "int64"
    },
    "path": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "URL path"
    },
    "data": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "object",
          "null"
        ]
      },
      "description": "contains the same parameters that you specified in the POST request"
    }
  }
}
```
