
OpenAI-compatible SDK offering chat completions (streaming and non-streaming), text embeddings, model browsing across 40+ models, SSE streaming, thread-safe singleton, and API-key redaction.
Kotlin Multiplatform SDK for the Sumopod AI API
OpenAI-compatible with 40+ models across multiple providers
| Kotlin DSL | Groovy |
implementation("com.cikup.sumopod.ai:sumopod-ai-sdk:0.1.1") |
implementation 'com.cikup.sumopod.ai:sumopod-ai-sdk:0.1.1' |
Kotlin Multiplatform:
commonMain.dependencies {
implementation("com.cikup.sumopod.ai:sumopod-ai-sdk:0.1.1")
}| Feature | Description |
|---|---|
| Chat Completions | Streaming and non-streaming responses |
| Embeddings | Text embedding generation |
| Model Listing | Browse 40+ available models |
| Multiplatform | Android, iOS, and JVM from a single codebase |
| Streaming | SSE streaming via Kotlin Flow with collectContent()
|
| Thread-Safe |
Sumopod singleton with @Volatile fields |
| Secure | API key redaction, HTTPS-only, input validation |
| Tested | 173 automated tests across all platforms |
Sumopod.init("sk-your-api-key")
// Or with custom config
Sumopod.init("sk-your-api-key") {
baseUrl = "https://ai.sumopod.com/v1"
timeout { connect = 15_000; request = 120_000 }
logLevel = SumopodConfig.LogLevel.HEADERS
}val response = Sumopod.chatCompletion(
ChatCompletionRequest(
model = "gpt-4o-mini",
messages = listOf(
ChatMessage(role = ChatRole.User, content = "Hello!")
),
maxTokens = 150,
)
)
println(response.choices.first().message.content)Sumopod.chatCompletionStream(request).collect { chunk ->
print(chunk.choices.firstOrNull()?.delta?.content.orEmpty())
}
// Or collect all at once
val fullText = Sumopod.chatCompletionStream(request).collectContent()val response = Sumopod.chat(
"gpt-4o-mini",
ChatRole.User to "What is Kotlin Multiplatform?",
maxTokens = 200,
)val response = Sumopod.embeddings(
EmbeddingRequest(model = "text-embedding-3-small", input = "Hello world")
)val models = Sumopod.models()
models.data.forEach { println(it.id) }Sumopod.close()40+ models across providers. See the full list at Sumopod Models.
| Provider | Models |
|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, gpt-4.1, gpt-5, gpt-5.1, gpt-5.2 |
| Anthropic | claude-haiku-4-5 |
| gemini-2.0-flash, gemini-2.5-flash, gemini-2.5-pro, gemini-3-flash | |
| BytePlus | deepseek-r1, deepseek-v3-2, seed-2-0-pro, kimi-k2 |
| Z.AI | glm-5, glm-5-code, glm-5-turbo, glm-5.1 |
| Platform | Engine | Min Version |
|---|---|---|
| Android | OkHttp | API 24 |
| iOS | Darwin (NSURLSession) | iOS 13 |
| JVM | CIO | Java 11 |
Compose Multiplatform demo with Chat, Models, and Settings screens.
./gradlew :sample:run # Desktop
./gradlew :sample:assembleDebug # Android
open sample/iosApp/iosApp.xcodeproj # iOS (Xcode)http:// URLs rejected)SumopodConfig.toString() redacts API key@Volatile fields173 automated tests across 5 test suites:
./gradlew :library:jvmTest # 37 tests
./gradlew :library:testAndroidHostTest # 62 tests
./gradlew :library:iosSimulatorArm64Test # 37 tests
./gradlew :sample:testDebugUnitTest # 22 tests
./gradlew :sample:desktopTest # 15 Compose UI tests| Library | Version |
|---|---|
| Kotlin | 2.2.20 |
| Ktor | 3.3.1 |
| kotlinx.serialization | 1.9.0 |
| kotlinx.coroutines | 1.10.2 |
| Compose Multiplatform | 1.10.3 |
Copyright 2026 Cikup
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Kotlin Multiplatform SDK for the Sumopod AI API
OpenAI-compatible with 40+ models across multiple providers
| Kotlin DSL | Groovy |
implementation("com.cikup.sumopod.ai:sumopod-ai-sdk:0.1.1") |
implementation 'com.cikup.sumopod.ai:sumopod-ai-sdk:0.1.1' |
Kotlin Multiplatform:
commonMain.dependencies {
implementation("com.cikup.sumopod.ai:sumopod-ai-sdk:0.1.1")
}| Feature | Description |
|---|---|
| Chat Completions | Streaming and non-streaming responses |
| Embeddings | Text embedding generation |
| Model Listing | Browse 40+ available models |
| Multiplatform | Android, iOS, and JVM from a single codebase |
| Streaming | SSE streaming via Kotlin Flow with collectContent()
|
| Thread-Safe |
Sumopod singleton with @Volatile fields |
| Secure | API key redaction, HTTPS-only, input validation |
| Tested | 173 automated tests across all platforms |
Sumopod.init("sk-your-api-key")
// Or with custom config
Sumopod.init("sk-your-api-key") {
baseUrl = "https://ai.sumopod.com/v1"
timeout { connect = 15_000; request = 120_000 }
logLevel = SumopodConfig.LogLevel.HEADERS
}val response = Sumopod.chatCompletion(
ChatCompletionRequest(
model = "gpt-4o-mini",
messages = listOf(
ChatMessage(role = ChatRole.User, content = "Hello!")
),
maxTokens = 150,
)
)
println(response.choices.first().message.content)Sumopod.chatCompletionStream(request).collect { chunk ->
print(chunk.choices.firstOrNull()?.delta?.content.orEmpty())
}
// Or collect all at once
val fullText = Sumopod.chatCompletionStream(request).collectContent()val response = Sumopod.chat(
"gpt-4o-mini",
ChatRole.User to "What is Kotlin Multiplatform?",
maxTokens = 200,
)val response = Sumopod.embeddings(
EmbeddingRequest(model = "text-embedding-3-small", input = "Hello world")
)val models = Sumopod.models()
models.data.forEach { println(it.id) }Sumopod.close()40+ models across providers. See the full list at Sumopod Models.
| Provider | Models |
|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, gpt-4.1, gpt-5, gpt-5.1, gpt-5.2 |
| Anthropic | claude-haiku-4-5 |
| gemini-2.0-flash, gemini-2.5-flash, gemini-2.5-pro, gemini-3-flash | |
| BytePlus | deepseek-r1, deepseek-v3-2, seed-2-0-pro, kimi-k2 |
| Z.AI | glm-5, glm-5-code, glm-5-turbo, glm-5.1 |
| Platform | Engine | Min Version |
|---|---|---|
| Android | OkHttp | API 24 |
| iOS | Darwin (NSURLSession) | iOS 13 |
| JVM | CIO | Java 11 |
Compose Multiplatform demo with Chat, Models, and Settings screens.
./gradlew :sample:run # Desktop
./gradlew :sample:assembleDebug # Android
open sample/iosApp/iosApp.xcodeproj # iOS (Xcode)http:// URLs rejected)SumopodConfig.toString() redacts API key@Volatile fields173 automated tests across 5 test suites:
./gradlew :library:jvmTest # 37 tests
./gradlew :library:testAndroidHostTest # 62 tests
./gradlew :library:iosSimulatorArm64Test # 37 tests
./gradlew :sample:testDebugUnitTest # 22 tests
./gradlew :sample:desktopTest # 15 Compose UI tests| Library | Version |
|---|---|
| Kotlin | 2.2.20 |
| Ktor | 3.3.1 |
| kotlinx.serialization | 1.9.0 |
| kotlinx.coroutines | 1.10.2 |
| Compose Multiplatform | 1.10.3 |
Copyright 2026 Cikup
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0