DataForSEO AI Optimization Gemini LLM Responses Live
Usage-based pricing
ae_dataforseo_ai_optimization_gemini_llm_responses_live
Generate a response from a Gemini model through DataForSEO. Provide the task parameters in the request_body array according to this interface schema.
Usage-based pricing
Pricing
The charge per call is (max(1200 × Actual usage charge (USD), 0)) AE credits. All applicable conditions are combined to calculate the total.
Charges vary with the selected Gemini model, the length of input actually processed and output generated, and the use of optional features such as web search.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | array | Yes | No parameter description. | — |
request_body[].tag | string | null | No | No parameter description. | — |
request_body[].top_p | number | null | No | No parameter description. | — |
request_body[].model_name | string | No | <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>gemini-1.5-pro</code> is specified, the <code>gemini-1.5-pro-002</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/gemini/llm_responses/models</code> | — |
request_body[].web_search | boolean | null | No | No parameter description. | — |
request_body[].temperature | number | null | No | No parameter description. | — |
request_body[].user_prompt | string | No | <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_chain | array | null | No | No parameter description. | — |
request_body[].message_chain[].role | string | null | No | No parameter description. | — |
request_body[].message_chain[].message | string | null | No | No parameter description. | — |
request_body[].use_reasoning | boolean | null | No | No parameter description. | — |
request_body[].system_message | string | null | No | No parameter description. | — |
request_body[].max_output_tokens | integer | null | No | No parameter description. | — |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeyRequest coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_dataforseo_ai_optimization_gemini_llm_responses_live' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": [
{
"max_output_tokens": 2600,
"message_chain": [
{
"message": "Google UK English desktop, 3 independent organic top-5 rounds for '\''breaking capacity of mccb'\''; Ads avg 40/mo. R means relevant body read; P partial; S title/snippet only.\n1.1S Other characteristics of a circuit-breaker\n1.2S Ultimate, Rated, and Service Breaking Capacit\n1.3R Guide to Low Voltage Circuit-Breakers Standar\n1.4S Breaking Capacity vs. Circuit Breaker Ratings\n1.5S MCB Breaking Capacity Chart and Selection Gui\n2.1R MCCB circuit Breaker and their application - ",
"role": "user"
},
{
"message": "Context 1 recorded.",
"role": "ai"
},
{
"message": "Remaining top-five results by round and rank:\n2.2S The breaking capacity of the circuit breaker \n2.3S MCCB Ratings and Sizes Overview | PDF | Mains\n2.4S How do you calculate the breaking capacity of\n2.5S Understanding the Rated Capacity of Air Circu\n3.1R Molded Case Circuit Breakers - MCCB\n3.2S Breaking capacity\n3.3S MCCB Breaking Capacity: How to Choose 35kA, 8\n3.4S Breaking capacity\n3.5S MCCB Ratings: Breaking Capacity Icu & Ics",
"role": "user"
},
{
"message": "Context 2 recorded.",
"role": "ai"
},
{
"message": "B1 IEC 60947-2:2024 public scope up to 1500 V DC, catalogue only. B2 BEAMA low-voltage breaker guide 4.3.1, 4.3.5-8: Ue vs Ui, equipment Icu vs prospective short-circuit current at breaker, Ics as kA or % of Icu. Avoid quoting exact test sequences, universal wire/rating rules or permission to reclose after a site fault. DC conditions are configuration specific. ABB DC guide p33 supports matching DC Ue and DC time constant.",
"role": "user"
},
{
"message": "Context 3 recorded.",
"role": "ai"
},
{
"message": "B3 BENY published BDM-125/250 spec sheet pp1-2 example: 2P, Ue 500 V DC and table gives Icu/Ics 15 kA each. Use only as datasheet walk-through; exact connection, DC time constant/test applicability, SKU and current revision need confirmation before purchase. Use printed approved connection diagrams; no AC transfer, no universal Ics ratio. In/Ir/trip settings and assembly rating are separate checks.",
"role": "user"
},
{
"message": "Context 4 recorded.",
"role": "ai"
},
{
"message": "B4 BENY What Is an MCCB? covers Icu/Ics/Ue basics, overload vs short circuit, general industrial/BESS. Existing trip-unit draft covers Ir/Isd/Ii and minimum fault protection. Polarity topic owns wiring rationale. New article should own the procurement workflow: get max declared DC voltage and fault contribution at exact breaker, read matching product row/conditions, record unresolved evidence and RFQ for OEM/engineer.",
"role": "user"
},
{
"message": "Context 5 recorded.",
"role": "ai"
}
],
"model_name": "gemini-2.5-flash",
"system_message": "You are an independent UK electrical trade editor outlining an English BENY article for BESS specifiers and buyers. Use the supplied evidence and mark the bounds of each source. Distinguish product ratings and project studies. No universal compliance, new figures, live-work directions or competitor reconstruction.",
"temperature": 0.2,
"user_prompt": "Propose five H2 sections with two or three H3 headings each for choosing DC MCCB breaking capacity in a BESS. Use UK spelling and Markdown ## and ###. Briefly give the reader decision and B1-B4 IDs per H2. Focus on design inputs, Icu/Ics at actual DC Ue and configuration, a product row, and procurement handoff. Include one evidence gap. Outline only.",
"web_search": false
}
]
}
}'Response exampleresponse.json
{
"status_code": 20000,
"status_message": "Ok.",
"tasks": [
{
"data": {
"api": "ai_optimization",
"function": "llm_responses",
"max_output_tokens": 2600,
"message_chain": [
{
"message": "Google UK English desktop, 3 independent organic top-5 rounds for 'breaking capacity of mccb'; Ads avg 40/mo. R means relevant body read; P partial; S title/snippet only.\n1.1S Other characteristics of a circuit-breaker\n1.2S Ultimate, Rated, and Service Bre",
"role": "user"
}
],
"model_name": "gemini-2.5-flash",
"se": "gemini"
},
"id": "11160801-2802-0612-0000-4d1d3caafbd1",
"path": [
"v3"
],
"result": [
{
"datetime": "2026-11-16 08:01:13 +00:00",
"fan_out_queries": null,
"items": [
{}
],
"model_name": "gemini-2.5-flash",
"web_search": false
}
],
"result_count": 1,
"status_code": 20000
}
],
"tasks_count": 1,
"tasks_error": 0,
"time": "2.3645 sec."
}This example shows part of the response. Copied content is valid JSON.


