# Using the new Google Gen AI SDK for Kotlin

DevFeed: [Using the new Google Gen AI SDK for Kotlin](<https://devfeed.tech/articles/using-the-new-google-gen-ai-sdk-for-kotlin-25196.md>)

Original publisher: [Read original article](<https://johnoreilly.dev/posts/genai-kotlin-sdk/>)

Published: 2026-09-04T23:00:00Z

Content type: article

Language: en

Sources: [John O'Reilly](<https://devfeed.tech/sources/john-o-reilly.md>)

Topics: [SDK](<https://devfeed.tech/topics/sdk.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [firebase-ai-logic](<https://devfeed.tech/topics/firebase-ai-logic.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-sdk](<https://devfeed.tech/tags/ai-sdk.md>), [apis](<https://devfeed.tech/tags/apis.md>), [base64](<https://devfeed.tech/tags/base64.md>), [basketball](<https://devfeed.tech/tags/basketball.md>), [client](<https://devfeed.tech/tags/client.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [gen-ai](<https://devfeed.tech/tags/gen-ai.md>), [google](<https://devfeed.tech/tags/google.md>), [koog](<https://devfeed.tech/tags/koog.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [library](<https://devfeed.tech/tags/library.md>), [rest](<https://devfeed.tech/tags/rest.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [sdks](<https://devfeed.tech/tags/sdks.md>)

## AI overview

Google's Gen AI SDK for Kotlin replaces FormAI's hand-built Gemini REST calls with an idiomatic client built around coroutines and Flow. The JVM tool processes video clips with two requests: a plain-text coaching critique and schema-constrained JSON containing timestamps for four swing or movement moments. The SDK accepts video bytes directly and handles base64 encoding; its text convenience method joins text parts from the first candidate while skipping parts marked as thinking. The excerpt says the client can read an API key from an environment variable or receive one explicitly, and that the tool passes a request timeout. It also notes that adding the SDK removes the module's separate HTTP client and mirrored request/response data classes. The excerpt cuts off during the structured-output explanation, so further implementation details are unavailable.

## Source excerpt

Google have just released version 1.0 of the Gen AI SDK for Kotlin, an idiomatic Kotlin client for the Gemini APIs. Up to now, calling Gemini from Kotlin has generally meant use of one of the Firebase SDKs, a community wrapper, an agent framework like Koog, or (as in the code below) just talking to the REST endpoint yourself. This is Google's own Kotlin library for it, built around coroutines and Flow.