0% found this document useful (0 votes)
328 views1 page

Gemini API Google AI For Developers

Uploaded by

k8gwv7tymk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
328 views1 page

Gemini API Google AI For Developers

Uploaded by

k8gwv7tymk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

  Language Sign in

Home  Gemini API  Docs

Get started with the Gemini API Get a Gemini API Key

The Gemini API and Google AI Studio help you start working with Google's latest models and turn
your ideas into applications that scale.

Python [Link] REST

 
import [Link] as genai

[Link](api_key="YOUR_API_KEY ")
model = [Link]("gemini-1.5-flash")
response = model.generate_content("Explain how AI works")
print([Link])

Meet the models Try Gemini in Google AI Studio

1.5 Flash  1.5 Flash-8B 1.5 Pro

Our most balanced Our fastest and most cost- Our best performing
multimodal model with eEcient multimodal model multimodal model with
great performance for with great performance for features for a wide variety
most tasks high-frequency tasks of reasoning tasks

Explore the API

Explore long context

Input millions of tokens to Gemini models and derive


understanding from unstructured images, videos, and
documents.

Solve tasks with !ne-tuning

Modify the behavior of Gemini models to adapt to


speciVc tasks, recognize data, and solve problems.
Tune models with your own data to make production
deployments more robust and reliable.

Generate structured outputs

Constrain Gemini to respond with JSON, a structured


data format suitable for automated processing.

Start building with the Gemini API

Get started

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and
code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a
registered trademark of Oracle and/or its aEliates.

Last updated 2024-12-05 UTC.

Terms | Privacy

Language

You might also like