finds.dev

aallam/openai-kotlin

OpenAI API client for Kotlin with multiplatform and coroutines capabilities.

View on GitHub

★ 1,851KotlinMITupdated Feb 2026

// the take

A Kotlin client for the OpenAI API built on Ktor, with full Kotlin Multiplatform support (JVM, JS, Wasm, Native) and a coroutines-first API. It's for Kotlin/KMP developers who want OpenAI access in shared code across Android, iOS, desktop and web, not just a JVM-only wrapper.

Genuinely multiplatform rather than JVM-with-a-multiplatform-label — Ktor's engine abstraction means you plug in whatever HTTP client fits each target. API coverage is wide: chat, responses, assistants/threads/runs, vector stores, batch, audio, embeddings, fine-tuning. It tracks binary compatibility via a checked-in API dump (openai-client.api) across releases, which is a real signal of API stability discipline for a library people pin version ranges against. Ships on Maven Central with a BOM for dependency alignment and bundled ProGuard/R8 rules.

Single-maintainer, explicitly unofficial and unaffiliated with OpenAI — anyone depending on it for production LLM access is taking on bus-factor risk for something sitting on their API key path. The API surface still carries deprecated endpoints (Completions, Edits, Fine-tunes) alongside current ones, so you have to know what to avoid rather than the library steering you away from them. No built-in retry/backoff or rate-limit handling beyond a configurable socket timeout — production hardening against OpenAI's 429s is left entirely to the caller. Meaningful test coverage requires live, billable API calls (OPENAI_LIVE_TESTS=1), so the default offline test run doesn't actually exercise real request/response behavior against the API.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,851
Forks
238
Language
Kotlin
License
MIT
Last commit
7 Feb 2026

// nearby

If openai-kotlin isn't quite it.

All repos →