How to install Announcing the Google Gen AI SDK for Kotlin 1.0
Integrating modern generative AI capabilities into Kotlin applications shouldn't require juggling raw HTTP clients or bridging disparate Java libraries.
By Dillip Chowdary • Sep 03, 2026 • Source: Google Cloud Blog
What happened
The announcement is on the Google Cloud Blog. I’ll read that post and the official SDK docs so the install steps stay factual.Integrating modern generative AI capabilities into Kotlin applications should not require juggling raw HTTP clients or bridging disparate Java libraries. Google Cloud announced the 1.0 release of the Google Gen AI SDK for Kotlin, published as google-genai-kotlin, so Kotlin teams can call Gemini through one idiomatic multiplatform library instead of that extra glue.
The SDK is a Kotlin Multiplatform library for the JVM and Android. One Client talks to the Gemini Developer API on Google AI Studio and to the Gemini Enterprise Agent Platform on Google Cloud, with only configuration changes between those backends. The rest of this guide covers the 1.0 surface, the builder workflow, install and upgrade steps, compatibility traps, and the checks to run after you add the coordinate.
The artifact is on Maven Central as com.google.genai:google-genai-kotlin. It is built as a Kotlin Multiplatform library and uses coroutines, asynchronous Flow streaming, and immutable data classes with named and default parameters. JVM targets include backend services, serverless functions, and desktop. Android is a supported target from the same published coordinate. Switching between the Gemini Developer API and the Gemini Enterprise Agent Platform is a configuration change, not a second library.
How it works
The Client class is the entry point. It manages HTTP connections and authentication from the environment, reading GEMINI_API_KEY or GOOGLE_API_KEY for Google AI Studio, or GOOGLE_GENAI_USE_ENTERPRISE set to true with standard Google Cloud Application Default Credentials for enterprise. Unary generateContent, generateContentStream as a cold Flow of GenerateContentResponse, a chats service that keeps history and formats turns, multimodal Content with Google Search grounding, image generation and conversational image editing on the Gemini 3 image family, Gemini Live over client.live.connect, FunctionDeclaration tools, and Automatic Function Calling on chat all ship in this 1.0 drop. Source, runnable samples, and discussion live in the googleapis/kotlin-genai repository on GitHub.
Kotlin call sites no longer need a raw HTTP client or a Java library bridge. You construct Client, then call client.models.generateContent with a model name and text, or generateContentStream when you want token chunks as a Flow. The chats service replaces hand-maintained conversation arrays: create a session, call sendMessage, and the next turn includes prior context. sendMessageStream covers streaming chat.
Why it matters
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Moving from Google AI Studio to the Gemini Enterprise Agent Platform is an environment and Client configuration change, not a second dependency. Backend stacks named in the announcement include Ktor, Spring Boot, Quarkus, and Micronaut, sharing the same coordinate with Android and with Kotlin Multiplatform commonMain. Tool use moved from manual JSON wiring to FunctionDeclaration plus Schema, and chat can take AutomaticFunctionCalling so the SDK invokes your function and continues the turn. Image work uses generateContent on gemini-3.1-flash-image or gemini-3-pro-image, with bytes delivered as a Blob part rather than through a separate download API.
Confirm Maven Central is in your repositories. For a Kotlin Multiplatform app, open build.gradle.kts and add implementation of com.google.genai:google-genai-kotlin:1.0.0 inside kotlin sourceSets commonMain.dependencies so shared code can import the SDK. For a single-platform JVM or Android Kotlin project, add the same implementation line to the top-level dependencies block. Gradle Module Metadata then selects the JVM or Android variant.
If you already call Gemini over HTTP or through a Java Gen AI client from Kotlin, remove that path and put google-genai-kotlin 1.0.0 in its place. Rewrite imports to com.google.genai.kotlin.Client and kotlinx.coroutines. Open a Client with the use extension so the network engine and HTTP connections are released. For the Gemini Developer API, export GEMINI_API_KEY or GOOGLE_API_KEY before process start. For enterprise, set GOOGLE_GENAI_USE_ENTERPRISE to true and use Application Default Credentials.
Who is affected
Smoke-test inside a coroutine. Inside Client().use, call client.models.generateContent with model gemini-flash-latest and a short text prompt, then print response.text. For a streaming check, call generateContentStream with the same model and collect the Flow, printing each chunk.text when it is present. For chat, call client.chats.create with that model and an optional GenerateContentConfig that sets a systemInstruction Content, then sendMessage for the first turn and sendMessage again for the follow-up so history is attached automatically. After the dependency change, recompile, run that smoke test on the JVM, and if you share KMP code, run the same Client calls from commonMain against an Android or JVM test target.
Gotchas and compatibility generateContentStream is a cold Flow, so it does nothing until you collect it. Always close Client through use. Chat history is owned by the session, and a config passed on create applies across turns. Google Search grounding is enabled by putting a Tool with googleSearch in GenerateContentConfig.tools, then reading groundingMetadata for webSearchQueries and groundingChunks. Image output is inline Blob data on response.parts, which you write to disk yourself. Live requires a persistent WebSocket via client.live.connect. The announcement uses gemini-live-2.5-flash-native-audio when client.enterprise is true and gemini-3.1-flash-live-preview otherwise. FunctionDeclaration calls appear on response.functionCalls unless Automatic Function Calling is enabled on the chat session.
What to watch next
Auth is environment-driven. Do not assume a second Kotlin wrapper is required for JVM versus Android when you use the unsuffixed google-genai-kotlin coordinate with Gradle. Model names in the announcement include gemini-flash-latest for text, gemini-3.1-flash-image and gemini-3-pro-image for images, and the Live model pair above. Pin the documented 1.0.0 coordinate. The SDK does not remove the choice between the Developer API and Enterprise. It only unifies the client.
Follow the googleapis/kotlin-genai GitHub repository for source and discussions, and work through the Kotlin Gen AI sample suite under examples in that repo. File issues, feature requests, and pull requests there. After install, watch Client lifecycle in long-running Ktor, Spring Boot, Quarkus, or Micronaut services, Flow collection in UI code, and credential handling when you toggle GOOGLE_GENAI_USE_ENTERPRISE. Use the samples to verify chat, grounding, image parts, Live connect, and automatic function calling against the same 1.0 Client you just added.
Developer Action Items
- ☐ Diff the official changelog for Gemini / Google / GitHub 1.0 before you bump — APIs, defaults, and removed flags only.
- ☐ Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
- ☐ Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
- ☐ Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
- ☐ If Google Cloud Blog did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
OpenAI releasing major upgrade to ChatGPT and Codex with GPT-6 Astra, details here
Read →
ChatGPT, Grok, and Claude all went down at the same time
Read →
Anthropic confirms Claude is down, multiple models affected
Read →
Gemini 3.8 Flash is now available in GitHub Copilot
Read →
Today's Tech Pulse briefing
Full briefing →
Advertisement