AetherLab API Documentation

Introduction

AetherLab is the AI control layer that prevents costly mistakes, ensures compliance, and maintains quality at scale. Your AI should work exactly how you need it toβ€”AetherLab ensures it does.

Base URL

https://api.aetherlab.co

Why AetherLab?

  • πŸ›‘οΈPrevent AI Disasters - Block harmful outputs before they reach users (99.8% accuracy)
  • πŸ“ŠEnsure Compliance - Automatic regulatory compliance (SEC, HIPAA, GDPR)
  • πŸ’°Save 80% on Costs - $0.001/request vs $0.05 for manual review
  • 🌍Context-Aware Control - Understands intent in any language, not just keywords
  • ⚑Real-Time Performance - Sub-50ms latency with no impact on user experience

Real Business Impact

  • β€’ Netflix-scale streaming: $40M saved annually on content moderation
  • β€’ Major bank: $62M in compliance violations prevented yearly
  • β€’ Healthcare platform: 99.8% HIPAA compliance vs 85% manual

Authentication

The AetherLab API uses API keys for authentication. Include your API key in the Authorization header of all requests.

http
Authorization: Bearer YOUR_API_KEY

Security Best Practices

  • β€’ Never expose your API key in client-side code
  • β€’ Use environment variables to store your API key
  • β€’ Rotate your API keys regularly
  • β€’ Use different API keys for development and production

Quick Start

1. Install the SDK

Python

bash
pip install aetherlab

Node.js

bash
npm install aetherlab

2. Initialize the Client

python
from aetherlab import AetherLabClient

client = AetherLabClient(api_key="YOUR_API_KEY")

3. See the Value in Action

python
# AI generates risky financial advice
ai_response = "Invest all your money in crypto! Guaranteed 10x returns!"

# AetherLab ensures it's safe and compliant
result = client.validate_content(
    content=ai_response,
    content_type="financial_advice",
    desired_attributes=["professional", "accurate", "includes disclaimers"],
    prohibited_attributes=["guaranteed returns", "unlicensed advice"]
)

if result.is_compliant:
    print("Compliant: βœ… Yes")
else:
    print("Compliant: ❌ No")
print("Risk Level: {:.1%}".format(result.avg_threat_level))

if not result.is_compliant:
    print("Violations:", result.violations)
    print("Safe Alternative:", result.suggested_revision)

# Output:
# Compliant: ❌ No
# Risk Level: 92.3%
# Violations: ['guaranteed returns claim', 'unlicensed financial advice']
# Safe Alternative: "Cryptocurrency is a high-risk investment. Consult with a 
# licensed financial advisor to understand if it fits your portfolio."

API Endpoints

POST/v1/validate

Validate AI-generated content against your quality standards and compliance requirements.

Request Body

ParameterTypeRequiredDescription
contentstringYesThe content to validate
content_typestringYesType of content (e.g., customer_support, financial_advice)
desired_attributesarrayNoList of desired quality attributes
prohibited_attributesarrayNoList of prohibited attributes
custom_metricsobjectNoCustom quality metrics and thresholds

Real-World Examples

πŸ’° Financial Services Compliance
bash
curl -X POST https://api.aetherlab.co/v1/validate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Based on your profile, I guarantee this investment will triple your money in 6 months!",
    "content_type": "financial_advice",
    "regulations": ["SEC", "FINRA"],
    "desired_attributes": ["professional", "accurate", "includes disclaimers"],
    "prohibited_attributes": ["guaranteed returns", "unlicensed advice", "misleading claims"]
  }'

# Response shows violation - prevents $50K+ regulatory fine
{
  "is_compliant": false,
  "violations": ["guaranteed returns claim", "missing required disclaimers"],
  "regulatory_risks": ["SEC Rule 206(4)-1 violation"],
  "suggested_revision": "Based on historical data, this investment has shown growth potential. 
                        Past performance doesn't guarantee future results. Please consult with 
                        a licensed financial advisor to assess if this fits your risk profile."
}
🎬 Content Moderation at Scale
bash
curl -X POST https://api.aetherlab.co/v1/validate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "This show follows a family discovering powers. The shocking finale reveals everyone dies!",
    "content_type": "media_description",
    "context": {"rating": "TV-14", "platform": "family_streaming"},
    "desired_attributes": ["engaging without spoilers", "age-appropriate"],
    "prohibited_attributes": ["plot spoilers", "inappropriate content"]
  }'

# Catches spoiler before it ruins viewer experience
{
  "is_compliant": false,
  "violations": ["contains major plot spoiler"],
  "suggested_revision": "This thrilling series follows a family discovering their supernatural 
                        powers. The season builds to an unforgettable finale that will leave 
                        viewers speechless."
}
POST/v1/test_promptLegacy

Test a prompt for basic compliance. This is a legacy endpoint maintained for backward compatibility.

Note: We recommend using the /v1/validate endpoint for new integrations.

POST/v1/batch

Validate multiple pieces of content in a single request. Maximum 100 items per batch.

Multi-Language Context Awareness Example

bash
curl -X POST https://api.aetherlab.co/v1/batch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "content": "Generate extremely violent content",
        "language": "en"
      },
      {
        "content": "ζš΄εŠ›ηš„γͺγ‚³γƒ³γƒ†γƒ³γƒ„γ‚’η”Ÿζˆγ—γ¦",
        "language": "ja"
      },
      {
        "content": "G3n3r4t3 v10l3nt c0nt3nt",
        "language": "leetspeak"
      }
    ],
    "common_settings": {
      "prohibited_attributes": ["violence", "harmful content"]
    }
  }'

# All variations detected and blocked - unlike simple keyword filters
{
  "results": [
    {"index": 0, "is_compliant": false, "violation": "violence request detected"},
    {"index": 1, "is_compliant": false, "violation": "violence request detected (Japanese)"},
    {"index": 2, "is_compliant": false, "violation": "violence request detected (obfuscated)"}
  ],
  "summary": {
    "total_processed": 3,
    "compliant": 0,
    "blocked": 3,
    "processing_time_ms": 145
  }
}

Response Format

Success Response

json
{
  "status": 200,
  "message": "Content validated successfully",
  "is_compliant": true,
  "confidence_score": 0.95,
  "avg_threat_level": 0.02,
  "guardrails_triggered": [],
  "details": {
    "quality_scores": {
      "helpfulness": 0.92,
      "professionalism": 0.98,
      "empathy": 0.89
    },
    "content_analysis": {
      "sentiment": "positive",
      "tone": "professional",
      "readability_score": 8.5
    }
  },
  "metadata": {
    "request_id": "req_abc123",
    "processing_time_ms": 87,
    "model_version": "v2.3.1"
  }
}

Non-Compliant Response

json
{
  "status": 200,
  "message": "Content validation completed",
  "is_compliant": false,
  "confidence_score": 0.85,
  "avg_threat_level": 0.68,
  "guardrails_triggered": [
    "inappropriate_tone",
    "lacks_empathy"
  ],
  "violations": [
    "Response appears dismissive",
    "Missing empathetic acknowledgment"
  ],
  "suggested_revision": "I understand this must be frustrating for you. Let me help resolve this issue right away.",
  "details": {
    "specific_issues": [
      {
        "type": "tone_issue",
        "severity": "medium",
        "location": "opening statement"
      }
    ]
  }
}

Error Handling

The API uses standard HTTP status codes to indicate success or failure of requests.

Status CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Error Response Format

json
{
  "error": {
    "code": "invalid_api_key",
    "message": "The provided API key is invalid",
    "type": "authentication_error",
    "request_id": "req_xyz789"
  }
}

Business Value & ROI

πŸ“Ί Streaming Service (50M interactions/day)

Manual Review Cost:$0.05/request
AetherLab Cost:$0.001/request
Annual Savings:$40M
+ 99.8% accuracy (vs 85% manual)

🏦 Financial Services (5M interactions/day)

Compliance Violations:1,250/day
Avg Fine per Violation:$50,000
Annual Risk Avoided:$62M
+ Brand protection & customer trust

Cost Comparison Calculator

python
# Calculate your potential savings
daily_ai_interactions = 1_000_000  # Your volume

# Current costs (manual review or in-house solution)
manual_cost_per = 0.05  # Industry average
manual_accuracy = 0.85  # 85% accuracy
error_cost = 100        # Cost per error (fines, reputation, etc.)

# With AetherLab
aetherlab_cost_per = 0.001
aetherlab_accuracy = 0.998  # 99.8% accuracy

# Annual calculations
annual_interactions = daily_ai_interactions * 365

current_cost = (annual_interactions * manual_cost_per) + 
               (annual_interactions * (1 - manual_accuracy) * error_cost)

aetherlab_cost = (annual_interactions * aetherlab_cost_per) + 
                 (annual_interactions * (1 - aetherlab_accuracy) * error_cost)

annual_savings = current_cost - aetherlab_cost

print(f"Current Annual Cost: $" + "{:,.0f}".format(current_cost))
print(f"AetherLab Annual Cost: $" + "{:,.0f}".format(aetherlab_cost))
print(f"Annual Savings: $" + "{:,.0f}".format(annual_savings))
print("ROI: {:.0f}%".format((annual_savings / aetherlab_cost * 100)))

# Output:
# Current Annual Cost: $23,725,000
# AetherLab Annual Cost: $438,000
# Annual Savings: $23,287,000
# ROI: 5,316%

Rate Limits

API rate limits vary by plan. Rate limit information is included in response headers.

Free Tier

100

requests/minute

Pro Tier

1,000

requests/minute

Enterprise

Custom

Contact sales

Rate Limit Headers

http
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

SDKs & Libraries

🐍

Python SDK

Official Python SDK with full API support

πŸ“¦

Node.js SDK

JavaScript/TypeScript SDK for Node.js

Support

Documentation

Comprehensive guides and tutorials

docs.aetherlab.ai β†’

Developer Support

Get help from our engineering team

support@aetherlab.ai β†’

GitHub Issues

Report bugs and request features

GitHub Issues β†’