# Retrofit

> A type-safe HTTP client for Android and Java

Source: https://talira.ai/catalog/retrofit-q4egfen2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / http clients](https://talira.ai/categories/libraries/http-clients), [languages / java](https://talira.ai/categories/languages/java)
- Platforms: android[^1]
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^3]
- Plugins: yes[^4]
- Creator: Square

Retrofit turns an HTTP API into a Java or [Kotlin](https://talira.ai/catalog/kotlin-vrmcrayv.md) interface: annotations on each method describe the request (method, path and query parameters, headers, form-encoded or multipart bodies), and Retrofit generates the implementation. Calls run synchronously or asynchronously, and Kotlin `suspend` functions can return the body or a `Response` directly. Converter modules serialize bodies with Gson, Jackson, Moshi, Protobuf, Wire, Simple XML, JAXB or kotlinx.serialization, and call adapters return RxJava, Guava or Java 8 types. It runs on OkHttp, needs Java 8+ or Android API 21+, and is Apache-2.0 licensed. Square created it; since 2026 it lives under lysine.dev, a member of the Commonhaus Foundation, with OkHttp and Okio.

## Links

- Website: https://lysine.dev/retrofit/
- GitHub: https://github.com/lysine-dev/retrofit
- Docs: https://lysine.dev/retrofit/declarations/

## Problems it solves

- call a REST API from my Android app without hand-writing HTTP request code
- describe API endpoints as a Java or Kotlin interface and get a working client
- parse JSON responses into Kotlin or Java objects automatically
- call a REST API from Kotlin coroutines with suspend functions
- upload files with multipart requests from Android
- add an auth header to every request in my Android networking layer
- return RxJava observables from my API client calls
- mock a REST API in tests of my Android app

## Features

- annotations for request method, URL path and query parameters, headers and bodies
- form-encoded and multipart requests, including file upload
- synchronous and asynchronous calls
- Kotlin suspend functions returning the body or a Response
- converters for Gson, Jackson, Moshi, Protobuf, Wire, Simple XML, JAXB and kotlinx.serialization
- call adapters for RxJava 1-3, Guava, Java 8 and Scala futures
- retrofit-mock module for tests
- R8 shrinking rules included

## Capabilities

- Takes plugins: plan not known

## Trust

Overall: 0.28 out of 1.
Signals: backing 0.20, extensibility 0.20.

- created by Square
- has a plugin system

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [RxJava](https://talira.ai/catalog/rxjava-851pxpy5.md)
- Based on [OkHttp](https://talira.ai/catalog/okhttp-5e4hqag3.md)

## Alternatives

- [Ktor](https://talira.ai/catalog/ktor-xe69h8gc.md): Build asynchronous servers and clients in Kotlin
- [OkHttp](https://talira.ai/catalog/okhttp-5e4hqag3.md): A meticulous HTTP client for the JVM, Android, and GraalVM

## Sources

[^1]: https://github.com/lysine-dev/retrofit (checked 24 Nov 2026)
[^2]: https://github.com/lysine-dev/retrofit/blob/trunk/LICENSE.txt (checked 24 Nov 2026)
[^3]: https://lysine.dev/retrofit/ (checked 24 Nov 2026)
[^4]: https://lysine.dev/retrofit/configuration/ (checked 24 Nov 2026)
