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

LanguageInstall
nodenpm install @ax-hub/sdk
gogo get github.com/jocoding-ax-partners/axhub-sdk-go
javaMaven Central ai.axhub:axhub-sdk-java
kotlinMaven Central ai.axhub:axhub-sdk-kotlin
pythonpip install axhub-sdk
rubygem 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-Key header.
  • 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