{"repo":"aallam/openai-kotlin","free":true,"listed":false,"github":"https://github.com/aallam/openai-kotlin","clone":"git clone https://github.com/aallam/openai-kotlin.git","description":"OpenAI API client for Kotlin with multiplatform and coroutines capabilities.","language":"Kotlin","stars":1840,"topics":["openai","kotlin","client","multiplatform","coroutines","api","chatgpt","dall-e","llm","whisper"],"license":"MIT","category":"ai-agents","readme_excerpt":"OpenAI API client for Kotlin Kotlin client for OpenAI's API with multiplatform and coroutines capabilities. 📦 Setup 1. Install OpenAI API Kotlin client by adding the following dependency to your build.gradle file: 2. Choose and add to your dependencies one of Ktor's engines. BOM Alternatively, you can use openai-client-bom by adding the following dependency to your build.gradle file Multiplatform In multiplatform projects, add openai client dependency to commonMain , and choose an engine for each target. Maven Gradle is required for multiplatform support, but there's nothing stopping you from using the jvm client in a Maven project. You still need to add to your dependencies one of Ktor's engines. Setup the client with maven The BOM is not supported for Maven projects. ⚡️ Getting Started [!NOTE] OpenAI encourages using environment variables for the API key. Read more. Create an instance of OpenAI client: Or you can create an instance of OpenAI using a pre-configured OpenAIConfig : Use your OpenAI instance to make API requests. Learn more. Supported features - Responses - Models - Chat - Images - Embeddings - Files - Fine-tuning - Moderations - Audio - Batch Beta - Assistants - Threads - Messages - Runs - Vector Stores Deprecated - Completions - Fine-tunes - Edits Looking for a tokenizer? Try ktoken, a Kotlin library for tokenizing text. 📚 Guides Get started and understand more about how to use OpenAI API client for Kotlin with these guides: - Getting Started - Chat & Tool C","default_branch":null,"files":null,"tree":[],"storefront":"/r/aallam","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aallam/openai-kotlin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}