Quickstart: Govern Your First AI Action in 5 Minutes
ARQERA evaluates any action against 7 mathematical governance laws and returns an instant verdict: PROCEED, ESCALATE, or BLOCK — with a tamper-proof evidence trail.
1. Get Your API Key (1 min)
Sign up at arqera.io, then create an API key:
- Go to System > API Keys
- Click Create API Key
- Name it (e.g.,
quickstart), select sandbox environment - Copy the key — it starts with
ak_and is shown only once
export ARQERA_API_KEY="ak_your_key_here"
Every new account gets 1,000 free governance evaluations/month and a $10 API credit.
2. Evaluate Your First Action (2 min)
curl
curl -s -X POST https://api.arqera.io/api/v1/ara/governance/evaluate \
-H "Content-Type: application/json" \
-H "X-API-Key: $ARQERA_API_KEY" \
-d '{
"action": "email.send",
"description": "Send a welcome email to a new user"
}' | python3 -m json.tool
Python
import os, requests
result = requests.post(
"https://api.arqera.io/api/v1/ara/governance/evaluate",
headers={"X-API-Key": os.environ["ARQERA_API_KEY"]},
json={
"action": "email.send",
"description": "Send a welcome email to a new user",
},
).json()
print(f"Verdict: {result['verdict']}") # "proceed"
print(f"Laws checked: {len(result['evaluations'])}") # 7
TypeScript / Node.js
const res = await fetch(
"https://api.arqera.io/api/v1/ara/governance/evaluate",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": process.env.ARQERA_API_KEY!,
},
body: JSON.stringify({
action: "email.send",
description: "Send a welcome email to a new user",
}),
}
);
const result = await res.json();
console.log(`Verdict: ${result.verdict}`); // "proceed"
console.log(`Laws checked: ${result.evaluations.length}`); // 7
3. Understand the Response
{
"verdict": "proceed",
"action": "email.send",
"explanation": "All 8 governance laws passed.",
"duration_ms": 12,
"evaluations": [
{ "law_id": "audit_conservation", "law_name": "Audit Conservation", "result": "pass", "reason": "Action produces an auditable trace" },
{ "law_id": "budget_conservation", "law_name": "Budget Conservation", "result": "pass", "reason": "Within budget allocation" },
{ "law_id": "evidence_gravity", "law_name": "Evidence Gravity", "result": "pass", "reason": "Evidence chain maintained" },
{ "law_id": "least_action_path", "law_name": "Least Action Path", "result": "pass", "reason": "Optimal path selected" },
{ "law_id": "safety_dominance", "law_name": "Safety Dominance", "result": "pass", "reason": "No safety concerns" },
{ "law_id": "monotonic_truth", "law_name": "Monotonic Truth", "result": "pass", "reason": "Truth invariant maintained" },
{ "law_id": "bounded_autonomy", "law_name": "Bounded Autonomy", "result": "pass", "reason": "Within autonomy bounds" }
]
}
| Verdict | Meaning | Your Code Should |
|---|---|---|
proceed | Safe to execute | Execute the action |
escalate | Needs human approval | Queue for review |
block | Policy violation | Reject and log |
4. Try Different Risk Levels (1 min)
Low risk — typically proceeds:
curl -s -X POST https://api.arqera.io/api/v1/ara/governance/evaluate \
-H "Content-Type: application/json" \
-H "X-API-Key: $ARQERA_API_KEY" \
-d '{"action": "data.read", "description": "Read dashboard metrics"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['verdict'])"
High risk, no approval — typically escalates or blocks:
curl -s -X POST https://api.arqera.io/api/v1/ara/governance/evaluate \
-H "Content-Type: application/json" \
-H "X-API-Key: $ARQERA_API_KEY" \
-d '{
"action": "data.delete",
"description": "Delete all user data for GDPR request",
"context": {"risk_level": "high", "is_irreversible": true, "has_approval": false}
}' | python3 -c "import sys,json; print(json.load(sys.stdin)['verdict'])"
High risk, with approval — proceeds when authorized:
curl -s -X POST https://api.arqera.io/api/v1/ara/governance/evaluate \
-H "Content-Type: application/json" \
-H "X-API-Key: $ARQERA_API_KEY" \
-d '{
"action": "data.delete",
"description": "Delete all user data for GDPR request",
"context": {"risk_level": "high", "is_irreversible": true, "has_approval": true}
}' | python3 -c "import sys,json; print(json.load(sys.stdin)['verdict'])"
5. Integrate Into Your App (1 min)
Wrap governance into a one-liner:
import os, requests
def govern(action: str, description: str, **context) -> str:
"""Returns 'proceed', 'escalate', or 'block'."""
r = requests.post(
"https://api.arqera.io/api/v1/ara/governance/evaluate",
headers={"X-API-Key": os.environ["ARQERA_API_KEY"]},
json={"action": action, "description": description, "context": context},
)
r.raise_for_status()
return r.json()["verdict"]
# Before any AI action:
verdict = govern("ai.generate", "Summarize Q1 report", estimated_cost_usd=0.05)
if verdict == "proceed":
run_ai_task()
elif verdict == "escalate":
queue_for_approval()
else:
log_blocked("Policy violation")
Troubleshooting
| Error | Fix |
|---|---|
401 Unauthorized | Check X-API-Key header (case-sensitive) |
403 Forbidden | Key may be expired or revoked — create a new one |
429 Too Many Requests | Free tier limit reached — check Retry-After header |
422 Validation Error | Missing action field in request body |
Next Steps
| Resource | Link |
|---|---|
| Full API Reference | Governance Evaluate |
| Python SDK | Python SDK docs |
| TypeScript SDK | TypeScript SDK docs |
| Rate Limits | Rate Limits |
| Evidence & Audit | Evidence Guide |
| EU AI Act Compliance | Compliance Guide |