Skip to content
🤔 Documentation issue? Report or edit



(You can also look how it’s done in the examples)

Gradle Plugins

You need to add KSP and the Ktorfit Gradle plugin

plugins {
  id("") version "CURRENT_KSP_VERSION"
  id("de.jensklingenberg.ktorfit") version "2.0.0"


Add the Ktorfit-lib to your common module. You can find all available versions here

val ktorfitVersion = "2.0.0"

sourceSets {
    val commonMain by getting{

You can also use “de.jensklingenberg.ktorfit:ktorfit-lib-light” this will only add the Ktor client core dependency and not the platform dependencies for the clients. This will give you more control over the used clients, but you have to add them yourself. Everything else is the same as “ktorfit-lib”


Ktorfit is based on Ktor clients 2.3.11. You don’t need to add an extra dependency for the default clients. When you want to use Ktor plugins for things like serialization, you need to add the dependencies, and they need to be compatible with 2.3.11

Last update: May 26, 2024