Lambdua/openai4j
Java client library for OpenAI API.Full support for all OpenAI API models including Completions, Chat, Edits, Embeddings, Audio, Files, Assistants-v2, Images, Moderations, Batch, and Fine-tuning.
Built on Retrofit and OkHttpClient, the library offers both synchronous and asynchronous streaming APIs, with vision capabilities for image analysis and tool/function calling support. It's structured as modular Maven artifacts—separating POJOs (api module) from service implementations—allowing developers to either use the full OpenAiService or build custom clients with standardized domain objects. The client handles environment variable configuration, connection pooling, and customizable interceptors for retry logic and load balancing.
403 stars. No commits in the last 6 months.
Stars
403
Forks
54
Language
Java
License
MIT
Category
Last pushed
Jun 07, 2025
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/Lambdua/openai4j"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Compare
Higher-rated alternatives
taishan666/MaxKB4j
MaxKB4j is an open-source LLMOps platform for LLM workflow applications and RAG developed based...
cequence-io/openai-scala-client
Scala client for OpenAI API and other major LLM providers
ai-for-java/openai4j
Java client library for OpenAI API
sashirestela/simple-openai
A Java library to use the OpenAI Api in the simplest possible way.
devlive-community/openai-java-sdk
Provides an easy-to-use SDK for Java developers to interact with the APIs of open AI models.