Skip to content
VeilVeil
Esc
↑↓navigate↵open⌘Jpreview

Mint a short-lived Use lease onto an existing agent. Token is in this response once. Sandbox gets the session file, not the agent JWT. Default 15m, max 1h. Not MCP.

POST/v1/sessions
Authorization
AuthorizationBearer token (JWT) · headerrequired
Hydra JWT. Identity is the bound agent or a Keto member human. The host is not identity.
Request body
requiredapplication/json
agentstringrequired
ttlstring
Go duration. Default 15m. Max 1h.
max_usesinteger
Maximum successful Use calls. 0 = unlimited.
Responses
200Session plus token once.
idstringrequired
org_idstringrequired
agent_idstringrequired
expires_atstring<date-time>required
created_atstring<date-time>required
revoked_atstring<date-time> | null
renewed_atstring<date-time> | null
ttlintegerrequired
max_ttlintegerrequired
max_usesintegerrequired
usesintegerrequired
Use calls that passed authorization and reached upstream consumption.
tokenstringrequired
400bad request
401missing or invalid Bearer
403not owner
Request
curl -X POST "https://veil.nyc/v1/sessions" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": "string",
  "ttl": "string",
  "max_uses": 0
}'
Response
{
  "id": "string",
  "org_id": "string",
  "agent_id": "string",
  "expires_at": "2024-01-01T00:00:00Z",
  "created_at": "2024-01-01T00:00:00Z",
  "revoked_at": "2024-01-01T00:00:00Z",
  "renewed_at": "2024-01-01T00:00:00Z",
  "ttl": 0,
  "max_ttl": 0,
  "max_uses": 0,
  "uses": 0,
  "token": "string"
}