Skip to main content

API Reference

GET /v1/contexts

Returns a list of all available decision contexts.

Response

{
"contexts": [
"allowlist.general",
"comment",
"publish",
"apply",
"governance.vote"
]
}

POST /v1/decide

The authoritative, billable surface of BaseCred.

Request

{
"subject": "0xabc...",
"context": "allowlist.general"
}

Response

{
"decision": "ALLOW",
"confidence": "HIGH",
"ruleIds": ["allow_strong_builder"],
"explain": ["Expert-level builder credibility", "High social trust"],
"constraints": [],
"retryAfter": null,
"version": "v1"
}
FieldDescription
decisionALLOW, DENY, or ALLOW_WITH_LIMITS
confidenceLOW, MEDIUM, HIGH, or VERY_HIGH
ruleIdsArray of strict rule IDs that triggered the decision
explainHuman-readable array of reasons

Status Codes

CodeMeaning
200Decision made successfully
400Invalid request (missing subject/context)
500Internal server error

AI Integration Policy

AI must never:

  • Decide ALLOW / DENY
  • Override deterministic rules
  • Act as source of truth

AI may:

  • Generate explanations
  • Suggest rule tuning
  • Detect anomalies
  • Simulate what-if scenarios

Rule: Rules decide. AI explains.