List keys

Publishes the keys attestations are signed with, as a JSON Web Key Set (RFC 7517; Ed25519 keys as RFC 8037 writes them).

GET /v1/principal/keys

Addresshttps://api.hanzo.ai/v1/principal/keys
MethodGET
Operationget_principal_keys
AuthAuthorization: Bearer $HANZO_API_KEY

Publishes the keys attestations are signed with, as a JSON Web Key Set (RFC 7517; Ed25519 keys as RFC 8037 writes them). Open to anyone: a verifier verifying an agent's statement fetches this once and verifies offline.

A key a rotation retired stays here and signs nothing, so a statement signed before the rotation verifies until it expires.

Request

GET /v1/principal/keys takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200principal.JWKSok
defaultproblem-detailsrefused

200 body — 7 fields.

FieldInTypeAlwaysDescription
keysbodyprincipal.JWK[]—
keys[].algbodystring—Alg is EdDSA.
keys[].crvbodystring—Crv is Ed25519.
keys[].kidbodystring—Kid names the key; a statement's header carries it.
keys[].ktybodystring—Kty is OKP, an octet key pair.
keys[].usebodystring—Use is sig.
keys[].xbodystring—X is the public key, base64url without padding.

Failure carries the platform error shape — see Errors.

Examples

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, PrincipalApi } from 'hanzoai';

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

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

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

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

let result = principal_api::get_principal_keys(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PrincipalApi;

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

var result = new PrincipalApi(client).getPrincipalKeys();
curl https://api.hanzo.ai/v1/principal/keys \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches principal through the principal tool, which names its 7 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_principals"
         }
       }
     }'

Principal API · All Hanzo APIs · Interactive reference

Was this page useful?