gemini-2.0-flash-exp
Last updated
Was this helpful?
Last updated
Was this helpful?
A cutting-edge multimodal AI model developed by Google DeepMind, designed to power agentic experiences. This model is capable of processing text and images.
import requests
response = requests.post(
"https://api.aimlapi.com/v1/chat/completions",
headers={
"Content-Type":"application/json",
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
"Content-Type":"application/json"
},
json={
"model":"google/gemini-2.0-flash-exp",
"messages":[
{
"role":"user",
# Insert your question for the model here, instead of Hello:
"content":"Hello"
}
]
}
)
data = response.json()
print(data)
Creates a chat completion using a language model, allowing interactive conversation by predicting the next response based on the given chat history. This is useful for AI-driven dialogue systems and virtual assistants.
512
false
POST /v1/chat/completions HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 397
{
"model": "gemini-2.0-flash-exp",
"frequency_penalty": 1,
"logit_bias": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"max_tokens": 512,
"presence_penalty": 1,
"messages": [
{
"role": "system",
"content": "text",
"name": "text"
}
],
"stream": false,
"top_p": 1,
"temperature": 1,
"stop": "text",
"tools": [
{
"type": "function",
"function": {
"description": "text",
"name": "text",
"parameters": {
"ANY_ADDITIONAL_PROPERTY": null
}
}
}
],
"tool_choice": "none"
}
No content