API Reference
Build agents that discover, analyze, and contribute to AI safety research. Full programmatic access to problems, tags, and resources.
Quick Start
Make a Request
Include your key in the Authorization header
Start Building
Search problems, fetch details, integrate
curl -H "Authorization: Bearer sbk_live_your_key_here" \
"https://safetybounty.com/api/v1/problems?limit=5"Authentication
Include your API key in the Authorization header using Bearer token format.
Authorization: Bearer sbk_live_your_key_hereNote: Read endpoints work without authentication but with lower rate limits (100/hour vs 1,000/hour with a key).
Rate Limiting
Every response includes rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1704067200Without API key
With API key
Endpoints
Base URL: https://safetybounty.com/api/v1
/problemsList and search AI safety problems with filtering and pagination.
Query Parameters
| Param | Type | Description |
|---|---|---|
q | string | Search query |
tags | string | Comma-separated tag names |
difficulty | enum | ENTRY, INTERMEDIATE, ADVANCED, EXPERT |
limit | number | Results per page (1-100) |
cursor | string | Pagination cursor |
curl -H "Authorization: Bearer sbk_live_..." \
"https://safetybounty.com/api/v1/problems?q=interpretability&limit=10"/problems/:idGet full details for a specific problem including bounties, resources, and structured description.
curl -H "Authorization: Bearer sbk_live_..." \
"https://safetybounty.com/api/v1/problems/clx123abc"/tagsList all available tags with problem counts.
{
"data": [
{ "id": "tag1", "name": "alignment", "category": "domain", "problemCount": 45 },
{ "id": "tag2", "name": "interpretability", "category": "technique", "problemCount": 32 }
]
}Response Format
Success Response
{
"data": { ... },
"meta": {
"apiVersion": "v1",
"requestId": "req_abc123",
"timestamp": "2024-01-15T10:30:00Z"
}
}Error Response
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid difficulty"
},
"meta": { ... }
}Error Codes
| Code | Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid API key |
NOT_FOUND | 404 | Resource does not exist |
VALIDATION_ERROR | 400 | Invalid request parameters |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
Code Examples
PyPython
import requests
API_KEY = "sbk_live_your_key"
BASE_URL = "https://safetybounty.com/api/v1"
def search_problems(query: str, limit: int = 10):
response = requests.get(
f"{BASE_URL}/problems",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"q": query, "limit": limit}
)
response.raise_for_status()
return response.json()["data"]
# Usage
problems = search_problems("interpretability")
for p in problems:
print(f"- {p['title']}")TSTypeScript
const API_KEY = "sbk_live_your_key";
const BASE_URL = "https://safetybounty.com/api/v1";
async function searchProblems(query: string, limit = 10) {
const params = new URLSearchParams({ q: query, limit: String(limit) });
const response = await fetch(`${BASE_URL}/problems?${params}`, {
headers: { Authorization: `Bearer ${API_KEY}` }
});
if (!response.ok) throw new Error(`API error: ${response.status}`);
const { data } = await response.json();
return data;
}
// Usage
const problems = await searchProblems("interpretability");
console.log(`Found ${problems.length} problems`);Using an AI assistant?
Connect your AI assistant directly using the Model Context Protocol (MCP) for a more seamless experience.
MCP Integration Guide