Aurelis

Aurelis API Reference

This section contains comprehensive API documentation for all Aurelis components.

Core APIs

Model Orchestrator

Configuration & Security

Analysis & Generation

Utilities

Integration APIs

CLI Interface

External Integrations

Quick Reference

Authentication

from aurelis.core.security import get_api_key_manager

# Set GitHub token
api_key_manager = get_api_key_manager()
api_key_manager.set_api_key("github", "your_github_token")

Basic Usage

from aurelis.models import get_model_orchestrator, ModelRequest, ModelType, TaskType

# Create orchestrator
orchestrator = get_model_orchestrator()

# Make request
request = ModelRequest(
    prompt="Generate a Python class for user management",
    model_type=ModelType.CODESTRAL_2501,
    task_type=TaskType.CODE_GENERATION
)

response = await orchestrator.process_request(request)
print(response.content)

Configuration

from aurelis.core.config import get_config

config = get_config()
print(f"Primary model: {config.primary_model}")

Error Handling

All APIs use structured error handling with custom exception types:

from aurelis.core.exceptions import (
    AurelisError,
    ModelError,
    ConfigurationError,
    AuthenticationError
)

try:
    response = await orchestrator.process_request(request)
except ModelError as e:
    print(f"Model error: {e}")
except AuthenticationError as e:
    print(f"Auth error: {e}")

Type Safety

Aurelis uses comprehensive type hints and Pydantic models for all APIs:

from aurelis.models.types import ModelRequest, ModelResponse
from aurelis.core.types import AnalysisResult, CodeIssue

# All parameters and returns are type-safe
def analyze_code(content: str) -> AnalysisResult:
    # Implementation...
    pass

Performance & Caching

Rate Limiting

GitHub model usage is automatically rate-limited according to GitHub’s policies:

Next Steps

  1. Read the Model Orchestrator Guide
  2. Review Configuration Options
  3. Check Error Handling Best Practices
  4. Explore Code Examples