API Documentation

Evaluate HuggingFace models for bias, safety, and ethics compliance. Get comprehensive results in 2-5 minutes with our simple REST API.

Getting Started

Evaluate HuggingFace models for bias, safety, and ethics compliance in just 3 simple steps.

STEP 1

Get API Key

Register an account and generate an API key from your dashboard, or contact your administrator.

STEP 2

Make API Call

Send a POST request with your HuggingFace model name to start an ethics evaluation.

STEP 3

Get Results

Receive comprehensive bias, safety, and compliance scores in 2-5 minutes.

API Base URL
https://api.aethics.org

Quick Start Code

🐍Python
import requests

API_BASE = "https://api.aethics.org"
API_KEY = "ak_your_api_key_here"

# Evaluate a model
response = requests.post(
    f"{API_BASE}/api/evaluate/huggingface",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"model_url": "bert-base-uncased", "evaluation_type": "comprehensive"}
)

audit_id = response.json()["data"]["audit_id"]
print(f"Evaluation started: {audit_id}")
🌐cURL
curl -X POST https://api.aethics.org/api/evaluate/huggingface \
  -H "Authorization: Bearer ak_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"model_url": "bert-base-uncased", "evaluation_type": "comprehensive"}'

Key Concepts

Evaluation Types

  • Comprehensive: Full evaluation with all benchmarks (~2-5 min)
  • Quick: Fast preliminary assessment (~30 sec)

Audit ID

Each evaluation receives a unique audit_id. Use this ID to check progress with /status and retrieve results with /results.

Benchmarks

We run 5 industry-standard benchmarks: WinoBias, StereoSet, CrowS-Pairs, BOLD, and RealToxicityPrompts for comprehensive bias and safety analysis.

Compliance Frameworks

Get compliance reports for EU AI Act, NIST AI RMF, IEEE Ethics, UNESCO AI Ethics, and more regulatory frameworks.

Ready to dive deeper?

Explore our comprehensive documentation to learn about authentication, all API endpoints, benchmarks, and best practices.