Skip to content
This repository was archived by the owner on Nov 6, 2026. It is now read-only.
hanzoaiPublic archive

About

Moved to hanzo-java/sdk — the Hanzo Java SDK (ai.hanzo:hanzo-java-cloud). This repository is a pointer.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Hanzo Java SDK → hanzo-java/sdk

Maven Central

The Hanzo Java SDK lives at github.com/hanzo-java/sdk: every /v1 operation of api.hanzo.ai as a typed method, generated from the API document each cloud release publishes. This repository is its old address and holds no code. Issues and pull requests go to hanzo-java/sdk.

Install

Java 11 or newer, from Maven Central:

dependencies { implementation 'ai.hanzo:hanzo-java-cloud:latest.release' }

The exact version and the Maven form are in the SDK's README.

Quickstart

import ai.hanzo.Hanzo;
import ai.hanzo.ApiClient;
import ai.hanzo.api.AccountApi;
import ai.hanzo.api.AiApi;
import ai.hanzo.model.OpenaiChatCompletionMessage;
import ai.hanzo.model.OpenaiChatCompletionRequest;

ApiClient hanzo = Hanzo.client();   // HANZO_API_KEY, HANZO_BASE_URL, HANZO_ORG_ID

new AccountApi(hanzo).getAccountKeys().getKeys()
        .forEach(key -> System.out.println(key.getType() + " " + key.getPrefix()));

var reply = new AiApi(hanzo).postChatCompletions(new OpenaiChatCompletionRequest()
        .model("zen5")
        .messages(java.util.List.of(new OpenaiChatCompletionMessage().role("user").content("Say hello."))),
        null, null);
System.out.println(reply.getChoices().get(0).getMessage().getContent());

Examples

Each a complete program in the SDK, compiled against it on every release:

flow what it does
hello GET /v1/account/keys: prove the key works
chat POST /v1/chat/completions: one completion
money GET /v1/billing/balance, GET /v1/billing/usage
store create a KV store, read it back, delete it
agent create an agent, run it, poll the run to completion
tools GET /v1/tool: the tool catalog the key reaches
kai POST /v1/decisions: a Kai decision, in the Kai cookbook

Other languages

C# · Python · TypeScript · Go · Rust · C++ · all SDKs

About

Moved to hanzo-java/sdk — the Hanzo Java SDK (ai.hanzo:hanzo-java-cloud). This repository is a pointer.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors