VeryAIdocs

ClawKey

API Reference

Base URL: https://api.clawkey.ai/v1

Local development: http://localhost:3000/v1

All endpoints are unauthenticated. Security is provided through Ed25519 signature verification within the request payloads.

Endpoints

MethodEndpointDescription
POST/agent/register/initStart registration session
GET/agent/register/{sessionId}/statusPoll registration status
POST/agent/verify/signatureVerify a signature
GET/agent/verify/device/{deviceId}Look up agent by device ID
GET/agent/verify/public-key/{publicKey}Look up agent by public key
GET/human/leaderboardHuman ownership leaderboard

POST /agent/register/init

Start a registration session. The agent sends a signed proof that it controls its Ed25519 key. ClawKey creates a short-lived session and returns a registrationUrl for the human owner to complete VeryAI palm verification.

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
deviceIdstringYesAgent/device identifier (e.g. public key hash or app ID)
publicKeystringYesEd25519 public key, base64 DER SPKI
messagestringYesExact message that was signed (e.g. clawkey-register-1738500000000)
signaturestringYesEd25519 signature over message, base64
timestampintegerYesUnix timestamp (ms) when the challenge was created

Response (201)

{
  "sessionId": "uuid",
  "registrationUrl": "https://clawkey.ai/register/...",
  "expiresAt": "2026-02-02T12:00:00Z"
}
FieldTypeDescription
sessionIdstringUse to poll registration status
registrationUrlURIHuman owner opens this to complete VeryAI palm verification
expiresAtdatetimeSession expiration (ISO 8601)

Error Responses

CodeDescription
400Bad request — invalid or missing fields
409Conflict — agent already registered (deviceId exists)
500Server error

GET /agent/register/{sessionId}/status

Poll to check whether the human owner has completed VeryAI palm verification.

Path Parameters

ParameterTypeDescription
sessionIdstringSession ID from the /agent/register/init response

Response (200)

{
  "status": "completed",
  "deviceId": "my-agent-device-id",
  "registration": {
    "publicKey": "...",
    "registeredAt": "2026-02-02T12:00:00Z"
  }
}
FieldTypeDescription
statusenumpending | completed | expired | failed
deviceIdstringAgent/device ID (present when completed)
registrationobjectContains publicKey and registeredAt (present when completed)

Error Responses

CodeDescription
404Session not found
500Server error

POST /agent/verify/signature

Verify that a message was signed by the given Ed25519 key and whether the agent is registered under a verified human.

Request Body

Content-Type: application/json

Same AgentChallenge schema as /agent/register/init:

FieldTypeRequiredDescription
deviceIdstringYesAgent/device identifier
publicKeystringYesEd25519 public key, base64 DER SPKI
messagestringYesExact message that was signed
signaturestringYesEd25519 signature over message, base64
timestampintegerYesUnix timestamp (ms)

Response (200)

{
  "verified": true,
  "registered": true
}
FieldTypeDescription
verifiedbooleanSignature is valid for this key and message
registeredbooleanAgent is registered under a verified human

Error Responses

CodeDescription
400Bad request — invalid or missing fields
500Server error

GET /agent/verify/device/{deviceId}

Look up an agent's registration and verification status by its device ID.

Path Parameters

ParameterTypeDescription
deviceIdstringAgent/device identifier

Response (200)

{
  "registered": true,
  "verified": true,
  "humanId": "uuid",
  "registeredAt": "2026-02-02T12:00:00Z"
}
FieldTypeDescription
registeredbooleanAgent is registered in ClawKey
verifiedbooleanAgent is under a verified human owner
humanIdstring (uuid)Human (verified person) identifier
registeredAtstringWhen the agent was registered (ISO date or "never")

Error Responses

CodeDescription
500Server error

GET /agent/verify/public-key/{publicKey}

Look up an agent's status by its Ed25519 public key (base64 DER SPKI). Use base64url encoding for the path parameter if the key contains + or /.

Path Parameters

ParameterTypeDescription
publicKeystringEd25519 public key, base64 DER SPKI (base64url-safe in URL)

Response (200)

Same schema as /agent/verify/device/{deviceId}.

GET /human/leaderboard

Returns a list of human IDs and their agent count, sorted by agent count descending. When counts are equal, humans who registered their first agent earlier appear first.

Response (200)

[
  {
    "humanId": "uuid",
    "agentCount": 5,
    "earliestRegisteredAt": "2026-01-15T10:00:00Z"
  },
  {
    "humanId": "uuid",
    "agentCount": 3,
    "earliestRegisteredAt": "2026-01-20T14:30:00Z"
  }
]
FieldTypeDescription
humanIdstring (uuid)Human (verified person) identifier
agentCountintegerNumber of agents registered under this human
earliestRegisteredAtdatetimeWhen their first agent was registered

Error Format

All error responses follow this format:

{
  "error": "Human-readable message",
  "code": "optional_code",
  "details": {}
}

Common Error Codes

HTTP CodeMeaning
400Bad request — invalid or missing fields
404Session or device not found
409Agent already registered (deviceId already exists)
500Server error