REST API
Call one endpoint for governed agent actions.
The stable public API is /v1/act. Agents authenticate with an ActLayer API key, send a capability slug and input object, and receive a result plus receipt metadata.
/v1/act
Use an agent-scoped API key in the Authorization header. Add an Idempotency-Key for any action that may be retried, spend money, or mutate state.
request
POST https://actlayer.dev/v1/act
Authorization: Bearer act_sk_...
Content-Type: application/json
Idempotency-Key: optional-stable-tool-call-id
{
"capability": "stock_price",
"input": { "ticker": "TSLA" },
"metadata": {
"agent_runtime": "custom",
"trace_id": "run_123"
}
}response
{
"success": true,
"capability": "stock_price",
"result": {
"ticker": "TSLA",
"price": 123.45,
"currency": "USD"
},
"cost": 0.002,
"currency": "USD",
"receipt_id": "rcpt_...",
"approval_id": null,
"decision": "allow",
"risk_score": 12,
"reasons": ["capability_active", "wallet_balance_sufficient"],
"policy_version": "actlayer-srg-1",
"execution_time_ms": 420,
"error": null
}Public endpoints
GET /v1/capabilities
List available capability slugs, schemas, pricing, status, and risk levels.
POST /v1/act
Execute or request approval for one governed capability action.
GET /health
Basic service health endpoint for uptime checks.
Dashboard endpoints
Dashboard user endpoints require a JWT from /v1/auth/register or /v1/auth/login. Use the dashboard for wallet, agent, API key, approvals, logs, receipts, provider submissions, and admin operations.
