OpenAI API client for Kotlin with multiplatform and coroutines capabilities.
1.8k
Stars
234
Forks
81
Open issues
30
Contributors
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.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
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.
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.
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.
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.
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.
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.
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.
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
- 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.
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.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- Kotlin
- License
- MIT
- Last updated
- 5mo ago
- Created
- 65mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Flow invariant is violated: with Ktor: 3.5.1
[Feature Request] Streaming support in Responses API
[Feature Request] DeepSeek Thinking Mode Toggle
Incompatible with ktor 3.4.0
401 Response Clears Access Token
Top contributors
Recent releases
Similar repos
sashabaranov/go-openai
An unofficial Go client library for OpenAI's APIs, including ChatGPT, GPT-4,...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.8k | +1 | Kotlin | 8/10 | 5mo ago |
|
|
1.5k | — | Kotlin | 8/10 | 18h ago |
|
|
2k | — | Rust | 8/10 | 3w ago |
|
|
10.7k | — | Go | 8/10 | 9mo ago |
|
|
4k | — | Kotlin | 8/10 | 10h ago |
|
|
13.8k | — | Kotlin | 9/10 | 3w ago |
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.
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.
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.
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.