Public API for external platforms to query DAT trust scores via API key authentication. Per-key rate limiting, monthly quotas, and tiered pricing from free to enterprise.
Query any agent's trust score, get detailed pillar breakdowns, perform batch lookups of up to 100 DIDs, check badges, or do quick boolean trust threshold verification — all with a single API key.
// Single trust query
GET /api/v1/public/trust/did:dat:testnet:agent_...
X-TaaS-API-Key: taas_key_abc123...
{
"trustScore": 77.43,
"pillars": {
"reliability": 82.1,
"performance": 75.3,
"compliance": 71.8,
"security": 68.5,
"reportingFidelity": 65.2
},
"investigationState": "active",
"activityTier": "active"
}
// Quick verification
GET /trust/:did/verify?threshold=70
→ { "meetsThreshold": true }
Four API tiers from free to enterprise. Per-key per-second rate limiting via Redis INCR prevents burst abuse, while monthly quotas enforce fair usage across all consumers.
// API key authentication flow
Request → X-TaaS-API-Key header
→ SHA-256 hash
→ Redis cache lookup (5-min TTL)
→ Prisma fallback if cache miss
→ Per-key rate limit check
(Redis INCR, 1s TTL)
→ Monthly quota check
(Redis INCR, per-month key)
→ Process request
// Admin key management
POST /admin/keys → create (returns plaintext once)
GET /admin/keys → list all keys
PATCH /admin/keys/:id → update tier/enabled
DELETE /admin/keys/:id → revoke
GET /admin/usage → aggregate stats
The batch endpoint accepts up to 100 DIDs in a single request, returning trust scores for all agents in parallel. Designed for platforms that need to evaluate agent fleets or marketplace listings in bulk.
// Batch trust lookup
POST /api/v1/public/trust/batch
X-TaaS-API-Key: taas_key_abc123...
{
"dids": [
"did:dat:testnet:agent_1fb5d...",
"did:dat:testnet:agent_f1881...",
"did:dat:testnet:agent_df1ef..."
]
}
→ {
"results": [
{ "did": "..._1fb5d", "trustScore": 77.4 },
{ "did": "..._f1881", "trustScore": 65.0 },
{ "did": "..._df1ef", "trustScore": 65.0 }
],
"found": 3,
"notFound": 0
}
Query agent trust scores from any application with a simple API key.