Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Java SDKs - 19 providers checked

Official Java SDKs for AI APIs

6 of 19 AI API providers ship an official Java SDK: Anthropic, Google, Cohere, Amazon Bedrock, Z.ai and Alibaba Cloud Model Studio. OpenAI also ships one but labels it beta. 1 provider points to the OpenAI SDK instead. 1 provider links a community library, which is not official. 2 providers' docs list no Java SDK.

Verified against each provider's own SDK docs and package registry pages. Status labels are the provider's own; no version numbers are recorded.

Compare every language in the provider by language grid.

Official
6
Beta
1
OpenAI SDK
1
Community
1
Official
the provider's own SDK.
Beta
the provider's own SDK, which it labels beta (Fireworks AI says alpha).
OpenAI SDK
the provider's docs point to the OpenAI SDK for this language.
Community
a library the provider's docs link but do not ship. Not official.
None
the provider's SDK docs list no SDK for this language.
-
Not recorded: no entry in the data for this language.

Official SDKs7

Providers that ship their own Java SDK, including those they label beta.

OpenAI

Official, labelled beta
Package
com.openai:openai-java
Install
Install
<dependency>
  <groupId>com.openai</groupId>
  <artifactId>openai-java</artifactId>
  <version>VERSION</version>
</dependency>

VERSION stands for the version the docs pin. Pin the current release from the package registry.

Repo
github.com/openai/openai-java
Docs
developers.openai.com/api/docs/libraries
Notes
Maven snippet verbatim except the pinned version, replaced with VERSION.

From the docs

OpenAI provides an API helper for the Java programming language, currently in beta.
developers.openai.com/api/docs/libraries
All OpenAI SDKs

Anthropic

Official SDK
Package
com.anthropic:anthropic-java
Install
Install
implementation("com.anthropic:anthropic-java:VERSION")

VERSION stands for the version the docs pin. Pin the current release from the package registry.

Repo
github.com/anthropics/anthropic-sdk-java
Docs
platform.claude.com/docs/en/cli-sdks-libraries/sdks/java
Notes
Gradle line verbatim except the pinned version, replaced with VERSION; a Maven tab is also given (groupId com.anthropic, artifactId anthropic-java).

From the docs

Anthropic provides three kinds of official tooling for building with the Claude API ... Client SDKs: General-purpose Messages API clients for Python, TypeScript, C#, Go, Java, PHP, and Ruby.
platform.claude.com/docs/en/cli-sdks-libraries/overview
All Anthropic SDKs

Google

Official SDK
Package
com.google.genai:google-genai
Install
Install
<dependencies>
  <dependency>
    <groupId>com.google.genai</groupId>
    <artifactId>google-genai</artifactId>
    <version>VERSION</version>
  </dependency>
</dependencies>

VERSION stands for the version the docs pin. Pin the current release from the package registry.

Repo
github.com/googleapis/java-genai
Docs
ai.google.dev/gemini-api/docs/libraries
Notes
Maven snippet verbatim except the pinned version, replaced with VERSION (the two Google pages pin different versions).

From the docs

When building with the Gemini API, we recommend using the Google GenAI SDK. These are the official, production-ready libraries that we develop and maintain for the most popular languages.
ai.google.dev/gemini-api/docs/librariesdocs.cloud.google.com/gemini-enterprise-agent-platform/models/sdks/overview
All Google SDKs

Amazon Bedrock

Official SDK
Package
software.amazon.awssdk:bedrockruntime
Install
See docs
Repo
github.com/aws/aws-sdk-java-v2
Docs
docs.aws.amazon.com/sdk-for-java

From the docs

AWS software development kits (SDKs) are available for many popular programming languages. Each SDK provides an API, code examples, and documentation that make it easier for developers to build applications in their preferred language.
docs.aws.amazon.com/bedrock/latest/userguide/sdk-general-information-section.htmlrepo1.maven.org/maven2/software/amazon/awssdk/bedrockruntime
All Amazon Bedrock SDKs

Z.ai

Official SDK
Package
ai.z.openapi:zai-sdk
Install
Install
implementation 'ai.z.openapi:zai-sdk:VERSION'

VERSION stands for the version the docs pin. Pin the current release from the package registry.

Repo
github.com/zai-org/z-ai-sdk-java
Docs
docs.z.ai/guides/develop/java/introduction
Notes
Gradle line verbatim except the pinned version, replaced with VERSION; a Maven block is also given.

From the docs

Z.AI Java SDK is the official Java development toolkit provided by Z.AI, offering Java developers convenient and efficient AI model integration solutions.
docs.z.ai/guides/develop/java/introduction
All Z.ai SDKs

Alibaba Cloud Model Studio

Official SDK
Package
com.alibaba:dashscope-sdk-java
Install
Install
dependencies {
    implementation group: 'com.alibaba', name: 'dashscope-sdk-java', version: 'the-latest-version'
}
Docs
www.alibabacloud.com/help/en/model-studio/install-sdk
Notes
No repo linked; the docs link the Maven repository page. The OpenAI Java SDK is the documented alternative.

From the docs

Model Studio provides official DashScope SDKs (Python, Java) and supports OpenAI SDKs (Python, Node.js, Java, Go) for OpenAI-compatible API calls.
www.alibabacloud.com/help/en/model-studio/install-sdk
All Alibaba Cloud Model Studio SDKs

Use the OpenAI SDK1

For Java, these providers' docs point to the OpenAI SDK rather than a library of their own.

Azure OpenAI / Microsoft Foundry

Points to the OpenAI SDK

Not a Azure OpenAI / Microsoft Foundry SDK. For Java, Azure OpenAI / Microsoft Foundry's docs point you to the OpenAI SDK. Base URL and limits.

Package
com.openai:openai-java (+ com.azure:azure-identity)
Install
Install
implementation("com.openai:openai-java:VERSION")
implementation("com.azure:azure-identity:VERSION")

VERSION stands for the version the docs pin. Pin the current release from the package registry.

Repo
github.com/openai/openai-java
Docs
learn.microsoft.com/en-us/azure/foundry/openai/supported-languages
Notes
Gradle lines verbatim except pinned versions, replaced with VERSION; a Maven block is also given.

From the docs

Use the OpenAI SDKs with the Azure OpenAI v1 endpoint to build model inference applications in Python, C#, JavaScript, Java, or Go.
learn.microsoft.com/en-us/azure/foundry/openai/supported-languages
All Azure OpenAI / Microsoft Foundry SDKs

Community libraries (not official)1

Libraries the provider's docs link but the provider does not ship. None of these is an official SDK.

Mistral AI

Community library, not official

Community library, not official. Mistral AI's docs link it, but Mistral AI does not ship it.

Package
langchain4j / spring-ai
Install
See docs
Repo
github.com/langchain4j/langchain4j
Docs
docs.mistral.ai/resources/sdks
Notes
Mistral's third-party table lists LangChain4j and Spring AI (frameworks, not dedicated clients).

From the docs

Here are some clients built by the community for various other languages ... Please note that these clients are not actively maintained or supported by Mistral AI.
docs.mistral.ai/resources/sdks
All Mistral AI SDKs

No SDK in the docs2

The provider's SDK docs list no Java SDK. The quote shows what they do list.

Not recorded

The data has no Java entry for these providers. Their SDK docs are linked for a direct check.

Other languages

9 more language pages, plus the full SDK reference.

Newsletter

Know when a provider ships a new SDK

One email per week. New models, new SDKs and the API changes that break your client, and what they mean for your stack.