CINXE.COM
Gemini models | Gemini API | Google AI for Developers
<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="157101835696-ooapojlodmuabs2do2vuhhnf90bccmoi.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Google AI for Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#1967d2"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/googledevai/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/css/app.css"> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/images/favicon-new.png"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/images/touchicon-180-new.png"><link rel="canonical" href="https://ai.google.dev/gemini-api/docs/models/gemini"><link rel="search" type="application/opensearchdescription+xml" title="Google AI for Developers" href="https://ai.google.dev/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://ai.google.dev/gemini-api/docs/models/gemini" /><link rel="alternate" hreflang="x-default" href="https://ai.google.dev/gemini-api/docs/models/gemini" /><link rel="alternate" hreflang="ar" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=ar" /><link rel="alternate" hreflang="bn" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=fa" /><link rel="alternate" hreflang="fr" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=fr" /><link rel="alternate" hreflang="de" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=de" /><link rel="alternate" hreflang="he" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=he" /><link rel="alternate" hreflang="hi" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=hi" /><link rel="alternate" hreflang="id" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=id" /><link rel="alternate" hreflang="it" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=it" /><link rel="alternate" hreflang="ja" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=ja" /><link rel="alternate" hreflang="ko" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=ko" /><link rel="alternate" hreflang="pl" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=es-419" /><link rel="alternate" hreflang="th" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=th" /><link rel="alternate" hreflang="tr" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=tr" /><link rel="alternate" hreflang="vi" href="https://ai.google.dev/gemini-api/docs/models/gemini?hl=vi" /><title>Gemini models | Gemini API | Google AI for Developers</title> <meta property="og:title" content="Gemini models | Gemini API | Google AI for Developers"><meta name="description" content="Learn about Google&#39;s most advanced AI models, the Gemini model family, including Gemini 1.5 Flash, Gemini 1.5 Pro, and more"> <meta property="og:description" content="Learn about Google&#39;s most advanced AI models, the Gemini model family, including Gemini 1.5 Flash, Gemini 1.5 Pro, and more"><meta property="og:url" content="https://ai.google.dev/gemini-api/docs/models/gemini"><meta property="og:image" content="https://ai.google.dev/static/site-assets/images/share-gemini-api.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "Gemini models" } </script><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Gemini API", "item": "https://ai.google.dev/gemini-api" },{ "@type": "ListItem", "position": 2, "name": "Gemini models", "item": "https://ai.google.dev/gemini-api/docs/models/gemini" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="googledevai-theme" type="article" layout="docs" display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner" keep-tabs-visible> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="geminiAPI" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <img src="https://ai.google.dev/_static/googledevai/images/lockup-new.svg" class="devsite-site-logo" alt="Gemini API"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab class="devsite-active"> <a href="https://ai.google.dev/gemini-api/docs" track-metadata-eventdetail="https://ai.google.dev/gemini-api/docs" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - gemini api" track-metadata-module="primary nav" aria-label="Gemini API, selected" data-category="Site-Wide Custom Events" data-label="Tab: Gemini API" track-name="gemini api" > Gemini API </a> </tab> <tab > <a href="https://aistudio.google.com" track-metadata-eventdetail="https://aistudio.google.com" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - google ai studio" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Google AI Studio" track-name="google ai studio" > Google AI Studio </a> </tab> <tab > <a href="https://ai.google.dev/gemma" track-metadata-eventdetail="https://ai.google.dev/gemma" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - gemma" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Gemma" track-name="gemma" > Gemma </a> </tab> <tab > <a href="https://ai.google.dev/edge" track-metadata-eventdetail="https://ai.google.dev/edge" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - google ai edge" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Google AI Edge" track-name="google ai edge" > Google AI Edge </a> </tab> <tab class="devsite-dropdown "> <span class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - tools" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Tools" track-name="tools" > Tools </span> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Tools" track-type="nav" track-metadata-eventdetail="" track-metadata-position="nav - tools" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Tools" track-name="tools" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-item"> <a href="https://ai.google.dev/responsible" track-type="nav" track-metadata-eventdetail="https://ai.google.dev/responsible" track-metadata-position="nav - tools" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Responsible GenAI Toolkit </div> </a> </li> <li class="devsite-nav-item"> <a href="https://colab.google/" track-type="nav" track-metadata-eventdetail="https://colab.google/" track-metadata-position="nav - tools" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Colab </div> </a> </li> <li class="devsite-nav-item"> <a href="https://firebase.google.com/docs/genkit" track-type="nav" track-metadata-eventdetail="https://firebase.google.com/docs/genkit" track-metadata-position="nav - tools" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Firebase Genkit </div> </a> </li> <li class="devsite-nav-item"> <a href="https://jax.readthedocs.io/" track-type="nav" track-metadata-eventdetail="https://jax.readthedocs.io/" track-metadata-position="nav - tools" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> JAX </div> </a> </li> <li class="devsite-nav-item"> <a href="https://keras.io/" track-type="nav" track-metadata-eventdetail="https://keras.io/" track-metadata-position="nav - tools" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> Keras </div> </a> </li> <li class="devsite-nav-item"> <a href="https://www.tensorflow.org/" track-type="nav" track-metadata-eventdetail="https://www.tensorflow.org/" track-metadata-position="nav - tools" track-metadata-module="tertiary nav" tooltip > <div class="devsite-nav-item-title"> TensorFlow </div> </a> </li> </ul> </div> </div> </div> </tab> <tab > <a href="https://discuss.ai.google.dev/" track-metadata-eventdetail="https://discuss.ai.google.dev/" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - community" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" > Community </a> </tab> </nav> </devsite-tabs> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="Gemini API" tenant-name="Google AI for Developers" > <form class="devsite-search-form" action="https://ai.google.dev/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <devsite-user enable-profiles id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab class="devsite-active"> <a href="https://ai.google.dev/gemini-api/docs" track-metadata-eventdetail="https://ai.google.dev/gemini-api/docs" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - docs" track-metadata-module="primary nav" aria-label="Docs, selected" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" > Docs </a> </tab> <tab > <a href="https://ai.google.dev/api" track-metadata-eventdetail="https://ai.google.dev/api" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - api reference" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: API Reference" track-name="api reference" > API Reference </a> </tab> <tab > <a href="https://ai.google.dev/pricing" track-metadata-eventdetail="https://ai.google.dev/pricing" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - pricing" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Pricing" track-name="pricing" > Pricing </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" hidden> <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="geminiAPI" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <img src="https://ai.google.dev/_static/googledevai/images/lockup-new.svg" class="devsite-site-logo" alt="Gemini API"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/gemini-api/docs" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Gemini API" track-name="gemini api" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gemini API" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gemini API </span> </a> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/gemini-api/docs" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Docs" track-name="docs" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Docs" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip menu="_book"> Docs </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/api" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: API Reference" track-name="api reference" data-category="Site-Wide Custom Events" data-label="Responsive Tab: API Reference" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > API Reference </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/pricing" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Pricing" track-name="pricing" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Pricing" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Pricing </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="https://aistudio.google.com" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Google AI Studio" track-name="google ai studio" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google AI Studio" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google AI Studio </span> </a> </li> <li class="devsite-nav-item"> <a href="/gemma" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Gemma" track-name="gemma" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gemma" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gemma </span> </a> </li> <li class="devsite-nav-item"> <a href="/edge" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Google AI Edge" track-name="google ai edge" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google AI Edge" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google AI Edge </span> </a> </li> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Tools" track-name="tools" > <span class="devsite-nav-text" tooltip > Tools </span> </span> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Tools" track-name="tools" > <span class="devsite-nav-text" tooltip menu="Tools"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Tools"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="https://discuss.ai.google.dev/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Community" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Community </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/gemini-api/docs" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs" ><span class="devsite-nav-text" tooltip>Overview</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Get started</span> </div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/api-key" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/api-key" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/api-key" ><span class="devsite-nav-text" tooltip>API keys</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/quickstart" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/quickstart" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/quickstart" ><span class="devsite-nav-text" tooltip>Quickstart</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/downloads" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/downloads" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/downloads" data-synonyms="SDKs, python, go, node.js, node, typescript, flutter, dart, install, library, libraries, swift, android"><span class="devsite-nav-text" tooltip>Libraries</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/changelog" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/changelog" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/changelog" ><span class="devsite-nav-text" tooltip>Release notes</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Models</span> </div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/models/gemini" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/models/gemini" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/models/gemini" data-synonyms="gemini-pro, gemini-pro-1.0, gemini-pro-vision, gemini 1.5 flash, gemini-1.5-flash, gemini, flash, pro, gemini-pro-1.5, gemini pro, text embedding, text embeddings, text-embedding-004"><span class="devsite-nav-text" tooltip>Gemini</span></a></li> <li class="devsite-nav-item devsite-nav-experimental"><a href="/gemini-api/docs/models/experimental-models" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/models/experimental-models" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/models/experimental-models" ><span class="devsite-nav-text" tooltip>Experimental models</span><span class="devsite-nav-icon material-icons" data-icon="experimental" data-title="Experimental!" aria-hidden="true"></span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Capabilities</span> </div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/text-generation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/text-generation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/text-generation" ><span class="devsite-nav-text" tooltip>Text generation</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/document-processing" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/document-processing" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/document-processing" ><span class="devsite-nav-text" tooltip>Document processing</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/vision" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/vision" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/vision" ><span class="devsite-nav-text" tooltip>Vision</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/audio" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/audio" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/audio" ><span class="devsite-nav-text" tooltip>Audio</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/long-context" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/long-context" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/long-context" ><span class="devsite-nav-text" tooltip>Long context</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Grounding</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/docs/grounding" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/grounding" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/grounding" ><span class="devsite-nav-text" tooltip>Grounding with Google Search</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/grounding/search-suggestions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/grounding/search-suggestions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/grounding/search-suggestions" ><span class="devsite-nav-text" tooltip>Use Google Search Suggestions</span></a></li></ul></div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/code-execution" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/code-execution" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/code-execution" ><span class="devsite-nav-text" tooltip>Code execution</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/structured-output" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/structured-output" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/structured-output" ><span class="devsite-nav-text" tooltip>Structured output</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Fine-tuning</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/docs/model-tuning" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/model-tuning" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/model-tuning" ><span class="devsite-nav-text" tooltip>Intro to fine-tuning</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/model-tuning/tutorial" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/model-tuning/tutorial" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/model-tuning/tutorial" ><span class="devsite-nav-text" tooltip>Fine-tuning tutorial</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Function calling</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/docs/function-calling" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/function-calling" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/function-calling" ><span class="devsite-nav-text" tooltip>Intro to function calling</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/function-calling/tutorial" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/function-calling/tutorial" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/function-calling/tutorial" ><span class="devsite-nav-text" tooltip>Function calling tutorial</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/tutorials/extract_structured_data" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/extract_structured_data" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/extract_structured_data" ><span class="devsite-nav-text" tooltip>Extract structured data</span></a></li></ul></div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/system-instructions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/system-instructions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/system-instructions" ><span class="devsite-nav-text" tooltip>System instructions</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/embeddings" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/embeddings" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/embeddings" ><span class="devsite-nav-text" tooltip>Embeddings</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Safety</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/docs/safety-settings" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/safety-settings" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/safety-settings" ><span class="devsite-nav-text" tooltip>Safety settings</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/safety-guidance" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/safety-guidance" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/safety-guidance" ><span class="devsite-nav-text" tooltip>Safety guidance</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Guides</span> </div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/caching" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/caching" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/caching" ><span class="devsite-nav-text" tooltip>Context caching</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/imagen" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/imagen" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/imagen" ><span class="devsite-nav-text" tooltip>Imagen 3</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/tokens" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/tokens" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/tokens" ><span class="devsite-nav-text" tooltip>Tokens</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Prompting</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/docs/prompting-intro" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/prompting-intro" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/prompting-intro" ><span class="devsite-nav-text" tooltip>Intro to prompting</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/prompting-strategies" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/prompting-strategies" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/prompting-strategies" ><span class="devsite-nav-text" tooltip>Prompting strategies</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/file-prompting-strategies" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/file-prompting-strategies" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/file-prompting-strategies" ><span class="devsite-nav-text" tooltip>File prompting strategies</span></a></li></ul></div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/semantic_retrieval" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/semantic_retrieval" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/semantic_retrieval" ><span class="devsite-nav-text" tooltip>Semantic retrieval</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/models/generative-models" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/models/generative-models" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/models/generative-models" ><span class="devsite-nav-text" tooltip>About generative models</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/billing" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/billing" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/billing" ><span class="devsite-nav-text" tooltip>Billing</span></a></li> <li class="devsite-nav-item devsite-nav-experimental"><a href="/gemini-api/docs/openai" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/openai" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/openai" ><span class="devsite-nav-text" tooltip>OpenAI Compatibility</span><span class="devsite-nav-icon material-icons" data-icon="experimental" data-title="Experimental!" aria-hidden="true"></span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/migrate-to-cloud" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/migrate-to-cloud" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/migrate-to-cloud" ><span class="devsite-nav-text" tooltip>Migrate to Cloud</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Additional resources</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/docs/ai-studio-quickstart" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/ai-studio-quickstart" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/ai-studio-quickstart" ><span class="devsite-nav-text" tooltip>Google AI Studio quickstart</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/get-started/android_aicore" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/get-started/android_aicore" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/get-started/android_aicore" ><span class="devsite-nav-text" tooltip>Android (on-device)</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/firebase-extensions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/firebase-extensions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/firebase-extensions" ><span class="devsite-nav-text" tooltip>Firebase extensions</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/docs/oauth" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/oauth" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/oauth" ><span class="devsite-nav-text" tooltip>OAuth authentication</span></a></li><li class="devsite-nav-item devsite-nav-experimental"><a href="/gemini-api/docs/learnlm" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/learnlm" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/learnlm" ><span class="devsite-nav-text" tooltip>LearnLM</span><span class="devsite-nav-icon material-icons" data-icon="experimental" data-title="Experimental!" aria-hidden="true"></span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Use cases</span> </div></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Applications</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/gemini-api/tutorials/pipet-code-agent" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/pipet-code-agent" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/pipet-code-agent" ><span class="devsite-nav-text" tooltip>Code assistant</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/tutorials/flutter-theme-agent" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/flutter-theme-agent" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/flutter-theme-agent" ><span class="devsite-nav-text" tooltip>Flutter code generator</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/tutorials/docs-agent" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/docs-agent" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/docs-agent" ><span class="devsite-nav-text" tooltip>Content search</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/tutorials/sql-talk" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/sql-talk" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/sql-talk" ><span class="devsite-nav-text" tooltip>Data exploration agent</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/tutorials/wordcraft" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/wordcraft" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/wordcraft" ><span class="devsite-nav-text" tooltip>Writing assistant</span></a></li><li class="devsite-nav-item"><a href="/gemini-api/tutorials/slides-advisor" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/tutorials/slides-advisor" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/tutorials/slides-advisor" ><span class="devsite-nav-text" tooltip>Slides reviewer</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Troubleshooting</span> </div></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/troubleshooting" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/troubleshooting" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/troubleshooting" ><span class="devsite-nav-text" tooltip>API troubleshooting</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/troubleshoot-ai-studio" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/troubleshoot-ai-studio" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/troubleshoot-ai-studio" ><span class="devsite-nav-text" tooltip>AI Studio troubleshooting</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/workspace" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/workspace" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/workspace" ><span class="devsite-nav-text" tooltip>AI Studio with Google Workspace</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/quota" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/quota" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/quota" ><span class="devsite-nav-text" tooltip>Request more quota</span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Community</span> </div></li> <li class="devsite-nav-item devsite-nav-external"><a href="https://discuss.ai.google.dev/" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: https://discuss.ai.google.dev/" track-type="bookNav" track-name="click" track-metadata-eventdetail="https://discuss.ai.google.dev/" ><span class="devsite-nav-text" tooltip>Developer forum</span><span class="devsite-nav-icon material-icons" data-icon="external" data-title="External" aria-hidden="true"></span></a></li> <li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"> <span class="devsite-nav-text" tooltip>Legal</span> </div></li> <li class="devsite-nav-item"><a href="/gemini-api/terms" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/terms" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/terms" ><span class="devsite-nav-text" tooltip>Terms of service</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/available-regions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/available-regions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/available-regions" ><span class="devsite-nav-text" tooltip>Available regions</span></a></li> <li class="devsite-nav-item"><a href="/gemini-api/docs/abuse-monitoring" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /gemini-api/docs/abuse-monitoring" track-type="bookNav" track-name="click" track-metadata-eventdetail="/gemini-api/docs/abuse-monitoring" ><span class="devsite-nav-text" tooltip>Abuse monitoring</span></a></li> </ul> <ul class="devsite-nav-list" menu="Tools" aria-label="Side menu" hidden> <li class="devsite-nav-item"> <a href="/responsible" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Responsible GenAI Toolkit" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Responsible GenAI Toolkit </span> </a> </li> <li class="devsite-nav-item"> <a href="https://colab.google/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Colab" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Colab </span> </a> </li> <li class="devsite-nav-item"> <a href="https://firebase.google.com/docs/genkit" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Firebase Genkit" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Firebase Genkit </span> </a> </li> <li class="devsite-nav-item"> <a href="https://jax.readthedocs.io/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: JAX" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > JAX </span> </a> </li> <li class="devsite-nav-item"> <a href="https://keras.io/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Keras" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Keras </span> </a> </li> <li class="devsite-nav-item"> <a href="https://www.tensorflow.org/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: TensorFlow" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > TensorFlow </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav has-sidebar > <div class="devsite-sidebar"> <div class="devsite-sidebar-content"> <devsite-toc class="devsite-nav" role="navigation" aria-label="On this page" depth="2" scrollbars ></devsite-toc> <devsite-recommendations-sidebar class="nocontent devsite-nav"> </devsite-recommendations-sidebar> </div> </div> <devsite-content> <article class="devsite-article"><style> /* Styles inlined from /site-assets/css/models.css */ :root { --gemini-api-table-font-color: #3c4043; --gemini-api-model-font: 'Google Sans Text', Roboto, sans-serif; --gemini-api-card-width: 17rem; --gemini-api-elevation-1dp: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(0, 0, 0, 0.2); --gemini-api-elevation-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 3px 3px -2px rgba(0, 0, 0, 0.12), 0 1px 8px 0 rgba(0, 0, 0, 0.2); } body[theme="googledevai-theme"] { --googledevai-button-gradient: var(--googledevai-button-gradient-light); } body[theme="googledevai-theme"].color-scheme--dark { --googledevai-button-gradient: var(--googledevai-button-gradient-dark); } .google-symbols { background: -webkit-linear-gradient(45deg, var(--googledevai-blue), var(--googledevai-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; user-select: none; vertical-align: bottom; } /* Cards */ @media only screen and (min-width: 625px) { .gemini-api-recommended { display: grid; grid-template-columns: repeat(3, 1fr); /* Three equal-width columns */ grid-column-gap: 3rem; /* Keep the gap between columns */ } } .gemini-api-recommended { width: 100%; /* Take full width of parent */ margin: 0 auto; } .gemini-api-card { background: var(--devsite-background-1); border: 1px solid var(--googledevai-border-color); border-radius: 9px; box-shadow: var(--gemini-api-elevation-1dp); height: 23rem; margin: 1rem .5rem; padding: 1rem; transition: box-shadow 0.3s ease-in-out; width: var(--gemini-api-card-width); } .color-scheme--dark .gemini-api-card { background: #131314; border-color: #444746; } .gemini-api-card:hover { box-shadow: var(--gemini-api-elevation-3dp); } .gemini-api-card a:empty { display: block; position: relative; height: 23rem; width: var(--gemini-api-card-width); top: -22.8rem; left: -1rem; } .gemini-api-card a:empty:focus { border: 2px solid var(--devsite-primary-color); border-radius: 9px; } .gemini-api-card-title { font-family: "Google Sans", Roboto, sans-serif; font-size: 1.3rem; font-weight: 500; height: 1.5rem; margin-bottom: 2.5rem; line-height: 1.3rem; } .gemini-api-card-description { font-size: .9rem; height: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: normal; } .gemini-api-card-bulletpoints { color: #757575; font-size: .8rem; height: 8.2rem; margin-left: 1rem; padding: 0; } .color-scheme--dark .gemini-api-card-bulletpoints { color: var(--devsite-primary-text-color); } .gemini-api-card-description, .gemini-api-card-bulletpoints { font-family: var(--gemini-api-model-font); } .gemini-api-card-bulletpoints li { line-height: 1rem; margin: .3rem 0; } /* Tables */ .gemini-api-model-table, .gemini-api-model-table th { color: var(--gemini-api-table-font-color); font: .95rem var(--gemini-api-model-font); } .color-scheme--dark .gemini-api-model-table, .color-scheme--dark .gemini-api-model-table th { color: var(--devsite-primary-text-color); } .gemini-api-model-table th { font-weight: 500; } .gemini-api-model-table td:first-child { max-width: 0; } .gemini-api-model-table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); grid-gap: 1rem .5rem; } .gemini-api-model-table section { display: inline-grid; } .gemini-api-model-table p { margin: 0 0 .5rem; } .gemini-api-model-table li { margin: 0; } .gemini-api-model-table ul { margin-top: .5rem; } .gemini-api-model-table .google-symbols { margin-right: .7rem; vertical-align: middle; } .gemini-api-supported, .gemini-api-not-supported { border-radius: 8px; display: inline-block; font-size: .9rem; font-weight: 500; line-height: 1rem; padding: .3rem 0.5em; } .gemini-api-supported { background: #e6f4ea; /* GM3 Green 50 */ color: #177d37; /* GM3 Green 700 */ } .gemini-api-not-supported { background: #fce8e6; /* GM3 Red 50 */ color: #c5221f; /* GM3 Red 700 */ } .color-scheme--dark .gemini-api-supported { background: #177d37; /* GM3 Green 700 */ color: #e6f4ea; /* GM3 Green 50 */ } .color-scheme--dark .gemini-api-not-supported { background: #c5221f; /* GM3 Red 700 */ color: #fce8e6; /* GM3 Red 50 */ } /* Buttons */ .gemini-api-model-button { background: var(--googledevai-button-gradient); background-size: 300% 300%; border-radius: 20rem; color: #001d35; font-family: var(--gemini-api-model-font); font-size: .9rem; font-weight: 500; padding: .6rem 1rem; text-align: center; text-decoration: none; transition: filter .2s ease-in-out, box-shadow .2s ease-in-out; } .gemini-api-model-button:hover{ animation: gradient 5s ease infinite; filter: brightness(.98); box-shadow: var(--gemini-api-elevation-1dp); } .gemini-api-model-button:focus { filter: brightness(.95); outline: #00639b solid 3px; outline-offset: 2px; text-decoration: none; } .gemini-api-model-button::before { content: 'spark'; font-family: 'Google Symbols'; padding-right: 0.5rem; vertical-align: middle; } @keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } </style> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://ai.google.dev/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="" > Home </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://ai.google.dev/gemini-api" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Gemini API" > Gemini API </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://ai.google.dev/gemini-api/docs" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="" > Docs </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <devsite-feedback position="header" project-name="Gemini API" product-id="5292923" bucket="documentation" context="" version="t-devsite-webserver-20241114-r00-rc02.464921008191574316" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="header" class="nocontent" project-icon="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/images/touchicon-180-new.png" > <button> Send feedback </button> </devsite-feedback> <h1 class="devsite-page-title" tabindex="-1"> Gemini models </h1> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <div class="devsite-page-title-meta"><devsite-view-release-notes></devsite-view-release-notes></div> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <div class="devsite-article-body clearfix "> <p> </p> <div class="gemini-api-recommended"> <div class="gemini-api-card"> <p class="gemini-api-card-title"> 1.5 Flash <span class="google-symbols" aria-hidden="true" translate="no">spark</span> </p> <p class="gemini-api-card-description"> Our most balanced multimodal model with great performance for most tasks </p> <ul class="gemini-api-card-bulletpoints"> <li>Input audio, images, video, and text, get text responses</li> <li>Generate code, extract data, edit text, and more</li> <li>Best for tasks balancing performance and cost</li> </ul> <a href="#gemini-1.5-flash" aria-label="Learn more about 1.5 Flash"></a> </div> <div class="gemini-api-card"> <p class="gemini-api-card-title"> 1.5 Flash-8B </p> <p class="gemini-api-card-description"> Our fastest and most cost-efficient multimodal model with great performance for high-frequency tasks </p> <ul class="gemini-api-card-bulletpoints"> <li>Input audio, images, video, and text, get text responses</li> <li>Generate code, extract data, edit text, and more</li> <li>Best for lower intelligence, high-frequency tasks</li> </ul> <a href="#gemini-1.5-flash-8b" aria-label="Learn more about 1.5 Flash-8B"></a> </div> <div class="gemini-api-card"> <p class="gemini-api-card-title"> 1.5 Pro </p> <p class="gemini-api-card-description"> Our best performing multimodal model with features for a wide variety of reasoning tasks </p> <ul class="gemini-api-card-bulletpoints"> <li>Input audio, images, video, and text, get text responses</li> <li>Generate code, extract data, edit text, and more</li> <li>For when you need a boost in performance</li> </ul> <a href="#gemini-1.5-pro" aria-label="Learn more about 1.5 Pro"></a> </div> </div> <h2 id="model-variations" data-text="Model variants" tabindex="-1">Model variants</h2> <p>The Gemini API offers different models that are optimized for specific use cases. Here's a brief overview of Gemini variants that are available:</p> <table> <tr> <th>Model variant</th> <th>Input(s)</th> <th>Output</th> <th>Optimized for</th> </tr> <tr> <td><a href="#gemini-1.5-flash">Gemini 1.5 Flash</a> <br><code translate="no" dir="ltr">gemini-1.5-flash</code></td> <td>Audio, images, videos, and text</td> <td>Text</td> <td>Fast and versatile performance across a diverse variety of tasks</td> </tr> <tr> <td><a href="#gemini-1.5-flash-8b">Gemini 1.5 Flash-8B</a> <br><code translate="no" dir="ltr">gemini-1.5-flash-8b</code></td> <td>Audio, images, videos, and text</td> <td>Text</td> <td>High volume and lower intelligence tasks</td> </tr> <tr> <td><a href="#gemini-1.5-pro">Gemini 1.5 Pro</a> <br><code translate="no" dir="ltr">gemini-1.5-pro</code></td> <td>Audio, images, videos, and text</td> <td>Text</td> <td> Complex reasoning tasks requiring more intelligence </td> </tr> <tr> <td><a href="#gemini-1.0-pro">Gemini 1.0 Pro</a> (Deprecated on 2/15/2025) <br><code translate="no" dir="ltr">gemini-1.0-pro</code></td> <td>Text</td> <td>Text</td> <td> Natural language tasks, multi-turn text and code chat, and code generation </td> </tr> <tr> <td><a href="#text-embedding-and-embedding">Text Embedding</a> <br><code translate="no" dir="ltr">text-embedding-004</code></td> <td>Text</td> <td>Text embeddings</td> <td> Measuring the relatedness of text strings </td> </tr> <tr> <td><a href="#AQA">AQA</a> <br><code translate="no" dir="ltr">aqa</code></td> <td>Text</td> <td>Text</td> <td> Providing source-grounded answers to questions </td> </tr> </table> <section> <devsite-expandable id="gemini-1.5-flash"> <h3 class="showalways" id="gemini-1.5-flash" data-text="Gemini 1.5 Flash" tabindex="-1">Gemini 1.5 Flash</h3> <p> Gemini 1.5 Flash is a fast and versatile multimodal model for scaling across diverse tasks. </p> <p><a href="https://aistudio.google.com?model=gemini-1.5-flash" class="gemini-api-model-button">Try in AI Studio</a></p> <h4 id="model-details" data-text="Model details" tabindex="-1">Model details</h4> <table class="gemini-api-model-table"> <tr> <th>Property</th> <th>Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td><code translate="no" dir="ltr">models/gemini-1.5-flash</code></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Inputs</b></p> <p>Audio, images, video, and text</p> </section> <section> <p><b>Output</b></p> <p>Text</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">token_auto</span>Token limits<sup><a href="#token-size" rel="footnote">[*]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input token limit</b></p> <p>1,048,576</p> </section> <section> <p><b>Output token limit</b></p> <p>8,192</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">movie_info</span>Audio/visual specs</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Maximum number of images per prompt</b></p> <p>3,600</p> </section> <section> <p><b>Maximum video length</b></p> <p>1 hour</p> </section> <section> <p><b>Maximum audio length</b></p> <p>Approximately 9.5 hours</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <b>Free:</b> <ul> <li>15 RPM</li> <li>1 million TPM</li> <li>1,500 RPD</li> </ul> </section> <section> <b>Pay-as-you-go:</b> <ul> <li>2,000 RPM</li> <li>4 million TPM</li> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">handyman</span>Capabilities</td> <td class="gemini-api-model-table-grid"> <section> <p><b>System instructions</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>JSON mode</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>JSON schema</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Adjustable safety settings</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Caching</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Tuning</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Function calling</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Code execution</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">123</span>Versions</td> <td> <section> <span>Read the <a href="/gemini-api/docs/models/gemini#model-versions">model version patterns</a> for more details.</span> <ul> <li>Latest: <code translate="no" dir="ltr">gemini-1.5-flash-latest</code></li> <li>Latest stable: <code translate="no" dir="ltr">gemini-1.5-flash</code></li> <li>Stable:</li> <ul> <li><code translate="no" dir="ltr">gemini-1.5-flash-001</code></li> <li><code translate="no" dir="ltr">gemini-1.5-flash-002</code></li> </ul> <li><a href="https://ai.google.dev/gemini-api/docs/models/experimental-models">Experimental</a>:</li> <ul> <li><code translate="no" dir="ltr">gemini-1.5-flash-8b-exp-0924</code></li> <li><code translate="no" dir="ltr">gemini-1.5-flash-8b-exp-0827</code></li> <li><code translate="no" dir="ltr">gemini-1.5-flash-exp-0827</code></li> </ul> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>September 2024</td> </tr> </table> </devsite-expandable> </section> <section> <devsite-expandable id="gemini-1.5-flash-8b"> <h3 class="showalways" id="gemini-1.5-flash-8b" data-text="Gemini 1.5 Flash-8B" tabindex="-1">Gemini 1.5 Flash-8B</h3> <p> Gemini 1.5 Flash-8B is a small model designed for lower intelligence tasks. </p> <p><a href="https://aistudio.google.com?model=gemini-1.5-flash" class="gemini-api-model-button">Try in AI Studio</a></p> <h4 id="model-details_1" data-text="Model details" tabindex="-1">Model details</h4> <table class="gemini-api-model-table"> <tr> <th>Property</th> <th>Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td><code translate="no" dir="ltr">models/gemini-1.5-flash-8b</code></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Inputs</b></p> <p>Audio, images, video, and text</p> </section> <section> <p><b>Output</b></p> <p>Text</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">token_auto</span>Token limits<sup><a href="#token-size" rel="footnote">[*]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input token limit</b></p> <p>1,048,576</p> </section> <section> <p><b>Output token limit</b></p> <p>8,192</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">movie_info</span>Audio/visual specs</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Maximum number of images per prompt</b></p> <p>3,600</p> </section> <section> <p><b>Maximum video length</b></p> <p>1 hour</p> </section> <section> <p><b>Maximum audio length</b></p> <p>Approximately 9.5 hours</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <b>Free:</b> <ul> <li>15 RPM</li> <li>1 million TPM</li> <li>1,500 RPD</li> </ul> </section> <section> <b>Pay-as-you-go:</b> <ul> <li>4,000 RPM</li> <li>4 million TPM</li> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">handyman</span>Capabilities</td> <td class="gemini-api-model-table-grid"> <section> <p><b>System instructions</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>JSON mode</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>JSON schema</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Adjustable safety settings</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Caching</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Tuning</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Function calling</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Code execution</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">123</span>Versions</td> <td> <section> <span>Read the <a href="/gemini-api/docs/models/gemini#model-versions">model version patterns</a> for more details.</span> <ul> <li>Latest: <code translate="no" dir="ltr">gemini-1.5-flash-8b-latest</code></li> <li>Latest stable: <code translate="no" dir="ltr">gemini-1.5-flash-8b</code></li> <li>Stable:</li> <ul> <li><code translate="no" dir="ltr">gemini-1.5-flash-8b-001</code></li> </ul> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>October 2024</td> </tr> </table> </devsite-expandable> </section> <section> <devsite-expandable id="gemini-1.5-pro"> <h3 class="showalways" id="gemini-1.5-pro" data-text="Gemini 1.5 Pro" tabindex="-1">Gemini 1.5 Pro</h3> <p> Gemini 1.5 Pro is a mid-size multimodal model that is optimized for a wide-range of reasoning tasks. 1.5 Pro can process large amounts of data at once, including 2 hours of video, 19 hours of audio, codebases with 60,000 lines of code, or 2,000 pages of text. </p> <p><a href="https://aistudio.google.com?model=gemini-1.5-pro" class="gemini-api-model-button">Try in AI Studio</a></p> <h4 id="model-details_2" data-text="Model details" tabindex="-1">Model details</h4> <table class="gemini-api-model-table"> <tr> <th scope="col">Property</th> <th scope="col">Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td><code translate="no" dir="ltr">models/gemini-1.5-pro</code></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Inputs</b></p> <p>Audio, images, video, and text</p> </section> <section> <p><b>Output</b></p> <p>Text</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">token_auto</span>Token limits<sup><a href="#token-size" rel="footnote">[*]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input token limit</b></p> <p>2,097,152</p> </section> <section> <p><b>Output token limit</b></p> <p>8,192</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">movie_info</span>Audio/visual specs</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Maximum number of images per prompt</b></p> <p>7,200</p> </section> <section> <p><b>Maximum video length</b></p> <p>2 hours</p> </section> <section> <p><b>Maximum audio length</b></p> <p>Approximately 19 hours</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <b>Free:</b> <ul> <li>2 RPM</li> <li>32,000 TPM</li> <li>50 RPD</li> </ul> </section> <section> <b>Pay-as-you-go:</b> <ul> <li>1,000 RPM</li> <li>4 million TPM</li> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">handyman</span>Capabilities</td> <td class="gemini-api-model-table-grid"> <section> <p><b>System instructions</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>JSON mode</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>JSON schema</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Adjustable safety settings</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Caching</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Tuning</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> <section> <p><b>Function calling</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Code execution</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">123</span>Versions</td> <td> <section> <span>Read the <a href="/gemini-api/docs/models/gemini#model-versions">model version patterns</a> for more details.</span> <ul> <li>Latest: <code translate="no" dir="ltr">gemini-1.5-pro-latest</code></li> <li>Latest stable: <code translate="no" dir="ltr">gemini-1.5-pro</code></li> <li>Stable:</li> <ul> <li><code translate="no" dir="ltr">gemini-1.5-pro-001</code></li> <li><code translate="no" dir="ltr">gemini-1.5-pro-002</code></li> </ul> <li><a href="https://ai.google.dev/gemini-api/docs/models/experimental-models">Experimental</a>:</li> <ul> <li><code translate="no" dir="ltr">gemini-1.5-pro-exp-0827</code></li> </ul> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>September 2024</td> </tr> </table> </devsite-expandable> </section> <section> <devsite-expandable id="gemini-1.0-pro"> <h3 class="showalways" id="gemini-1.0-pro" data-text="Gemini 1.0 Pro (Deprecated)" tabindex="-1">Gemini 1.0 Pro (Deprecated)</h3> <aside class="special"> <strong>Important:</strong> <span>1.0 Pro is deprecated and will be removed on February 15, 2025. Use 1.5 Pro or 1.5 Flash instead.</span> </aside> <p> Gemini 1.0 Pro is an NLP model that handles tasks like multi-turn text and code chat, and code generation. </p> <p><a href="https://aistudio.google.com?model=gemini-1.0-pro" class="gemini-api-model-button">Try in AI Studio</a></p> <h4 id="model-details_3" data-text="Model details" tabindex="-1">Model details</h4> <table class="gemini-api-model-table"> <tr> <th scope="col">Property</th> <th scope="col">Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td><code translate="no" dir="ltr">models/gemini-1.0-pro</code></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input</b></p> <p>Text</p> </section> <section> <p><b>Output</b></p> <p>Text</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <b>Free:</b> <ul> <li>15 RPM</li> <li>32,000 TPM</li> <li>1,500 RPD</li> </ul> </section> <section> <b>Pay-as-you-go:</b> <ul> <li>360 RPM</li> <li>120,000 TPM</li> <li>30,000 RPD</li> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">handyman</span>Capabilities</td> <td class="gemini-api-model-table-grid"> <section> <p><b>System instructions</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> <section> <p><b>JSON mode</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> <section> <p><b>JSON schema</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> <section> <p><b>Adjustable safety settings</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Caching</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> <section> <p><b>Tuning</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Function calling</b></p> <p><span class="gemini-api-supported">Supported</span></p> </section> <section> <p><b>Function calling configuration</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> <section> <p><b>Code execution</b></p> <p><span class="gemini-api-not-supported">Not supported</span></p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">123</span>Versions</td> <td> <section> <ul> <li>Latest: <code translate="no" dir="ltr">gemini-1.0-pro-latest</code></li> <li>Latest stable: <code translate="no" dir="ltr">gemini-1.0-pro</code></li> <li>Stable: <code translate="no" dir="ltr">gemini-1.0-pro-001</code></li> </ul> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>February 2024</td> </tr> </table> <aside class="note"> <b>Note:</b> <code translate="no" dir="ltr">gemini-pro</code> is an alias for <code translate="no" dir="ltr">gemini-1.0-pro</code>. </aside> </devsite-expandable> </section> <section> <devsite-expandable id="text-embedding"> <h3 class="showalways" id="text-embedding-and-embedding" data-text="Text Embedding and Embedding" tabindex="-1">Text Embedding and Embedding</h3> <h4 id="text-embedding" data-text="Text Embedding" tabindex="-1">Text Embedding</h4> <p> <a href="/gemini-api/docs/embeddings">Text embeddings</a> are used to measure the relatedness of strings and are widely used in many AI applications. </p> <p> <code translate="no" dir="ltr">text-embedding-004</code> achieves a <a href="https://arxiv.org/pdf/2403.20327">stronger retrieval performance and outperforms existing models</a> with comparable dimensions, on the standard MTEB embedding benchmarks. </p> <h5 id="model-details_4" data-text="Model details" tabindex="-1">Model details</h5> <table class="gemini-api-model-table"> <tr> <th scope="col">Property</th> <th scope="col">Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Gemini API</b></p> <p><code translate="no" dir="ltr">models/text-embedding-004</code></p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input</b></p> <p>Text</p> </section> <section> <p><b>Output</b></p> <p>Text embeddings</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">token_auto</span>Token limits<sup><a href="#token-size" rel="footnote">[*]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input token limit</b></p> <p>2,048</p> </section> <section> <p><b>Output dimension size</b></p> <p>768</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td>1,500 requests per minute</td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">encrypted</span>Adjustable safety settings</td> <td><span class="gemini-api-not-supported">Not supported</span></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>April 2024</td> </tr> </table> <h4 id="embedding" data-text="Embedding" tabindex="-1">Embedding</h4> <aside class="special"> <b>Note:</b> Text Embedding is the newer version of the Embedding model. If you're creating a new project, use Text Embedding. </aside> <p> You can use the Embedding model to generate <a href="/gemini-api/docs/embeddings">text embeddings</a> for input text.</p> <p> The Embedding model is optimized for creating embeddings with 768 dimensions for text of up to 2,048 tokens. </p> <h5 id="embedding-model-details" data-text="Embedding model details" tabindex="-1">Embedding model details</h5> <table class="gemini-api-model-table"> <tr> <th scope="col">Property</th> <th scope="col">Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td> <code translate="no" dir="ltr">models/embedding-001</code> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input</b></p> <p>Text</p> </section> <section> <p><b>Output</b></p> <p>Text embeddings</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">token_auto</span>Token limits<sup><a href="#token-size" rel="footnote">[*]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input token limit</b></p> <p>2,048</p> </section> <section> <p><b>Output dimension size</b></p> <p>768</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td>1,500 requests per minute</td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">encrypted</span>Adjustable safety settings</td> <td><span class="gemini-api-not-supported">Not supported</span></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>December 2023</td> </tr> </table> </devsite-expandable> </section> <section> <devsite-expandable id="aqa"> <h3 class="showalways" id="aqa" data-text="AQA" tabindex="-1">AQA</h3> <p> You can use the AQA model to perform <a href="/gemini-api/docs/semantic_retrieval">Attributed Question-Answering</a> (AQA)–related tasks over a document, corpus, or a set of passages. The AQA model returns answers to questions that are grounded in provided sources, along with estimating answerable probability. </p> <h4 id="model-details_5" data-text="Model details" tabindex="-1">Model details</h4> <table class="gemini-api-model-table"> <tr> <th scope="col">Property</th> <th scope="col">Description</th> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">id_card</span>Model code</td> <td><code translate="no" dir="ltr">models/aqa</code></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">save</span>Supported data types</td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input</b></p> <p>Text</p> </section> <section> <p><b>Output</b></p> <p>Text</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">language</span>Supported language</td> <td>English</td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">token_auto</span>Token limits<sup><a href="#token-size" rel="footnote">[*]</a></sup></td> <td class="gemini-api-model-table-grid"> <section> <p><b>Input token limit</b></p> <p>7,168</p> </section> <section> <p><b>Output token limit</b></p> <p>1,024</p> </section> </td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">swap_driving_apps_wheel</span>Rate limits<sup><a href="#rate-limits" rel="footnote">[**]</a></sup></td> <td>1,500 requests per minute</td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">encrypted</span>Adjustable safety settings</td> <td><span class="gemini-api-supported">Supported</span></td> </tr> <tr> <td><span class="google-symbols" aria-hidden="true">calendar_month</span>Latest update</td> <td>December 2023</td> </tr> </table> </devsite-expandable> </section> <p>See the <a href="/examples">examples</a> to explore the capabilities of these model variations.</p> <p id="token-size"> [*] A token is equivalent to about 4 characters for Gemini models. 100 tokens are about 60-80 English words. </p> <p id="rate-limits"> [**] <i>RPM: Requests per minute</i> <br> <i>TPM: Tokens per minute</i> <br> <i>RPD: Requests per day</i> <br> <i>TPD: Tokens per day</i> <br><br> Due to capacity limitations, specified maximum rate limits are not guaranteed. </p> <h2 id="model-versions" data-text="Model version name patterns" tabindex="-1">Model version name patterns</h2> <p>Gemini models are available in either <em>preview</em> or <em>stable</em> versions. In your code, you can use one of the following model name formats to specify which model and version you want to use.</p> <ul> <li><p><strong>Latest:</strong> Points to the cutting-edge version of the model for a specified generation and variation. The underlying model is updated regularly and might be a preview version. Only exploratory testing apps and prototypes should use this alias.</p> <p>To specify the latest version, use the following pattern: <code translate="no" dir="ltr"><model>-<generation>-<variation>-latest</code>. For example, <code translate="no" dir="ltr">gemini-1.0-pro-latest</code>.</p></li> <li><p><strong>Latest stable:</strong> Points to the most recent stable version released for the specified model generation and variation.</p> <p>To specify the latest stable version, use the following pattern: <code translate="no" dir="ltr"><model>-<generation>-<variation></code>. For example, <code translate="no" dir="ltr">gemini-1.0-pro</code>.</p></li> <li><p><strong>Stable:</strong> Points to a specific stable model. Stable models don't change. Most production apps should use a specific stable model.</p> <p>To specify a stable version, use the following pattern: <code translate="no" dir="ltr"><model>-<generation>-<variation>-<version></code>. For example, <code translate="no" dir="ltr">gemini-1.0-pro-001</code>.</p></li> <li><p><strong>Experimental:</strong> Points to an experimental model available in Preview, as defined in the <a href="https://ai.google.dev/gemini-api/terms">Terms</a>, meaning it is not for production use. We release experimental models to gather feedback, get our latest updates into the hands of developers quickly, and highlight the pace of innovation happening at Google. What we learn from experimental launches informs how we release models more widely. An experimental model can be swapped for another without prior notice. We don't guarantee that an experimental model will become a stable model in the future.</p> <p>To specify an experimental version, use the following pattern: <code translate="no" dir="ltr"><model>-<generation>-<variation>-<version></code>. For example, <code translate="no" dir="ltr">gemini-1.5-pro-exp-0827</code>.</p></li> </ul> <h2 id="available-languages" data-text="Available languages" tabindex="-1">Available languages</h2> <p>Gemini models are trained to work with the following languages:</p> <ul> <li>Arabic (<code translate="no" dir="ltr">ar</code>)</li> <li>Bengali (<code translate="no" dir="ltr">bn</code>)</li> <li>Bulgarian (<code translate="no" dir="ltr">bg</code>)</li> <li>Chinese simplified and traditional (<code translate="no" dir="ltr">zh</code>)</li> <li>Croatian (<code translate="no" dir="ltr">hr</code>)</li> <li>Czech (<code translate="no" dir="ltr">cs</code>)</li> <li>Danish (<code translate="no" dir="ltr">da</code>)</li> <li>Dutch (<code translate="no" dir="ltr">nl</code>)</li> <li>English (<code translate="no" dir="ltr">en</code>)</li> <li>Estonian (<code translate="no" dir="ltr">et</code>)</li> <li>Finnish (<code translate="no" dir="ltr">fi</code>)</li> <li>French (<code translate="no" dir="ltr">fr</code>)</li> <li>German (<code translate="no" dir="ltr">de</code>)</li> <li>Greek (<code translate="no" dir="ltr">el</code>)</li> <li>Hebrew (<code translate="no" dir="ltr">iw</code>)</li> <li>Hindi (<code translate="no" dir="ltr">hi</code>)</li> <li>Hungarian (<code translate="no" dir="ltr">hu</code>)</li> <li>Indonesian (<code translate="no" dir="ltr">id</code>)</li> <li>Italian (<code translate="no" dir="ltr">it</code>)</li> <li>Japanese (<code translate="no" dir="ltr">ja</code>)</li> <li>Korean (<code translate="no" dir="ltr">ko</code>)</li> <li>Latvian (<code translate="no" dir="ltr">lv</code>)</li> <li>Lithuanian (<code translate="no" dir="ltr">lt</code>)</li> <li>Norwegian (<code translate="no" dir="ltr">no</code>)</li> <li>Polish (<code translate="no" dir="ltr">pl</code>)</li> <li>Portuguese (<code translate="no" dir="ltr">pt</code>)</li> <li>Romanian (<code translate="no" dir="ltr">ro</code>)</li> <li>Russian (<code translate="no" dir="ltr">ru</code>)</li> <li>Serbian (<code translate="no" dir="ltr">sr</code>)</li> <li>Slovak (<code translate="no" dir="ltr">sk</code>)</li> <li>Slovenian (<code translate="no" dir="ltr">sl</code>)</li> <li>Spanish (<code translate="no" dir="ltr">es</code>)</li> <li>Swahili (<code translate="no" dir="ltr">sw</code>)</li> <li>Swedish (<code translate="no" dir="ltr">sv</code>)</li> <li>Thai (<code translate="no" dir="ltr">th</code>)</li> <li>Turkish (<code translate="no" dir="ltr">tr</code>)</li> <li>Ukrainian (<code translate="no" dir="ltr">uk</code>)</li> <li>Vietnamese (<code translate="no" dir="ltr">vi</code>)</li> </ul> <link href="/site-assets/css/style.css?v=2" rel="stylesheet" data-page-link><link href="https://fonts.googleapis.com/css2?family=Google+Symbols:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet" data-page-link> </div> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-feedback position="footer" project-name="Gemini API" product-id="5292923" bucket="documentation" context="" version="t-devsite-webserver-20241114-r00-rc02.464921008191574316" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="footer" class="nocontent" project-icon="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/images/touchicon-180-new.png" > <button> Send feedback </button> </devsite-feedback> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Except as otherwise noted, the content of this page is licensed under the <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>. For details, see the <a href="https://developers.google.com/site-policies">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p> <p>Last updated 2024-11-21 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-thumb-rating-feedback"> <devsite-feedback position="thumb-rating" project-name="Gemini API" product-id="5292923" bucket="documentation" context="" version="t-devsite-webserver-20241114-r00-rc02.464921008191574316" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="thumb-rating" class="nocontent" project-icon="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/images/touchicon-180-new.png" > <button> Need to tell us more? </button> </devsite-feedback> </template> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-21 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/terms" data-category="Site-Wide Custom Events" data-label="Footer Terms link" > Terms </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[]</script> <script type="application/json" tag-management>{"at": "True", "ga4": [], "ga4p": [], "gtm": [{"id": "GTM-TC2MQKS8", "purpose": 0}], "parameters": {"internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "Gemini API", "signedIn": "False", "tenant": "googledevai", "recommendations": {"sourcePage": "", "sourceType": 0, "sourceRank": 0, "sourceIdenticalDescriptions": 0, "sourceTitleWords": 0, "sourceDescriptionWords": 0, "experiment": ""}, "experiment": {"ids": ""}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <script nonce="9/gmVk7P9mZBNnXChYmTWf9bvky2YZ"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/js/app_loader.js', '[59,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai","https://googledevai-dot-devsite-v2-prod-3p.appspot.com",null,null,["/_pwa/googledevai/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/googledevai/images/favicon-new.png","/_static/googledevai/images/lockup-new.svg","https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,116,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyCNm9YxQumEXwGJgTDjxoxXK6m1F-9720Q","AIzaSyCc76DZePGtoyUjqKrLdsMGk_ry7sljLbY","ai.google.dev","AIzaSyB9bqgQ2t11WJsOX8qNsCQ6U-w91mmqF-I","AIzaSyAdYnStPdzjcJJtQ0mvIaeaMKj7_t6J_Fg",null,null,null,["Cloud__enable_cloud_shell_fte_user_flow","OnSwitch__enable","Cloud__enable_cloud_facet_chat","Profiles__enable_complete_playlist_endpoint","TpcFeatures__enable_mirror_tenant_redirects","MiscFeatureFlags__developers_footer_dark_image","CloudShell__cloud_code_overflow_menu","Profiles__enable_dashboard_curated_recommendations","CloudShell__cloud_shell_button","Cloud__enable_free_trial_server_call","MiscFeatureFlags__enable_project_variables","DevPro__enable_developer_subscriptions","Profiles__enable_developer_profiles_callout","Cloud__enable_cloud_dlp_service","Profiles__enable_public_developer_profiles","Concierge__enable_pushui","MiscFeatureFlags__developers_footer_image","Profiles__enable_page_saving","BookNav__enable_tenant_cache_key","Analytics__enable_clearcut_logging","MiscFeatureFlags__enable_firebase_utm","Cloud__enable_cloudx_ping","EngEduTelemetry__enable_engedu_telemetry","MiscFeatureFlags__enable_variable_operator","MiscFeatureFlags__emergency_css","Cloud__enable_llm_concierge_chat","DevPro__enable_cloud_innovators_plus","Search__enable_ai_eligibility_checks","Profiles__enable_completecodelab_endpoint","Experiments__reqs_query_experiments","Profiles__enable_awarding_url","Search__enable_dynamic_content_confidential_banner","MiscFeatureFlags__enable_explain_this_code","Profiles__enable_profile_collections","MiscFeatureFlags__enable_view_transitions","Profiles__require_profile_eligibility_for_signin","Profiles__enable_recognition_badges","Profiles__enable_release_notes_notifications","Cloud__enable_legacy_calculator_redirect","Cloud__enable_cloudx_experiment_ids","Search__enable_suggestions_from_borg","Cloud__enable_cloud_shell","TpcFeatures__enable_required_headers","Search__enable_page_map"],null,null,"AIzaSyA58TaKli1DculwmAmbpzLVGuWc8eCQgQc","https://developerscontentserving-pa.googleapis.com","AIzaSyDWBU60w0P9hEkr29kkksYs8Z7gvZ8u_wc","https://developerscontentsearch-pa.googleapis.com",2,4,null,"https://developerprofiles-pa.googleapis.com",[59,"googledevai","Google AI for Developers","ai.google.dev",null,"googledevai-dot-devsite-v2-prod-3p.appspot.com",null,null,[null,1,null,null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],null,null,null,null,[1,null,1],[1,1,null,1,1]],null,[73,null,null,null,null,null,"/images/lockup-new.svg","/images/touchicon-180-new.png",null,null,null,null,1,1,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme-new.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[],[1,1]],[[null,null,null,null,null,["GTM-TC2MQKS8"],null,null,null,null,null,[["GTM-TC2MQKS8",1]],1]],null,4]]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>