The Supertext SDKs so far covered TypeScript, PHP, Python, .NET and Java. Kotlin developers could use the Java SDK, but it reads like Java. Now Kotlin has its own SDK.
Written for Kotlin
- Named and default arguments instead of a builder:
SupertextClient(apiKey, userAgent = "MyApp/1.0") kotlin.time.Durationfor timings, such as the poll interval- Properties and data classes:
e.code,check.status,Segment,TargetLanguage - Nullable types where a value can be missing
A quick look
val client = SupertextClient(System.getenv("SUPERTEXT_API_KEY"))
val german = client.translateTexts(
mapOf("title" to Segment.text("Hello & welcome"), "body" to Segment.html("<p>Our <b>new</b> shop opens on Monday.</p>")),
targetLang = "de-CH",
sourceLang = "en",
)
The calls block; from coroutines, run them on an IO dispatcher.
Same features as the others
Like all Supertext SDKs, it handles the upload format, language codes, rate limits, polling and cleaning up, and it reads and writes XLIFF and HTML translation files. It passes the same test vectors as the other five. The only dependency is the Kotlin standard library; it runs on Java 11 or later and is tested on Java 11, 17, 21 and 25.
Getting it
The Maven package is com.supertext:supertext-sdk-kotlin. It isn't on Maven Central yet: build it from the repository, or take the jar from the next release. You need a Supertext account and an API key.

