Pricing
Your account will not be charged for using this API
Your account will not be charged for using this API
You will receive the list of available Gemini AI models by calling this API.
As a response of the API server, you will receive JSON-encoded data containing a tasks array with the information specific to the set tasks.
| Field name | Type | Description |
|---|---|---|
version |
string | the current version of the API |
status_code |
integer | general status code you can find the full list of the response codes here |
status_message |
string | general informational message you can find the full list of general informational messages here |
time |
string | execution time, seconds |
cost |
float | total tasks cost, USD |
tasks_count |
integer | the number of tasks in the tasks array |
tasks_error |
integer | the number of tasks in the tasks array returned with an error |
tasks |
array | array of tasks |
id |
string | task identifier unique task identifier in our system in the UUID format |
status_code |
integer | status code of the task generated by DataForSEO; can be within the following range: 10000-60000 you can find the full list of the response codes here |
status_message |
string | informational message of the task you can find the full list of general informational messages here |
time |
string | execution time, seconds |
cost |
float | cost of the task, USD |
result_count |
integer | number of elements in the result array |
path |
array | URL path |
data |
object | contains the parameters passed in the URL of the GET request |
result |
array | array of results |
model_name |
string | name of the AI model |
reasoning |
boolean | indicates if the AI model supports reasoning |
web_search_supported |
boolean | web search support for the AI model if true, the web_search parameter can be set with the AI model |
task_post_supported |
boolean | indicates if Standard (POST-GET) data retrieval is supported if true, you can use the Standard (POST-GET) data retrieval method with the AI model |
Instead of ‘login’ and ‘password’ use your credentials from https://app.dataforseo.com/api-access
# Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access
login="login"
password="password"
cred="$(printf ${login}:${password} | base64)"
curl --location --request GET "https://api.dataforseo.com/v3/ai_optimization/gemini/llm_responses/models"
--header "Authorization: Basic ${cred}"
--header "Content-Type: application/json"
--data-raw ""<?php
// You can download this file from here https://cdn.dataforseo.com/v3/examples/php/php_RestClient.zip
require('RestClient.php');
$api_url = 'https://api.dataforseo.com/';
try {
// Instead of 'login' and 'password' use your credentials from https://app.dataforseo.com/api-access
$client = new RestClient($api_url, null, 'login', 'password');
} catch (RestClientException $e) {
echo "n";
print "HTTP code: {$e->getHttpCode()}n";
print "Error code: {$e->getCode()}n";
print "Message: {$e->getMessage()}n";
print $e->getTraceAsString();
echo "n";
exit();
}
try {
// using this method you can get a list of ai models
// GET /v3/ai_optimization/gemini/llm_responses/models
// the full list of possible parameters is available in documentation
$result = $client->get('/v3/ai_optimization/gemini/llm_responses/models');
print_r($result);
// do something with result
} catch (RestClientException $e) {
echo "n";
print "HTTP code: {$e->getHttpCode()}n";
print "Error code: {$e->getCode()}n";
print "Message: {$e->getMessage()}n";
print $e->getTraceAsString();
echo "n";
}
$client = null;
?>const axios = require('axios');
axios({
method: 'get',
url: 'https://api.dataforseo.com/v3/ai_optimization/gemini/llm_responses/models',
auth: {
username: 'login',
password: 'password'
},
data: [{
version: "v3"
}],
headers: {
'content-type': 'application/json'
}
}).then(function (response) {
var result = response['data']['tasks'][0]['result'];
// Result data
console.log(result);
}).catch(function (error) {
console.log(error);
});"""
Method: GET
Endpoint: https://api.dataforseo.com/v3/ai_optimization/gemini/llm_responses/models
@see https://docs.dataforseo.com/v3/ai_optimization/gemini/llm_responses/models
"""
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../../../')))
from lib.client import RestClient
from lib.config import username, password
client = RestClient(username, password)
try:
response = client.get('/v3/ai_optimization/gemini/llm_responses/models')
print(response)
# do something with get result
except Exception as e:
print(f'An error occurred: {e}')using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace DataForSeoSdk;
public class AiOptimization
{
private static readonly HttpClient _httpClient;
static AiOptimization()
{
_httpClient = new HttpClient
{
BaseAddress = new Uri("https://api.dataforseo.com/")
};
_httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Basic", ApiConfig.Base64Auth);
}
/// <summary>
/// Method: GET
/// Endpoint: https://api.dataforseo.com/v3/ai_optimization/gemini/llm_responses/models
/// </summary>
/// <see href="https://docs.dataforseo.com/v3/ai_optimization/gemini/llm_responses/models"/>
public static async Task GeminiLlmResponsesModels()
{
using var response = await _httpClient.GetAsync("/v3/ai_optimization/gemini/llm_responses/models");
var result = JsonConvert.DeserializeObject<dynamic>(await response.Content.ReadAsStringAsync());
// you can find the full list of the response codes here https://docs.dataforseo.com/v3/appendix/errors
if (result.status_code == 20000)
{
// do something with result
Console.WriteLine(result);
}
else
Console.WriteLine($"error. Code: {result.status_code} Message: {result.status_message}");
}The above command returns JSON structured like this:
{
"version": "0.1.20250812",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0668 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "08201719-1535-0616-0000-df8dff6db9f6",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0169 sec.",
"cost": 0,
"result_count": 23,
"path": [
"v3",
"ai_optimization",
"gemini",
"llm_responses",
"models"
],
"data": {
"api": "ai_optimization",
"function": "llm_responses",
"se": "gemini"
},
"result": [
{
"model_name": "gemini-2.5-pro",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-pro-preview-03-25",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-pro-preview-05-06",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-pro-preview-06-05",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-flash-lite",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-flash-lite-preview-06-17",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-flash",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.5-flash-preview-05-20",
"reasoning": true,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.0-flash-lite",
"reasoning": false,
"web_search_supported": false,
"task_post_supported": false
},
{
"model_name": "gemini-2.0-flash-lite-001",
"reasoning": false,
"web_search_supported": false,
"task_post_supported": false
},
{
"model_name": "gemini-2.0-flash-lite-preview",
"reasoning": false,
"web_search_supported": false,
"task_post_supported": false
},
{
"model_name": "gemini-2.0-flash-lite-preview-02-05",
"reasoning": false,
"web_search_supported": false,
"task_post_supported": false
},
{
"model_name": "gemini-2.0-flash",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-2.0-flash-001",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-pro",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-pro-002",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-pro-latest",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-flash-8b",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-flash-8b-001",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-flash-8b-latest",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-flash",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-flash-002",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
},
{
"model_name": "gemini-1.5-flash-latest",
"reasoning": false,
"web_search_supported": true,
"task_post_supported": false
}
]
}
]
}