Link

The unified AI login manager's registry: the org+user-scoped record of WHICH provider accounts (Claude Max, ChatGPT Plus, a Hanzo API key, a raw provider key) a developer has signed into, ON WHICH MACHINES, with each account's latest usage snapshot.

Also for this capability: API · CLI · MCP · SDKs

The unified AI login manager's registry: the org+user-scoped record of WHICH provider accounts (Claude Max, ChatGPT Plus, a Hanzo API key, a raw provider key) a developer has signed into, ON WHICH MACHINES, with each account's latest usage snapshot.

Base URLhttps://api.hanzo.ai
Operations11
AuthAuthorization: Bearer $HANZO_API_KEY

Specification

Specification pending — no HIP in hanzoai/hips declares capability: link yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.

Four surfaces

SurfaceReaches this capability asCoverage
RESTlink at its own prefix11 operations
CLIhanzo auth …11 of 11
SDKLinkApi in every published client11 methods
MCPtool link on https://api.hanzo.ai/v1/mcp11 operations, 4 under the document's own id — ask describe for the rest

Quickstart

export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/link, operation get_link:

hanzo auth link list
import { Configuration, LinkApi } from 'hanzoai';

const api = new LinkApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getLink();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LinkApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LinkApi(client).get_link()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.LinkAPI.GetLink(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, link_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = link_api::get_link(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LinkApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new LinkApi(client).getLink();
curl https://api.hanzo.ai/v1/link \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches link through the link tool, which names its 11 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_links"
         }
       }
     }'

Answers 200 with object — ok.

Endpoints

EndpointWhat it does
GET /v1/link/{id}Reads one linked account.
DELETE /v1/link/{id}Logs out one account and stops the sessions it was running.
POST /v1/link/devices/{machine}/revokeLogs out every account on one machine and stops its sessions.
GET /v1/link/devices/{machine}Shows one machine: its accounts, usage and live sessions.
GET /v1/link/routeGets the failover order across your linked accounts.
GET /v1/link/usage/accountsBreaks down what the gateway routed through each of your accounts.
GET /v1/link/usage/summaryShows plan consumption and Hanzo spend side by side.
GET /v1/link/usageShows one provider account's own usage dashboard.
POST /v1/link/usageReports usage samples from the device collector.
GET /v1/linkLists your linked accounts and the devices they sit on.
POST /v1/linkRegisters a signed-in AI provider account on a machine.

All Hanzo APIs · Interactive reference

Was this page useful?