Appearance
Package account is your own account: API keys you mint and revoke, and org onboarding.
Package account is your own account: API keys you mint and revoke, and org onboarding.
| Base URL | https://api.hanzo.ai |
| Operations | 2 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Quickstart
export HANZO_API_KEY=hk-... # console.hanzo.ai → API keysThen the first call — a read that needs nothing but the key. GET /v1/appearance, operation get_appearance:
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, AppearanceApi } from 'hanzoai';
const api = new AppearanceApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getAppearance();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AppearanceApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AppearanceApi(client).get_appearance()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.AppearanceAPI.GetAppearance(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, appearance_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = appearance_api::get_appearance(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AppearanceApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new AppearanceApi(client).getAppearance();The method above is the one at the current release of the document. [email protected] (PyPI) was generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/appearance \
-H "Authorization: Bearer $HANZO_API_KEY"Tool account, op get_appearance — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "account",
"arguments": {
"op": "get_appearance",
"input": {}
}
}
}'Answers 200 with object — ok.
appearance
GET /v1/appearance
Returns the signed-in caller's own appearance preference — text size, density and accent — read from their IAM account so it is the same on every device and every Hanzo surface. An unset preference is an empty object.
A transient IAM read failure reports the empty preference rather than a 5xx, so a surface applies its published default and never error-toasts on load — the same fail-soft the key read uses.
POST /v1/appearance
Stores the caller's appearance preference on their IAM account, preserving every other field of the row. The accent is validated as a real colour token before it is stored; an unset or invalid axis is dropped rather than stored.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
accent | string | — | Accent is the one hue — a CSS colour token (a hex, or a bounded functional colour like rgb()/oklch()). |
density | string | — | Density is the spacing step: "compact", "default" or "comfortable". |
type | number | — | Type is the text-size multiplier, clamped to the ramp window [0.85, 1.4]. |
How is this guide?