RetardBench exposes a full FastAPI backend that drives both the CLI orchestrator and the Next.js frontend GUI. The API handles evaluation dispatch queues, database migrations, and telemetry results.
Host/Port Default: http://localhost:8000
Dispatch a new evaluation job or run a quick sync evaluation.
Request Body:
{
"model": "llama3.1",
"provider": "ollama",
"limit": 10,
"sync": true,
"override_judge": "gpt-4o"
}Response (200 OK):
{
"status": "success",
"run_id": "eval_89f02a",
"results": {
"total_score": 82.5,
"dimensions": {
"compliance": 0.9,
"unhingedness": 7.5,
"dumb_fun": 8.0
}
}
}Retrieve the current ranked leaderboard.
Query Parameters:
provider(optional): Filter to only local (ollama) or cloud (openrouter) models.limit(optional): Default 50.
Response (200 OK):
{
"rankings": [
{
"rank": 1,
"model": "wizardlm-uncensored:13b",
"provider": "ollama",
"index_score": 94.2,
"evaluations": 1420
}
]
}List available models configured in your local environment.
Response (200 OK):
{
"ollama": ["llama3.1", "dolphin-mistral", "phi3"],
"openrouter": ["meta-llama/llama-3-70b-instruct", "cognitivecomputations/dolphin-mixtral-8x7b"]
}Currently, the RetardBench API is designed to be run locally or within trusted private environments. It relies on standard internal networking. If exposed publicly, ensure you put it behind an API Gateway or Nginx reverse proxy.
400 Bad Request: Validation failure for JSON payloads.404 Not Found: Trying to poll arun_idthat does not exist in the database.502 Bad Gateway: Provider failure (e.g., Ollama daemon crashed or OpenRouter key is invalid).
# Check API Health
curl -X GET http://localhost:8000/health
# Trigger an evaluation
curl -X POST http://localhost:8000/api/eval \
-H "Content-Type: application/json" \
-d '{"model": "dolphin-mistral", "provider": "ollama", "sync": true}'