Overview
AX Hub SDK — six languages, install, auth, first call
The AX Hub SDK is a library for calling the AX Hub backend from code. It ships in six languages — node, go, java, kotlin, python, ruby — and all six call the same backend the same way; only names and syntax follow each language.
Install
| Language | Install |
|---|---|
| node | npm install @ax-hub/sdk |
| go | go get github.com/jocoding-ax-partners/axhub-sdk-go |
| java | Maven Central ai.axhub:axhub-sdk-java |
| kotlin | Maven Central ai.axhub:axhub-sdk-kotlin |
| python | pip install axhub-sdk |
| ruby | gem install axhub-sdk |
Authentication
Pass the token you were issued. There are two kinds.
- A PAT (personal API key) goes out as the
X-Api-Keyheader. - A JWT (login token) goes out as
Authorization: Bearer.
Always state the token kind (tokenType). The SDK never guesses.
First call (node)
import { AxHubClient } from '@ax-hub/sdk';
const sdk = new AxHubClient({
token: process.env.AX_HUB_PAT!,
tokenType: 'pat',
});
const me = await sdk.identity.me();See also
- Client policy — what is a stable contract and what may change
- API reference — every operation with per-language call tables
- Using it inside an app (guide) — usage within template apps