Harness the power of Gemini 1.5 Flash & Pro: Natively multimodal, with an industry-leading 2 million token context window
Gemini 1.5 Pro is Google's advanced multimodal AI model designed for complex reasoning tasks.
The Gemini 1.5 Flash model is Google's fastest and most cost-efficient multimodal AI model, optimized for high-frequency tasks.
Gemini 1.0 Pro serves as a foundational model for developers looking to implement AI in natural language tasks, offering robust capabilities in text understanding and generation.
Designed for applications requiring comprehensive data analysis, such as research, content generation, and complex reasoning tasks.
import os
from openai import OpenAI
client = OpenAI(
api_key="<YOUR_API_KEY>",
base_url="https://api.aimlapi.com",
)
response = client.chat.completions.create(
model="gemini-1.5-pro",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
import os
from openai import OpenAI
client = OpenAI(
api_key="<YOUR_API_KEY>",
base_url="https://api.aimlapi.com",
)
response = client.chat.completions.create(
model="gemini-pro",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
Gemini 1.0 Pro's training data encompasses a variety of domains, including literature, scientific articles, social media, and multimedia content, amounting to several terabytes of information.
This model is designed for applications requiring rapid responses, such as chatbots, on-demand content generation, and real-time data analysis.
import os
from openai import OpenAI
client = OpenAI(
api_key="<YOUR_API_KEY>",
base_url="https://api.aimlapi.com",
)
response = client.chat.completions.create(
model="gemini-1.5-flash",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
Obtain an API key from the AI/ML API dashboard, then follow the documentation to integrate the API into your projects.
Pricing varies by model usage; for example, Gemini 1.5 Flash is priced at $0.000039 per 1K input tokens and $0.000157 per 1K output tokens. For other models you can see the price description on the price page.
Security is a top priority. The API uses industry-standard encryption and complies with major data privacy regulations to ensure your data is protected.
Yes, we offer a free tier forever with a limited number of requests so you can test the API before committing to a paid plan.
Gemini 1.5 Flash is optimized for speed and real-time applications, while Gemini 1.5 Pro offers more advanced reasoning capabilities and is suited for complex tasks.
We provide 24/7 technical support, comprehensive documentation, and a Discord community. Enterprise customers receive dedicated support channels.