aallam

aallam/openai-kotlin

Kotlin MIT AI & ML Single maintainer risk

OpenAI API client for Kotlin with multiplatform and coroutines capabilities.

1.8k stars
234 forks
slow
GitHub +1 / week

1.8k

Stars

234

Forks

81

Open issues

30

Contributors

4.1.0 07 Feb 2026

AI Analysis

OpenAI API client for Kotlin with native multiplatform and coroutines support, enabling seamless integration of OpenAI services (Chat, Images, Embeddings, Audio, etc.) into Kotlin applications. This library is specifically built for Kotlin developers and JVM ecosystem projects, offering type-safe async APIs—it is not a general-purpose HTTP client but a specialized wrapper for OpenAI's API.

AI & ML Library Discovery value: 5/10
Documentation 8/10
Activity 6/10
Community 8/10
Code quality 6/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

openai-integration kotlin-client multiplatform coroutines llm-api
MIT licensed Well documented Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
1w ago

Kotlin OpenAI client with multiplatform support and coroutines, actively maintained but narrowly adopted.

openai-kotlin is a Kotlin-native HTTP client for the OpenAI API, designed for multiplatform projects (JVM, JS, WASM, native) and built on Ktor and coroutines. It covers most of OpenAI's API surface including chat, embeddings, assistants, and batch operations. Adoption appears concentrated in Kotlin-heavy organizations and Android projects. The project is actively maintained (last push Feb 2026) but shows modest, stable usage metrics. It serves a legitimate niche: developers who want idiomatic Kotlin integration without wrapping a generic Java or Python client.

Origin

Created March 2021, the project emerged as OpenAI's API matured. It predates the official OpenAI Java client (openai/openai-java, 1484 stars) by tracking OpenAI's evolving API spec. The library has remained consistently updated to cover new OpenAI features (Assistants, Vector Stores, Batch) within weeks or months of OpenAI releases, suggesting responsive maintenance.

Growth

Star count has stabilized around 1,836 with minimal recent momentum (0 stars in last 7 days as of July 2026). Growth appears to have plateaued after initial adoption phase. This reflects not abandonment but likely saturation of the Kotlin developer subset willing to use third-party OpenAI clients. The library maintains steady incremental improvements (version 4.1.0 shown in README) and tracks OpenAI API additions promptly, indicating active curation rather than growth phase.

In production

Adoption not verified beyond inference from star count and fork activity (234 forks). No public case studies, enterprise customers, or user testimonials evident in README. The presence of ProGuard/R8 rules and Android-specific considerations suggests some Android adoption, but scale is unknown. Maven Central publication and BOM availability indicate production-grade packaging, but real-world user count is undocumented.

Code analysis
Architecture

Based on README: multiplatform Kotlin using Ktor HTTP client (with pluggable engines), coroutines for async operations, and kotlinx.serialization for JSON. Likely uses expect/actual pattern for multiplatform code separation. Appears to follow standard API wrapper conventions: configuration objects (OpenAIConfig), DSL-style client setup, and method-per-endpoint patterns.

Tests

README documents live integration tests (opt-in via OPENAI_LIVE_TESTS env var and OPENAI_API_KEY) covering billable API calls. Mentions offline unit tests and API surface checks (apiCheck tasks). Specific coverage percentage not documented in README.

Maintenance

Last push 2026-02-07 (5 months prior to evaluation date 2026-07-02) indicates recent activity. Repository documents ProGuard/R8 rules for Android, maintains BOM for dependency management, and provides sample apps. README references troubleshooting guide and multiple feature guides, suggesting ongoing documentation effort. No evidence of stale issues or pull request backlog in available metadata.

Honest verdict

ADOPT IF: you are building Kotlin applications (especially multiplatform or Android) and want idiomatic coroutines-based OpenAI API integration with minimal wrapping. AVOID IF: you need a client with large production community, abundant third-party tooling, or broad language ecosystem. MONITOR IF: you are a Kotlin shop evaluating long-term maintenance risk — project is stable now but growth is flat, and dependency on Ktor/coroutines ecosystem could create maintenance burden if those libraries shift direction.

Independent dimensions

Mainstream potential

3/10

Technical importance

6/10

Adoption evidence

3/10

Risks
  • Adoption concentration: appears limited to Kotlin developer subset; small user base means fewer community contributions and bug reports.
  • Maintenance dependency: relies on Ktor and kotlinx.coroutines; breaking changes in those libraries could require reactive updates.
  • No official OpenAI backing: third-party client; if OpenAI's API changes unexpectedly, updates depend on maintainer response time.
  • Language-tier niche: Kotlin's market share remains ~2-5% of JVM ecosystem; long-term project relevance tied to Kotlin adoption trajectory.
  • Multiplatform complexity: supporting JVM, JS, WASM, and native increases maintenance surface; bugs may be platform-specific and hard to diagnose.
Prediction

Project likely continues as a stable, slowly-growing Kotlin-community resource. Adoption will remain concentrated in Kotlin/Android shops and multiplatform projects. Maintenance appears sustainable at current pace (quarterly feature additions, reactive API updates). Unlikely to expand beyond Kotlin ecosystem or challenge openai/openai-java in broader JVM adoption.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Kotlin
100%

Information

Language
Kotlin
License
MIT
Last updated
5mo ago
Created
65mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

openai

openai/openai-java

The official OpenAI Java SDK provides programmatic access to the OpenAI REST...

1.5k Kotlin AI & ML
64bit

64bit/async-openai

async-openai is an unofficial Rust async library providing ergonomic bindings...

2k Rust AI & ML
sashabaranov

sashabaranov/go-openai

An unofficial Go client library for OpenAI's APIs, including ChatGPT, GPT-4,...

10.7k Go AI & ML
apollographql

apollographql/apollo-kotlin

Apollo Kotlin is a strongly-typed GraphQL client for the JVM, Android, and...

4k Kotlin Mobile
Kotlin

Kotlin/kotlinx.coroutines

kotlinx.coroutines is the official Kotlin library providing structured...

13.8k Kotlin
vs. alternatives
openai/openai-java

Official OpenAI Java client (1,484 stars). Likely less idiomatic for Kotlin projects; no coroutines support in README. openai-kotlin trades broader Java ecosystem compatibility for Kotlin-native design and multiplatform reach.

sashabaranov/go-openai

Go client (10,699 stars). Different language ecosystem entirely; higher adoption reflects Go's popularity, not openai-kotlin's competitive weakness. Indicates language-specific client ecosystems are fragmented.

64bit/async-openai

Rust async client (1,953 stars). Similar adoption tier to openai-kotlin; both are language-specific wrappers serving niche developer communities. openai-kotlin's multiplatform feature is unique among these peers.

Kotlin/kotlinx.coroutines

Core Kotlin async runtime (13,777 stars). Not a direct competitor but a dependency and design inspiration. openai-kotlin's architecture closely mirrors coroutines patterns.