# openai/openai-java

The official Java library for the OpenAI API

Repository: https://github.com/openai/openai-java
Canonical: https://ross.abutalabs.com/products/openai-openai-java
Language: Kotlin
License: Apache-2.0
License Family: permissive
Last push: 2026-08-26T05:11:40+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 47
- inputs: {"age_days": 671, "days_push": 7, "days_rel": 7, "gap_med": 1.0, "n_releases_24m": 211}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1515, forks 253 (observed 2026-08-28T04:04:56.506268+00:00)

## What it is
The official Java SDK for accessing the OpenAI REST API, written in Kotlin and published to Maven Central. It provides typed clients for the Responses API, Chat Completions, and other OpenAI services from Java 8+ applications.

## Use cases
- call the openai api from java
- generate text with gpt models in a jvm app
- integrate chat completions into a spring service
- use openai responses api from kotlin
- add llm features to a java backend
- stream openai model responses in java

## When to choose
- you need official, well-maintained OpenAI API access on the JVM
- you want typed request/response models instead of hand-rolled HTTP calls
- your project targets Java 8+ with Maven or Gradle

## When to avoid
- you use a non-OpenAI LLM provider
- you need a language other than Java/Kotlin on the JVM
- you want an unofficial lightweight wrapper with fewer abstractions

## Facets
- artifact type: library
- maturity: active
- function: sdk, http-client, llm-inference, chatbot
- domain: artificial-intelligence, large-language-models, developer-tools, apis
- platform: jvm, cross-platform
- tags: openai, gpt, official-sdk, rest-api, okhttp, maven, gradle

## Member repositories
- openai/openai-java (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:56.506268+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-30T04:32:10.186937+00:00, confidence not recorded.
  - readme: https://github.com/openai/openai-java (fetched 2026-08-28T04:04:56.506268+00:00, sha edc6f6cdafb4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
