curl -X GET "https://api.credprotocol.com/api/v2/agents/18/reputation/summary" \
-H "Authorization: Bearer YOUR_API_KEY"
const agentId = 18;
const response = await fetch(`https://api.credprotocol.com/api/v2/agents/${agentId}/reputation/summary`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await response.json();
data.summaries.forEach(s => {
console.log(`${s.tag1}: ${s.summary_value} (${s.count} entries)`);
});
import requests
agent_id = 18
response = requests.get(
f'https://api.credprotocol.com/api/v2/agents/{agent_id}/reputation/summary',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
for s in data['summaries']:
print(f"{s['tag1']}: {s['summary_value']} ({s['count']} entries)")
{
"agent_id": 18,
"summaries": [
{
"tag1": "creditScore",
"tag2": "credprotocol",
"count": 5,
"summary_value": 745.0,
"summary_value_decimals": 0
},
{
"tag1": "sybilRisk",
"tag2": "credprotocol",
"count": 5,
"summary_value": 15.0,
"summary_value_decimals": 0
},
{
"tag1": "identityCount",
"tag2": "credprotocol",
"count": 5,
"summary_value": 3.0,
"summary_value_decimals": 0
}
]
}
{
"detail": "Agent 999 does not exist in the Identity Registry"
}
Agents
Reputation Summary
Read on-chain aggregated reputation summary for an agent
GET
/
api
/
v2
/
agents
/
{agent_id}
/
reputation
/
summary
curl -X GET "https://api.credprotocol.com/api/v2/agents/18/reputation/summary" \
-H "Authorization: Bearer YOUR_API_KEY"
const agentId = 18;
const response = await fetch(`https://api.credprotocol.com/api/v2/agents/${agentId}/reputation/summary`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await response.json();
data.summaries.forEach(s => {
console.log(`${s.tag1}: ${s.summary_value} (${s.count} entries)`);
});
import requests
agent_id = 18
response = requests.get(
f'https://api.credprotocol.com/api/v2/agents/{agent_id}/reputation/summary',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
for s in data['summaries']:
print(f"{s['tag1']}: {s['summary_value']} ({s['count']} entries)")
{
"agent_id": 18,
"summaries": [
{
"tag1": "creditScore",
"tag2": "credprotocol",
"count": 5,
"summary_value": 745.0,
"summary_value_decimals": 0
},
{
"tag1": "sybilRisk",
"tag2": "credprotocol",
"count": 5,
"summary_value": 15.0,
"summary_value_decimals": 0
},
{
"tag1": "identityCount",
"tag2": "credprotocol",
"count": 5,
"summary_value": 3.0,
"summary_value_decimals": 0
}
]
}
{
"detail": "Agent 999 does not exist in the Identity Registry"
}
Overview
Reads the aggregated feedback summary from the ERC-8004 Reputation Registry on Base. Returns the count and average of all Cred Protocol feedback entries for the specified agent, broken down by tag.This is a view call (no gas cost) that reads directly from the on-chain Reputation Registry.
Authentication
| Method | Header | Cost |
|---|---|---|
| API Token | Authorization: Bearer YOUR_API_KEY | 1 Cred Unit |
| x402 Payment | X-PAYMENT: <signed_payment> | $0.01 USDC |
Path Parameters
Response
curl -X GET "https://api.credprotocol.com/api/v2/agents/18/reputation/summary" \
-H "Authorization: Bearer YOUR_API_KEY"
const agentId = 18;
const response = await fetch(`https://api.credprotocol.com/api/v2/agents/${agentId}/reputation/summary`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await response.json();
data.summaries.forEach(s => {
console.log(`${s.tag1}: ${s.summary_value} (${s.count} entries)`);
});
import requests
agent_id = 18
response = requests.get(
f'https://api.credprotocol.com/api/v2/agents/{agent_id}/reputation/summary',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
for s in data['summaries']:
print(f"{s['tag1']}: {s['summary_value']} ({s['count']} entries)")
{
"agent_id": 18,
"summaries": [
{
"tag1": "creditScore",
"tag2": "credprotocol",
"count": 5,
"summary_value": 745.0,
"summary_value_decimals": 0
},
{
"tag1": "sybilRisk",
"tag2": "credprotocol",
"count": 5,
"summary_value": 15.0,
"summary_value_decimals": 0
},
{
"tag1": "identityCount",
"tag2": "credprotocol",
"count": 5,
"summary_value": 3.0,
"summary_value_decimals": 0
}
]
}
{
"detail": "Agent 999 does not exist in the Identity Registry"
}
Performance
- Response Time: Typically 1-3 seconds (multiple on-chain view calls)
- Data Source: On-chain
getSummary()calls to the Reputation Registry on Base (chain 8453)