Hanzo AI
OpenapiAgent

Create key

Mints (or rotates) the claim key a `hanzo code --serve` daemon presents to claim work for this machine, and returns it ONCE: only its SHA-256 hash is…

POST /v1/agent/targets/{id}/key

Addresshttps://api.hanzo.ai/v1/agent/targets/{id}/key
MethodPOST
Operationpost_agent_targets_by_id_key
AuthAuthorization: Bearer $HANZO_API_KEY

Mints (or rotates) the claim key a hanzo code --serve daemon presents to claim work for this machine, and returns it ONCE: only its SHA-256 hash is stored. Rotating supersedes any prior daemon, so only the machine's owner — or an org admin — may call it; every other caller gets the same not-found an unknown id gets, and learns nothing about what exists.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the target to act on, from the path.

Response

StatusBodyMeaning
200agent.claimKeyOutok
defaultproblem-detailsrefused

200 body — 2 fields.

FieldInTypeAlwaysDescription
claimKeybodystringClaimKey is the capability itself.
targetIdbodystringTargetID is the machine the key authenticates.

Failure carries the platform error shape — see Errors.

Examples

hanzo agent targets key <id>

Agent API · All Hanzo APIs · Interactive reference

How is this guide?

On this page