{"id":23217,"date":"2025-11-18T14:08:57","date_gmt":"2025-11-18T14:08:57","guid":{"rendered":"https:\/\/docs.dataforseo.com\/v3\/?page_id=23217"},"modified":"2026-03-26T12:06:42","modified_gmt":"2026-03-26T12:06:42","slug":"ai_optimization-gemini-llm_responses-task_get","status":"publish","type":"page","link":"https:\/\/docs.dataforseo.com\/v3\/ai_optimization-gemini-llm_responses-task_get\/","title":{"rendered":"ai_optimization\/gemini\/llm_responses\/task_get"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]<\/p>\n<h2>Get Gemini LLM Responses Results by id<\/h2>\n<p>\u200c<br \/>\nGemini LLM Responses endpoint allows you to retrieve structured responses from a specific Gemini model, based on the input parameters.<\/p>\n<p>Tasks using the Standard method <strong>may take up to 72 hours to complete<\/strong>. If the task is not completed within this time, it is marked as failed, and the $0.01 advance is refunded. It is also important to note that if your account balance is negative, you will not receive the results even if the task is completed successfully.<\/p>\n<p>[\/vc_column_text]    <div class=\"endpoint\">\n        <img decoding=\"async\" class=\"endpoint__icon\" src=\"https:\/\/docs.dataforseo.com\/v3\/wp-content\/themes\/dataforseo\/assets\/img\/icons\/checked-circle.svg\" alt=\"checked\">\n\n                    GET            <button class=\"btn-reset button-link copy-button\" data-href=\"https:\/\/api.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/$id\">\n                https:\/\/api.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/$id                <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n                    <use href=\"https:\/\/docs.dataforseo.com\/v3\/wp-content\/themes\/dataforseo\/assets\/img\/icons\/sprite.svg#layers\"><\/use>\n                <\/svg>\n            <\/button>\n            <\/div>\n    \t<article class=\"info-card info-card--yellow\">\n\t\t<header class=\"info-card__header\">\n\t\t\t<div class=\"info-card__icon\">\n\t\t\t\t<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n\t\t\t\t\t<use href=\"https:\/\/docs.dataforseo.com\/v3\/wp-content\/themes\/dataforseo\/assets\/img\/icons\/sprite.svg#label\"><\/use>\n\t\t\t\t<\/svg>\n\t\t\t<\/div>\n\t\t\t<div class=\"info-card__title\">Pricing<\/div>\n\t\t<\/header>\n\t\t<div class=\"info-card__content\">\n\t\t\t<p> Your account will be charged only for posting a task. You can get the results of the task within the next 30 days for free.<br \/>\nThe cost can be calculated on the <a title=\"Pricing\" href=\"https:\/\/dataforseo.com\/pricing\/ai-optimization\/llm-responses\" target=\"_blank\" rel=\"noopener noreferrer\">Pricing<\/a> page.<\/p>\n\t\t<\/div>\n\t<\/article>\n\t[vc_column_text]<\/p>\n<p><strong>Description of the fields for sending a request:<\/strong><\/p>\n<table style=\"width: 86.0726%; height: 34px;\">\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 12.4003%; height: 24px;\">Field name<\/th>\n<th style=\"width: 3.91588%; height: 24px;\">Type<\/th>\n<th style=\"width: 82.9587%; height: 24px;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 192px;\">\n<td style=\"width: 12.4003%; height: 10px;\"><code>id<\/code><\/td>\n<td style=\"width: 3.91588%; height: 10px;\">string<\/td>\n<td style=\"width: 82.9587%; height: 10px;\"><em>task identifier<\/em><br \/>\n<strong>unique task identifier in our system in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Universally_unique_identifier\">UUID<\/a> format<\/strong><br \/>\nyou will be able to use it within <strong>30 days<\/strong> to request the results of the task at any time<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200c<br \/>\nAs a response of the API server, you will receive <a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON\">JSON<\/a>-encoded data containing a <code>tasks<\/code> array with the information specific to the set tasks.<\/p>\n<p><strong>Description of the fields in the results array:<\/strong><\/p>\n<table style=\"width: 86.001%; height: 7345px;\">\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 24.3517%; height: 24px;\">Field name<\/th>\n<th style=\"width: 5.77015%; height: 24px;\">Type<\/th>\n<th style=\"width: 80.2284%; height: 24px;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 48px;\">\n<td style=\"width: 24.3517%; height: 48px;\"><code>version<\/code><\/td>\n<td style=\"width: 6.19209%; height: 48px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 48px;\"><em>the current version of the API<\/em><\/td>\n<\/tr>\n<tr style=\"height: 48px;\">\n<td style=\"width: 38.423%; height: 48px;\"><code>status_code<\/code><\/td>\n<td style=\"width: 1.75219%; height: 48px;\">integer<\/td>\n<td style=\"width: 61.2015%; height: 48px;\"><i>general status code<\/i><br \/>\nyou can find the full list of the response codes <a href=\"\/v3\/appendix\/errors\">here<\/a><br \/>\n<strong>Note:<\/strong> we strongly recommend designing a necessary system for handling related exceptional or error conditions<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>status_message<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>general informational message<\/em><br \/>\nyou can find the full list of general informational messages <a href=\"\/v3\/appendix\/errors\">here<\/a><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>time<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">string<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>execution time, seconds<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>cost<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">float<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>total tasks cost, USD<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>tasks_count<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>the number of tasks in the <strong><code>tasks<\/code><\/strong> array<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><code>tasks_error<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">integer<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>the number of tasks in the <strong><code>tasks<\/code><\/strong> array returned with an error<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\"><strong><code>tasks<\/code><\/strong><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">array<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>array of tasks<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>id<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>task identifier<\/em><br \/>\n<strong>unique task identifier in our system in the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Universally_unique_identifier\">UUID<\/a> format<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 48px;\">\n<td style=\"width: 24.3517%; height: 48px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>status_code<\/code><\/td>\n<td style=\"width: 6.19209%; height: 48px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 48px;\"><em>status code of the task<\/em><br \/>\ngenerated by DataForSEO; can be within the following range: 10000-60000<br \/>\nyou can find the full list of the response codes <a href=\"\/v3\/appendix\/errors\">here<\/a><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>status_message<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>informational message of the task<\/em><br \/>\nyou can find the full list of general informational messages <a href=\"\/v3\/appendix\/errors\">here<\/a><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>time<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>execution time, seconds<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>cost<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">float<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>cost of the task, USD<\/em><br \/>\nincludes the base task price plus the <code>money_spent<\/code> value<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>result_count<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">integer<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>number of elements in the <code>result<\/code> array<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>path<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>URL path<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <code>data<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">object<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>contains the same parameters that you specified in the POST request<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 <strong><code>result<\/code><\/strong><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>array of results<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>model_name<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">string<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>name of the AI model used<\/em>\n<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>input_tokens<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">integer<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>number of tokens in the input<\/em><br \/>\ntotal count of tokens processed<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>output_tokens<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">integer<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>number of tokens in the output<\/em><br \/>\ntotal count of tokens generated in the AI response<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>reasoning_tokens<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">integer<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>number of reasoning tokens<\/em><br \/>\ntotal count of tokens used to generate reasoning content<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>web_search<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">boolean<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>indicates if web search was used<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>money_spent<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">float<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>cost of AI tokens, USD<\/em><br \/>\nthe 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><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>datetime<\/code><\/td>\n<td style=\"width: 5.77015%; height: 24px;\">string<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>date and time when the result was received<\/em><br \/>\nin the UTC format: \u201cyyyy-mm-dd hh-mm-ss +00:00\u201d<br \/>\nexample:<br \/>\n<code class=\"long-string\">2019-11-15 12:57:46 +00:00<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 24.3517%; height: 25px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>items<\/code><\/td>\n<td style=\"width: 5.77015%; height: 25px;\">array<\/td>\n<td style=\"width: 80.2284%; height: 25px;\"><em>array of response items<\/em><br \/>\ncontains structured AI response data<\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 24.3517%; height: 25px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>items<\/code><\/td>\n<td style=\"width: 5.77015%; height: 25px;\">array<\/td>\n<td style=\"width: 80.2284%; height: 25px;\"><em>array of response items<\/em><br \/>\ncontains structured AI response data<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <strong>\u2018reasoning\u2019 element in the response<\/strong><\/td>\n<td style=\"width: 5.77015%; height: 24px;\"><\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>type<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>type of the element = <strong>&#8216;reasoning&#8217;<\/strong><\/em><br \/>\n<strong>Note:<\/strong> this element is supported only in reasoning models and is not guaranteed to be returned<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>sections<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>reasoning chain sections<\/em><br \/>\narray of objects containing the reasoning chain sections generated by the LLM<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>type<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>type of element\u00a0=\u00a0<strong>&#8216;summary_text&#8217;<\/strong><\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>text<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>text of the reasoning chain section<\/em><br \/>\ntext of the reasoning chain  section summarizing the model&#8217;s thought process<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <strong>\u2018message\u2019 element in the response<\/strong><\/td>\n<td style=\"width: 5.77015%; height: 24px;\"><\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>type<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>type of the element = <strong>&#8216;message&#8217;<\/strong><\/em>\n<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>sections<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>array of content sections<\/em><br \/>\ncontains different parts of the AI response<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>type<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>type of element\u00a0=\u00a0<strong>&#8216;text&#8217;<\/strong><\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>text<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>AI-generated text content<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>annotations<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">array<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>array of references used to generate the response<\/em><br \/>\nequals <code>null<\/code> if the <code>web_search<\/code> parameter is not set to <code>true<\/code><br \/>\n<strong>Note:<\/strong> <code>annotations<\/code> may return empty even when <code>web_search<\/code> is <code>true<\/code>, as the AI will attempt to retrieve web information but may not find relevant results<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0  <code>title<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>the domain name or title of the quoted source<\/em><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 24.3517%; height: 24px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0  <code>url<\/code><\/td>\n<td style=\"width: 6.19209%; height: 24px;\">string<\/td>\n<td style=\"width: 79.8065%; height: 24px;\"><em>redirect URL to the quoted source<\/em><br \/>\ncontains a Vertex AI redirect that leads to the original source<\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 24.3517%; height: 25px;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <code>fan_out_queries<\/code><\/td>\n<td style=\"width: 5.77015%; height: 25px;\">array<\/td>\n<td style=\"width: 80.2284%; height: 24px;\"><em>array of fan-out queries<\/em><br \/>\ncontains related search queries derived from the main query to provide a more comprehensive response<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u200c\u200c[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<blockquote><p>Instead of \u2018login\u2019 and \u2018password\u2019 use your credentials from https:\/\/app.dataforseo.com\/api-access<\/p><\/blockquote><div id=\"curl\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-bash hljs\"># Instead of &#039;login&#039; and &#039;password&#039; use your credentials from https:\/\/app.dataforseo.com\/api-access \r\nlogin=&quot;login&quot; \r\npassword=&quot;password&quot; \r\ncred=&quot;$(printf ${login}:${password} | base64)&quot; \r\nid=&quot;02031608-0696-0110-0000-a81d0414edbe&quot; \r\ncurl --location --request GET &quot;https:\/\/api.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/${id}&quot; \r\n--header &quot;Authorization: Basic ${cred}&quot;  \r\n--header &quot;Content-Type: application\/json&quot; \r\n--data-raw &quot;&quot;<\/code><\/pre><\/div><\/div><div id=\"php\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-php hljs\">&lt;?php\r\n\r\n\/**\r\n * Method: GET\r\n * Endpoint: https:\/\/api.dataforseo.com\/v3\/ai_optimization\/chat_gpt\/llm_responses\/task_get\/$id\r\n * @see https:\/\/docs.dataforseo.com\/v3\/ai_optimization\/chat_gpt\/llm_responses\/task_get\r\n *\/\r\n\r\nrequire_once __DIR__ . &#039;\/..\/..\/..\/..\/..\/lib\/RestClient.php&#039;;\r\n$config = require __DIR__ . &#039;\/..\/..\/..\/..\/..\/lib\/config.php&#039;;\r\n\r\n$client = new RestClient($config[&#039;base_url&#039;], null, $config[&#039;login&#039;], $config[&#039;password&#039;]);\r\n\r\ntry {\r\n    $taskId = &#039;07211938-0696-0613-0000-674a0f948d6b&#039;;\r\n    $result = $client-&gt;get(&quot;\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/{$taskId}&quot;);\r\n    print_r($result);\r\n    \/\/ do something with get result\r\n} catch (RestClientException $e) {\r\n    printf(\r\n        &quot;HTTP code: %dnError code: %dnMessage: %snTrace: %sn&quot;,\r\n        $e-&gt;getHttpCode(),\r\n        $e-&gt;getCode(),\r\n        $e-&gt;getMessage(),\r\n        $e-&gt;getTraceAsString()\r\n    );\r\n}\r\n\r\n?&gt;<\/code><\/pre><\/div><\/div><div id=\"javascript\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-javascript hljs\">const task_id = &#039;02231934-2604-0066-2000-570459f04879&#039;;\r\n\r\nconst axios = require(&#039;axios&#039;);\r\n\r\naxios({\r\n    method: &#039;get&#039;,\r\n    url: &#039;https:\/\/api.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/&#039; + task_id,\r\n    auth: {\r\n        username: &#039;login&#039;,\r\n        password: &#039;password&#039;\r\n    },\r\n    headers: {\r\n        &#039;content-type&#039;: &#039;application\/json&#039;\r\n    }\r\n}).then(function (response) {\r\n    var result = response[&#039;data&#039;][&#039;tasks&#039;];\r\n    \/\/ Result data\r\n    console.log(result);\r\n}).catch(function (error) {\r\n    console.log(error);\r\n});<\/code><\/pre><\/div><\/div><div id=\"python\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-python hljs\">&quot;&quot;&quot;\r\nMethod: GET\r\nEndpoint: https:\/\/api.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/$id\r\n@see https:\/\/docs.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\r\n&quot;&quot;&quot;\r\n\r\nimport sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), &#039;..\/..\/..\/..\/..\/&#039;)))\r\nfrom lib.client import RestClient\r\nfrom lib.config import username, password\r\nclient = RestClient(username, password)\r\n\r\ntry:\r\n    task_id = &#039;07211938-0696-0613-0000-674a0f948d6b&#039;\r\n    response = client.get(f&#039;\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/{task_id}&#039;)\r\n    print(response)\r\n    # do something with get result\r\nexcept Exception as e:\r\n    print(f&#039;An error occurred: {e}&#039;)<\/code><\/pre><\/div><\/div><div id=\"csharp\" class=\"tab-content example__content\"><div class=\"example__code\"><pre><code class=\"language-csharp hljs\">using System;\r\nusing System.Linq;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Collections.Generic;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\nnamespace DataForSeoSdk;\r\n\r\npublic class AiOptimization\r\n{\r\n\r\n    private static readonly HttpClient _httpClient;\r\n    \r\n    static AiOptimization()\r\n    {\r\n        _httpClient = new HttpClient\r\n        {\r\n            BaseAddress = new Uri(&quot;https:\/\/api.dataforseo.com\/&quot;)\r\n        };\r\n        _httpClient.DefaultRequestHeaders.Authorization =\r\n            new AuthenticationHeaderValue(&quot;Basic&quot;, ApiConfig.Base64Auth);\r\n    }\r\n    \r\n    \/\/\/ &lt;summary&gt;\r\n    \/\/\/ Method: GET\r\n    \/\/\/ Endpoint: https:\/\/api.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\r\n    \/\/\/ &lt;\/summary&gt;\r\n    \/\/\/ &lt;see href=&quot;https:\/\/docs.dataforseo.com\/v3\/ai_optimization\/gemini\/llm_responses\/task_get&quot;\/&gt;\r\n    \r\n    public static async Task GeminiLlmResponsesTaskGetById()\r\n    {\r\n\t\t\/\/ use the task identifier that you recieved upon setting a task\r\n\t    string taskId = &quot;07211938-0696-0613-0000-674a0f948d6b&quot;;\r\n\t    using var response = await _httpClient.GetAsync(&quot;\/v3\/ai_optimization\/gemini\/llm_responses\/task_get\/&quot; + taskId);\r\n\t    var result = JsonConvert.DeserializeObject&lt;dynamic&gt;(await response.Content.ReadAsStringAsync());\r\n\t    \/\/ you can find the full list of the response codes here https:\/\/docs.dataforseo.com\/v3\/appendix\/errors\r\n\t    if (result.status_code == 20000)\r\n\t    {\r\n\t        \/\/ do something with result\r\n\t        Console.WriteLine(result);\r\n\t    }\r\n\t    else\r\n\t        Console.WriteLine($&quot;error. Code: {result.status_code} Message: {result.status_message}&quot;);\r\n    }<\/code><\/pre><\/div><\/div><blockquote><p>The above command returns JSON structured like this:<\/p><\/blockquote><div class=\"example example--json\"><div class=\"example__content\"><div class=\"example__code example__code-json\"><pre><code class=\"language-json hljs\">{\r\n  &quot;version&quot;: &quot;0.1.20250724&quot;,\r\n  &quot;status_code&quot;: 20000,\r\n  &quot;status_message&quot;: &quot;Ok.&quot;,\r\n  &quot;time&quot;: &quot;0.0849 sec.&quot;,\r\n  &quot;cost&quot;: 0,\r\n  &quot;tasks_count&quot;: 1,\r\n  &quot;tasks_error&quot;: 0,\r\n  &quot;tasks&quot;: [\r\n    {\r\n      &quot;id&quot;: &quot;02249714-1807-0791-0000-0423e705a8rr&quot;,\r\n      &quot;status_code&quot;: 20000,\r\n      &quot;status_message&quot;: &quot;Ok.&quot;,\r\n      &quot;time&quot;: &quot;0.0310 sec.&quot;,\r\n      &quot;cost&quot;: 0,\r\n      &quot;result_count&quot;: 1,\r\n      &quot;path&quot;: [\r\n        &quot;v3&quot;,\r\n        &quot;ai_optimization&quot;,\r\n        &quot;gemini&quot;,\r\n        &quot;llm_responses&quot;,\r\n        &quot;task_get&quot;,\r\n        &quot;07241735-1535-0613-0000-0722e701b5ff&quot;\r\n      ],\r\n      &quot;data&quot;: {\r\n        &quot;api&quot;: &quot;ai_optimization&quot;,\r\n        &quot;function&quot;: &quot;llm_responses&quot;,\r\n        &quot;se&quot;: &quot;gemini&quot;,\r\n        &quot;system_message&quot;: &quot;communicate as if we are in a business meeting&quot;,\r\n        &quot;message_chain&quot;: [\r\n          {\r\n            &quot;role&quot;: &quot;user&quot;,\r\n            &quot;message&quot;: &quot;Hello, what\u2019s up?&quot;\r\n          },\r\n          {\r\n            &quot;role&quot;: &quot;ai&quot;,\r\n            &quot;message&quot;: &quot;Hello! I\u2019m doing well, thank you. How can I assist you today? Are there any specific topics or projects you\u2019d like to discuss in our meeting?&quot;\r\n          }\r\n        ],\r\n        &quot;max_output_tokens&quot;: 200,\r\n        &quot;temperature&quot;: 0.3,\r\n        &quot;top_p&quot;: 0.5,\r\n        &quot;model_name&quot;: &quot;gemini-2.5-flash&quot;,\r\n        &quot;user_prompt&quot;: &quot;provide information on how relevant the amusement park business is in France now&quot;\r\n      },\r\n      &quot;result&quot;: [\r\n        {\r\n          &quot;model_name&quot;: &quot;gemini-2.5-flash&quot;,\r\n          &quot;input_tokens&quot;: 68,\r\n          &quot;output_tokens&quot;: 241,\r\n          &quot;reasoning_tokens&quot;: 576,\r\n          &quot;web_search&quot;: true,\r\n          &quot;money_spent&quot;: 0.0351548,\r\n          &quot;datetime&quot;: &quot;2025-07-02 14:06:32 +00:00&quot;,\r\n          &quot;items&quot;: [\r\n\t\t\t{\r\n              &quot;type&quot;: &quot;reasoning&quot;,\r\n              &quot;sections&quot;: [\r\n                {\r\n                  &quot;type&quot;: &quot;summary_text&quot;,\r\n                  &quot;text&quot;: &quot;**Exploring a riddle**nnThis likely refers to a riddle or joke. The classic answer seems to be a cup that&#039;s closed at the top and bottom, making it essentially useless. Or, is it a trophy cup or even a cupcake? I need to think through this riddle: I have a cup with no bottom and a closed top. How can I drink from it? The punchline might simply be that you can&#039;t drink from it. Hm, I wonder if there might be other interpretations too!&quot;\r\n                },\r\n                {\r\n                  &quot;type&quot;: &quot;summary_text&quot;,\r\n                  &quot;text&quot;: &quot;**Pondering a riddle\u2019s meaning**nnI\u2019m considering if this cup could also mean something like hiccup \u2014 closed at the top and bottom? But if there\u2019s no bottom, anything liquid just falls out. A closed top means you can\u2019t pour anything in. So it may not be a traditional drinking cup. Maybe it\u2019s an acorn cup, although it has an open top. The joke could suggest inverting it, but that still leaves it open. I\u2019m not sure how it all ties back to drinking from it!&quot;\r\n                },\r\n                {\r\n                  &quot;type&quot;: &quot;summary_text&quot;,\r\n                  &quot;text&quot;: &quot;**Clarifying the riddle\u2019s punchline**nnSo, the answer seems to be that you&#039;re meant to drink from the rim, but since there\u2019s no bottom and the top is closed, it&#039;s impossible to do that. The correct response points to a thimble instead, which has an open bottom. The punchline is clear: You can&#039;t drink; it&#039;s a thimble. The riddle plays on the expectation of a witty response. To keep it light, I could say, You don&#039;t! That&#039;s a thimble! and add a playful tone.&quot;\r\n                }\r\n              ]\r\n            },\r\n            {\r\n              &quot;type&quot;: &quot;message&quot;,\r\n              &quot;sections&quot;: [\r\n                {\r\n                  &quot;type&quot;: &quot;text&quot;,\r\n                  &quot;text&quot;: &quot;The amusement park business in France is highly relevant and a significant part of the country&#039;s tourism and leisure industry. Here&#039;s a breakdown of its current relevance:nn**1. Market Size and Growth:**n*   The French amusement parks market generated a revenue of USD 3,249.3 million in 2024.n*   It is projected to reach USD 4,274.3 million by 2030, demonstrating a compound annual growth rate (CAGR) of 4.4% from 2025 to 2030.n*   France accounted for 3.2% of the global amusement parks market in 2024.n*   In Europe, the French amusement parks market is expected to lead in terms of revenue by 2030 and is projected to be the fastest-growing regional market.nn**&quot;,\r\n                  &quot;annotations&quot;: [\r\n                    {\r\n                      &quot;title&quot;: &quot;grandviewresearch.com&quot;,\r\n                      &quot;url&quot;: &quot;https:\/\/vertexaisearch.cloud.google.com\/grounding-api-redirect\/AUZIYQE4kVSlqaUzZmAm6xWUASs0ppDa88LJ3WrthsLwppW3uzY6ROF9gQAeT1Q85e5W4etkjCovvSU8ygGEPgCcs0eC46cdz8IOjbyGJXbAvC5UPmsL2MWW5nCMa7JNk7rsMimpbiBDyXzpO_YZCecF-egFpoGFq3UN-GQ8wlYKgpZ7Z7kP8uHLWc2eOw==&quot;\r\n                    }\r\n                  ]\r\n                }\r\n              ]\r\n            }\r\n          ],\r\n          &quot;fan_out_queries&quot;: [\r\n            &quot;amusement park business France current relevance&quot;,\r\n            &quot;amusement park industry France market size 2023 2024&quot;,\r\n            &quot;number of amusement parks in France 2023&quot;,\r\n            &quot;amusement park attendance France 2023&quot;,\r\n            &quot;trends in French amusement park industry&quot;\r\n          ]\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}<\/code><\/pre><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text] Get Gemini LLM Responses Results by id \u200c Gemini LLM Responses endpoint allows you to retrieve structured responses from a specific Gemini model, based on the input parameters. Tasks using the Standard method may take up to 72 hours to complete. If the task is not completed within this time, it is marked as [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template.php","meta":{"apibase_doc_request_yaml":"","apibase_doc_request_additional_yaml":"","apibase_doc_response_yaml":"","footnotes":""},"class_list":["post-23217","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages\/23217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/comments?post=23217"}],"version-history":[{"count":8,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages\/23217\/revisions"}],"predecessor-version":[{"id":24152,"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/pages\/23217\/revisions\/24152"}],"wp:attachment":[{"href":"https:\/\/docs.dataforseo.com\/v3\/wp-json\/wp\/v2\/media?parent=23217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}