"""Exceptions for the AI Inference API."""


class APIError(Exception):
    """Base exception for API errors."""

    def __init__(self, status_code: int, message: str = "API request failed"):
        self.status_code = status_code
        super().__init__(f"{message} (status: {status_code})")


class AuthenticationError(APIError):
    """Raised when authentication fails."""

    def __init__(self, message: str = "Authentication failed"):
        super().__init__(401, message)
