API REFERENCE
API Reference
Base URL: https://api.agentshield.one/v1
Authentication
All API requests require an API key in the Authorization header:
curl -H "Authorization: Bearer ags_live_..." https://api.agentshield.one/v1/eventsAPI keys are prefixed with ags_live_ and can be created in Settings → API Keys.
Events
POST
/v1/eventsAPI KeyTrack a single LLM event
curl -X POST https://api.agentshield.one/v1/events \
-H "Authorization: Bearer ags_live_..." \
-H "Content-Type: application/json" \
-d '{
"agent": "my-agent",
"model": "gpt-4o",
"prompt_tokens": 100,
"completion_tokens": 50,
"latency_ms": 1200,
"session_id": "optional-uuid"
}'GET
/v1/eventsJWTList recent events
Agents
GET
/v1/agentsJWTList all agents with stats
GET
/v1/agents/{name}JWTGet a specific agent
Sessions
GET
/v1/sessionsJWTList sessions
GET
/v1/sessions/{id}JWTGet session with step timeline
GET
/v1/sessions/{id}/shareJWTGet or create a shareable link
Analytics
GET
/v1/analytics/dailyJWTDaily cost aggregations
GET
/v1/analytics/hourlyJWTHourly cost aggregations
Alerts
GET
/v1/alertsJWTList alert rules
POST
/v1/alertsJWTCreate an alert rule
DELETE
/v1/alerts/{id}JWTDelete an alert rule
Reports
GET
/v1/reportsJWTList generated PDF reports
POST
/v1/reports/generateJWTGenerate a new PDF report
GET
/v1/reports/{id}/downloadJWTDownload a report PDF
Rate limits
Rate limits vary by plan. The response includes standard headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1711234567