# PlexPt/chatgpt-java

ChatGPT Java SDK。支持 GPT-4o、 GPT-5 API。开箱即用。An unofficial Java SDK for seamless integration with ChatGPT's GPT-5 and GPT-4 APIs. Ready-to-use, simple setup, and efficient for building AI-powered applications.

Repository: https://github.com/PlexPt/chatgpt-java
Canonical: https://ross.abutalabs.com/products/chatgpt-java
Homepage: https://chat.plexpt.com/
Language: Java
License: GPL-3.0
License Family: copyleft
Topics: chatgpt, chatgpt-api, chatgpt-api-wrapper, chatgpt-sdk, chatgpt-bot, gpt4, chatgpt3, chatgpt4, java
Last push: 2025-11-29T16:41:52+00:00

## Health v2 (maintenance only)
Score: 46/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 54, release rhythm 8, longevity 97
- inputs: {"age_days": 1365, "days_push": 277, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3579, forks 686 (observed 2026-08-28T04:08:10.912133+00:00)

## What it is
An unofficial Java SDK that wraps OpenAI's ChatGPT API for GPT-3.5, GPT-4, GPT-4o, and GPT-5 models, published on Maven Central with a fluent builder interface. It supports streaming chat, function calling, conversation context, token counting, multi-key rotation, and HTTP/SOCKS5 proxy plus reverse-proxy configuration.

## Use cases
- call the OpenAI API from a Java application
- integrate ChatGPT into a Spring Boot backend
- stream GPT-4 chat responses in Java
- rotate multiple OpenAI API keys across requests
- access the OpenAI API from China through a proxy or reverse proxy
- count ChatGPT tokens before sending requests
- use GPT function calling from JVM code

## When to choose
- You are building a Java/JVM application that needs ChatGPT or GPT-4/4o/5 API access with minimal setup
- You want a batteries-included client with streaming, context, function calling, and multi-key rotation out of the box
- You need proxy or reverse-proxy support to reach the OpenAI API from mainland China

## When to avoid
- Your project cannot accept GPL-3.0 licensing terms
- You require an officially supported OpenAI SDK with guaranteed coverage of new API features
- You are not on the JVM (e.g., Python, Node.js, Go projects)
- You need local model inference instead of calls to OpenAI's hosted API

## Facets
- artifact type: library
- maturity: active
- function: sdk, llm-inference, http-client, chatbot
- domain: artificial-intelligence, large-language-models, chatbots, developer-tools
- platform: jvm
- tags: chatgpt, openai, gpt-4, gpt-4o, gpt-5, api-client, streaming-chat, function-calling, token-counting, api-key-rotation, proxy-support, maven, gradle, spring-boot

## Member repositories
- PlexPt/chatgpt-java (main) score 46

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:10.912133+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:34:00.459615+00:00, confidence not recorded.
  - readme: https://github.com/PlexPt/chatgpt-java (fetched 2026-08-28T04:08:10.912133+00:00, sha 9e7e7f1c6c77)
  - homepage: https://chat.plexpt.com/ (fetched 2026-08-29T09:27:32.330785+00:00, sha 4f196be5942c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
