Flagship 02 / 04Open-source Java SDK

sidd-ai

Any AI model, one line of Java.

AiClient.chatQuick(
  "gpt-6.1-sol", prompt);

AiClient.chatQuick(
  "claude-sonnet-5.5", prompt);

AiClient.chatQuick(
  "llama3.2", prompt);

The same method for any model

Before
A different SDK for every model provider.
What I built
One Java call for any of them.

An open-source, Apache 2.0 library on Maven Central with 600+ downloads. Think LiteLLM, but for Java: pass "gpt-6.1-sol", "claude-sonnet-5.5" or "llama3.2" to the same method and it figures out the provider. Works from a plain main(), no Spring and no YAML.

600+Maven Central downloads
8AI providers
Star it on GitHub ↗ Maven Central ↗ Product Hunt ↗
RoleCreator and maintainer, open to contributors
Java 17Maven CentralModelRouterJUnit 5Fat jarApache 2.0
(00) DemoPress play, sound on
(01) Router playgroundType any model id

sidd-ai logo

ModelRouter looks at the start of the model id and picks the provider from that. If it doesn't recognise the prefix, it assumes you mean a local Ollama model.

String reply = AiClient.chatQuick("gemini-3.8-flash", "Explain JVM GC in one line");
// ModelRouter resolved "gemini-3.8-flash" to Gemini. No config, no Spring context.
(02) InstallJava 17+, Apache 2.0
<dependency>
  <groupId>io.github.prabhusiddarth</groupId>
  <artifactId>sidd-ai</artifactId>
  <version>1.0.5</version>
</dependency>
Quickstart
// builder for full control
AiClient client = AiClient.builder()
    .apiKey(System.getenv("OPENAI_API_KEY"))
    .model("gpt-6.1-sol")
    .build();

// or force a provider
AiClient.chatWithProvider("nim", "z-ai/glm-5.3", prompt);
(03) One error modelAcross every provider

try {
  AiClient.chatQuick(model, prompt);
} catch (AiAuthException e) {      // bad or missing key
} catch (AiRateLimitException e) { // back off and retry
} catch (AiApiException e) {       // provider error
}
(04) Open sourceApache 2.0

sidd-ai is open source under the Apache 2.0 licence, so you can drop it into a commercial project without asking. It has passed 600 downloads on Maven Central. The code, issues and releases all live on GitHub. If a provider you need is missing, a new route is usually a prefix check and one client class; I review pull requests.

(05) Why not a frameworkHow it compares
CapabilitySpring AILangChain4jsidd-ai
Zero frameworkNoPartialYes
Works in plain main()NoYesYes
One-line callsNoNoYes
Unified exceptionsPartialPartialYes
Swap model via a stringNoNoYes