# TheoKanning/openai-java

OpenAI Api Client in Java

Repository: https://github.com/TheoKanning/openai-java
Canonical: https://ross.abutalabs.com/products/openai-java
Language: Java
License: MIT
License Family: permissive
Topics: java, gpt3, openai
Archived: true
Last push: 2024-06-06T20:00:23+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2178, "days_push": 818, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4729, forks 1178 (observed 2026-08-28T04:08:57.645670+00:00)

## What it is
A Java client library for the OpenAI API, providing POJOs, a Retrofit-based client, and a convenience service class for GPT-3, ChatGPT, and GPT-4 endpoints. The project was archived on June 6, 2024 and is no longer maintained.

## Use cases
- call the OpenAI chat completions API from Java
- generate GPT-3 completions in a JVM application
- create embeddings for text using OpenAI from Java
- transcribe audio with Whisper via the OpenAI API
- build a chatbot in Java using GPT-4
- moderate content with the OpenAI moderation endpoint

## When to choose
- you need a simple, lightweight Java wrapper for OpenAI APIs and are okay maintaining it yourself
- you want POJOs only to build your own OpenAI client
- your project already uses Retrofit and you want a familiar client style

## When to avoid
- you need ongoing updates for new OpenAI models and endpoints, since the repo is archived
- starting a new project where an actively maintained Java OpenAI SDK is available
- you need official support or bug fixes

## Facets
- artifact type: library
- maturity: abandoned
- function: http-client, sdk, llm-inference, chatbot
- domain: large-language-models, artificial-intelligence, developer-tools, apis
- platform: jvm, cross-platform
- tags: openai, gpt-3, gpt-4, chatgpt, retrofit, archived

## Member repositories
- TheoKanning/openai-java (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:57.645670+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:01.940970+00:00, confidence not recorded.
  - readme: https://github.com/TheoKanning/openai-java (fetched 2026-08-28T04:08:57.645670+00:00, sha 16c07912635d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
