code 2
PS C:\Lab\Python\python_code_v1> & 'c:\Python314\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '62198' '--' 'C:\Lab\Python\python_code_v1\api.py'
PS C:\Lab\Python\python_code_v1> pip install requests
Requirement already satisfied: requests in c:\python312\lib\site-packages (2.32.5)
Requirement already satisfied: charset_normalizer<4,>=2 in c:\python312\lib\site-packages (from requests) (3.4.4)
Requirement already satisfied: idna<4,>=2.5 in c:\python312\lib\site-packages (from requests) (3.11)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\python312\lib\site-packages (from requests) (2.6.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\python312\lib\site-packages (from requests) (2026.2.25)
[notice] A new release of pip is available: 24.3.1 -> 26.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Python314\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '58995' '--' 'C:\Lab\Python\python_code_v1\api.py'
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '64566' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.5 Pro
Status code: 404
Response text: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/gemini/v1.5/pro</code> was not found on this server. <ins>That’s all we know.</ins>
JSON decode error: Expecting value: line 1 column 1 (char 0)
None
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '58236' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.5 Pro
Status code: 400
Error Response: {
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "generativelanguage.googleapis.com"
}
},
{
"@type": "type.googleapis.com/google.rpc.LocalizedMessage",
"locale": "en-US",
"message": "API key not valid. Please pass a valid API key."
}
]
}
}
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '58260' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.5 Pro
Status code: 404
Error Response: {
"error": {
"code": 404,
"message": "models/gemini-1.5-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.",
"status": "NOT_FOUND"
}
}
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '61718' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.5 Pro
Status code: 404
Error Response: {
"error": {
"code": 404,
"message": "models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.",
"status": "NOT_FOUND"
}
}
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '53945' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.0 Pro
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '53967' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.0 Pro
Model Name | Methods Supported
------------------------------------------------------------
models/gemini-2.5-flash | Stable version of Gemini 2.5 Flash, our mid-size m...
models/gemini-2.5-pro | Stable release (June 17th, 2025) of Gemini 2.5 Pro...
models/gemini-2.0-flash | Gemini 2.0 Flash...
models/gemini-2.0-flash-001 | Stable version of Gemini 2.0 Flash, our fast and v...
models/gemini-2.0-flash-lite-001 | Stable version of Gemini 2.0 Flash-Lite...
models/gemini-2.0-flash-lite | Gemini 2.0 Flash-Lite...
models/gemini-2.5-flash-preview-tts | Gemini 2.5 Flash Preview TTS...
models/gemini-2.5-pro-preview-tts | Gemini 2.5 Pro Preview TTS...
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '59632' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.0 Pro
Model Name | Methods Supported
------------------------------------------------------------
models/gemini-2.5-flash | 001...
models/gemini-2.5-pro | 2.5...
models/gemini-2.0-flash | 2.0...
models/gemini-2.0-flash-001 | 2.0...
models/gemini-2.0-flash-lite-001 | 2.0...
models/gemini-2.0-flash-lite | 2.0...
models/gemini-2.5-flash-preview-tts | gemini-2.5-flash-exp-tts-2025-05-19...
models/gemini-2.5-pro-preview-tts | gemini-2.5-pro-preview-tts-2025-05-19...
models/gemma-3-1b-it | 001...
models/gemma-3-4b-it | 001...
models/gemma-3-12b-it | 001...
models/gemma-3-27b-it | 001...
models/gemma-3n-e4b-it | 001...
models/gemma-3n-e2b-it | 001...
models/gemma-4-26b-a4b-it | 001...
models/gemma-4-31b-it | 001...
models/gemini-flash-latest | Gemini Flash Latest...
models/gemini-flash-lite-latest | Gemini Flash-Lite Latest...
models/gemini-pro-latest | Gemini Pro Latest...
models/gemini-2.5-flash-lite | 001...
models/gemini-2.5-flash-image | 2.0...
models/gemini-3-pro-preview | 3-pro-preview-11-2025...
models/gemini-3-flash-preview | 3-flash-preview-12-2025...
models/gemini-3.1-pro-preview | 3.1-pro-preview-01-2026...
models/gemini-3.1-pro-preview-customtools | 3.1-pro-preview-01-2026...
models/gemini-3.1-flash-lite-preview | 3.1-flash-lite-preview-03-2026...
models/gemini-3-pro-image-preview | 3.0...
models/nano-banana-pro-preview | 3.0...
models/gemini-3.1-flash-image-preview | 3.0...
models/lyria-3-clip-preview | lyria-3-clip-preview...
models/lyria-3-pro-preview | lyria-3-pro-preview...
models/gemini-robotics-er-1.5-preview | 1.5-preview...
models/gemini-2.5-computer-use-preview-10-2025 | Gemini 2.5 Computer Use Preview 10-2025...
models/deep-research-pro-preview-12-2025 | deepthink-exp-05-20...
Status code: 404
Error Response: {
"error": {
"code": 404,
"message": "models/gemini-1.0-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.",
"status": "NOT_FOUND"
}
}
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '53635' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.0 Pro
Model Name | Methods Supported
------------------------------------------------------------
models/gemini-2.5-flash | 001...
models/gemini-2.5-pro | 2.5...
models/gemini-2.0-flash | 2.0...
models/gemini-2.0-flash-001 | 2.0...
models/gemini-2.0-flash-lite-001 | 2.0...
models/gemini-2.0-flash-lite | 2.0...
models/gemini-2.5-flash-preview-tts | gemini-2.5-flash-exp-tts-2025-05-19...
models/gemini-2.5-pro-preview-tts | gemini-2.5-pro-preview-tts-2025-05-19...
models/gemma-3-1b-it | 001...
models/gemma-3-4b-it | 001...
models/gemma-3-12b-it | 001...
models/gemma-3-27b-it | 001...
models/gemma-3n-e4b-it | 001...
models/gemma-3n-e2b-it | 001...
models/gemma-4-26b-a4b-it | 001...
models/gemma-4-31b-it | 001...
models/gemini-flash-latest | Gemini Flash Latest...
models/gemini-flash-lite-latest | Gemini Flash-Lite Latest...
models/gemini-pro-latest | Gemini Pro Latest...
models/gemini-2.5-flash-lite | 001...
models/gemini-2.5-flash-image | 2.0...
models/gemini-3-pro-preview | 3-pro-preview-11-2025...
models/gemini-3-flash-preview | 3-flash-preview-12-2025...
models/gemini-3.1-pro-preview | 3.1-pro-preview-01-2026...
models/gemini-3.1-pro-preview-customtools | 3.1-pro-preview-01-2026...
models/gemini-3.1-flash-lite-preview | 3.1-flash-lite-preview-03-2026...
models/gemini-3-pro-image-preview | 3.0...
models/nano-banana-pro-preview | 3.0...
models/gemini-3.1-flash-image-preview | 3.0...
models/gemini-3.1-pro-preview-customtools | 3.1-pro-preview-01-2026...
models/gemini-3.1-flash-lite-preview | 3.1-flash-lite-preview-03-2026...
models/gemini-3-pro-image-preview | 3.0...
models/nano-banana-pro-preview | 3.0...
models/gemini-3.1-flash-image-preview | 3.0...
models/gemini-3-pro-image-preview | 3.0...
models/nano-banana-pro-preview | 3.0...
models/gemini-3.1-flash-image-preview | 3.0...
models/gemini-3.1-flash-image-preview | 3.0...
models/lyria-3-clip-preview | lyria-3-clip-preview...
models/lyria-3-pro-preview | lyria-3-pro-preview...
models/gemini-robotics-er-1.5-preview | 1.5-preview...
models/gemini-2.5-computer-use-preview-10-2025 | Gemini 2.5 Computer Use Preview 10-2025...
models/deep-research-pro-preview-12-2025 | deepthink-exp-05-20...
Status code: 200
------------------------------
AI Response: The capital of France is **Paris**.
------------------------------
PS C:\Lab\Python\python_code_v1> ^C
PS C:\Lab\Python\python_code_v1> c:; cd 'c:\Lab\Python\python_code_v1'; & 'c:\Lab\Python\python_code_v1\.venv\Scripts\python.exe' 'c:\Users\PijushBiswas\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\libs\debugpy\launcher' '49250' '--' 'C:\Lab\Python\python_code_v1\api.py'
API Testing for Google AIs - Gemini 1.0 Pro
Status code: 200
------------------------------
AI Response: ```json
[
{
"name": "Andhra Pradesh",
"area_sq_km": 162975,
"population_2011": 84580777,
"capital": "Amaravati"
},
{
"name": "Arunachal Pradesh",
"area_sq_km": 83743,
"name": "Andhra Pradesh",
"area_sq_km": 162975,
"population_2011": 84580777,
"capital": "Amaravati"
},
{
"name": "Andhra Pradesh",
"area_sq_km": 162975,
"population_2011": 84580777,
"name": "Andhra Pradesh",
"area_sq_km": 162975,
"name": "Andhra Pradesh",
"name": "Andhra Pradesh",
"area_sq_km": 162975,
"population_2011": 84580777,
"capital": "Amaravati"
},
{
"name": "Arunachal Pradesh",
"area_sq_km": 83743,
"population
------------------------------
PS C:\Lab\Python\python_code_v1> python api.py
C:\Python312\Lib\site-packages\requests\__init__.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn't match a supported version!
warnings.warn(
API Testing for Google AIs - Gemini 1.0 Pro
Status code: 200
------------------------------
AI Response: ```json
{
"states": [
{
"name": "Andhra Pradesh",
"area_sq_km": 162975,
"population": 49577103,
"capital": "Amaravati"
},
{
"name": "Arunachal Pradesh",
"area_sq_km": 83743,
"population": 1383727,
"capital": "Itanagar"
},
{
"name": "Assam",
"area_sq_km": 78438,
"population": 31205576,
"capital": "Dispur"
},
{
"name": "Bihar",
"area_sq_km": 94163,
"population": 104099452,
"capital": "Patna"
},
{
"name": "Chhattisgarh",
"area_sq_km": 135192,
"population": 25545198,
"capital": "Raipur"
},
{
"name": "Goa",
"area_sq_km": 3702,
"population": 1458545,
"capital": "Panaji"
},
{
"name": "Gujarat",
"area_sq_km": 196244,
"population": 60439692,
"capital": "Gandhinagar"
},
{
"name": "Haryana",
"area_sq_km": 44212,
"population": 25351462,
"capital": "Chandigarh"
},
{
"name": "Himachal Pradesh",
"area_sq_km": 55673,
"population": 6864602,
"capital": "Shimla"
},
{
"name": "Jharkhand",
"area_sq_km": 79716,
"population": 32988134,
"capital": "Ranchi"
},
{
"name": "Karnataka",
"area_sq_km": 191791,
"population": 61095297,
"capital": "Bengaluru"
},
{
"name": "Kerala",
"area_sq_km": 38863,
"population": 33406061,
"capital": "Thiruvananthapuram"
},
{
"name": "Madhya Pradesh",
"area_sq_km": 308252,
"population": 72626809,
"capital": "Bhopal"
},
{
"name": "Maharashtra",
"area_sq_km": 307713,
"population": 112374333,
"capital": "Mumbai"
},
{
"name": "Manipur",
"area_sq_km": 22327,
"population": 2855794,
"capital": "Imphal"
},
{
"name": "Meghalaya",
"area_sq_km": 22429,
"population": 2966889,
"capital": "Shillong"
},
{
"name": "Mizoram",
"area_sq_km": 21081,
"population": 1097206,
"capital": "Aizawl"
},
{
"name": "Nagaland",
"area_sq_km": 16579,
"population": 1978502,
"capital": "Kohima"
},
{
"name": "Odisha",
"area_sq_km": 155707,
"population": 41974218,
"capital": "Bhubaneswar"
},
{
"name": "Punjab",
"area_sq_km": 50362,
"population": 27743338,
"capital": "Chandigarh"
},
{
"name": "Rajasthan",
"area_sq_km": 342239,
"population": 68548437,
"capital": "Jaipur"
},
{
"name": "Sikkim",
"area_sq_km": 7096,
"population": 610577,
"capital": "Gangtok"
},
{
"name": "Tamil Nadu",
"area_sq_km": 130058,
"population": 72147030,
"capital": "Chennai"
},
{
"name": "Telangana",
"area_sq_km": 112077,
"population": 35003674,
"capital": "Hyderabad"
},
{
"name": "Tripura",
"area_sq_km": 10486,
"population": 3673917,
"capital": "Agartala"
},
{
"name": "Uttar Pradesh",
"area_sq_km": 240928,
"population": 199812341,
"capital": "Lucknow"
},
{
"name": "Uttarakhand",
"area_sq_km": 53483,
"population": 10086292,
"capital": "Dehradun"
},
{
"name": "West Bengal",
"area_sq_km": 88752,
"population": 91276115,
"capital": "Kolkata"
}
]
}
```
------------------------------
Comments
Post a Comment