Discover and explore top open-source AI tools and projects—updated daily.
Kotlin client for OpenAI API
Top 24.3% on SourcePulse
This project provides a Kotlin client for the OpenAI API, targeting Kotlin developers who need to integrate with OpenAI's services. It offers multiplatform support and leverages Kotlin coroutines for asynchronous operations, simplifying the development of AI-powered applications in Kotlin.
How It Works
The client is built on top of Ktor, a Kotlin multiplatform asynchronous framework for creating connected applications. This choice allows for efficient, non-blocking network requests and seamless integration across different platforms (JVM, JS, Native). The library exposes a fluent Kotlin API that maps directly to OpenAI's REST endpoints, abstracting away the complexities of HTTP requests and JSON serialization.
Quick Start & Requirements
com.aallam.openai:openai-client:4.0.1
to your build.gradle
file.ktor-client-okhttp
). For multiplatform projects, specify the engine for each target.OpenAI
client with an API key.Highlighted Details
Maintenance & Community
The project is actively maintained by aallam. Contributions are welcome via pull requests and issue reporting.
Licensing & Compatibility
Limitations & Caveats
This is an unofficial library and is not affiliated with or endorsed by OpenAI. Some beta features of the OpenAI API might not be immediately supported.
4 months ago
Inactive