Developer docs
Documentation
Guides and API reference for running AntiBait analysis from the web app or from your own code.
API reference
Status badge
PublicSimple JSON badge endpoint for embedding status on external sites. Compatible with shields.io and similar badge services.
API endpoint
GET/api/status/badgeRequest
No authentication required
No request body neededPublic endpoint with CORS enabled for cross-origin requests.
Response
{
"schemaVersion": 1,
"label": "status",
"message": "string",
"color": "string",
"status": "operational"
| "degraded" | "outage",
"uptime": "string"
}Example responses
cURL
curl https://antibait.io/api/status/badgeOperational status
{
"schemaVersion": 1,
"label": "status",
"message": "All Systems Operational",
"color": "brightgreen",
"status": "operational",
"uptime": "99.9%"
}Degraded performance
{
"schemaVersion": 1,
"label": "status",
"message": "Degraded Performance",
"color": "yellow",
"status": "degraded",
"uptime": "94.5%"
}Service outage
{
"schemaVersion": 1,
"label": "status",
"message": "Service Outage",
"color": "red",
"status": "outage",
"uptime": null
}Response fields
schemaVersionnumberBadge schema version (always 1 for shields.io compatibility)
labelstringBadge label text (always "status")
messagestringHuman-readable status message
colorstringBadge color: "brightgreen" (operational), "yellow" (degraded), "red" (outage), "lightgrey" (unknown)
statusstringMachine-readable status: "operational", "degraded", "outage", or "unknown"
uptimestringShare of the last hour's analyses that succeeded (e.g. "99.9%"), or null when none ran
Shields.io integration
This endpoint returns data in the shields.io endpoint JSON format, making it compatible with their dynamic badge system.
Shields.io URL
https://img.shields.io/endpoint?url=https://antibait.io/api/status/badgeMarkdown example
HTML example
<img src="https://img.shields.io/endpoint?url=https://antibait.io/api/status/badge" alt="API Status">Status determination logic
Operational
Database is healthy AND success rate ≥ 95%
Degraded
Database is healthy BUT success rate < 95%
Outage
Database health check fails
Unknown
Error occurred while checking status
Usage tips
Caching
Responses are cached for 60 seconds with a 120-second stale-while-revalidate window. This ensures badges don't cause excessive load while remaining reasonably up-to-date.
Badge display
Use this endpoint to display real-time API status on your README, documentation, or website. The color-coded badges make status immediately visible to users.
CORS support
Cross-origin requests are allowed, so you can fetch this data directly from client-side JavaScript for custom badge implementations.
Success rate calculation
The uptime percentage is calculated from analysis requests in the last hour. This provides a recent snapshot of API reliability.
Need help integrating the API? The support team replies within 24 hours on business days.