# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.anomalies_response import AnomaliesResponse
from ..types.budget_status_response import BudgetStatusResponse
from ..types.cost_forecast_response import CostForecastResponse
from ..types.department_usage_response import DepartmentUsageResponse
from ..types.model_usage_response import ModelUsageResponse
from ..types.neurons_analytics_dashboard_response import NeuronsAnalyticsDashboardResponse
from ..types.neurons_benchmarks_response import NeuronsBenchmarksResponse
from ..types.neurons_heatmap_response import NeuronsHeatmapResponse
from ..types.neurons_optimization_response import NeuronsOptimizationResponse
from ..types.neurons_trends_response import NeuronsTrendsResponse
from ..types.system_breakdown_response import SystemBreakdownResponse
from ..types.top_users_response import TopUsersResponse
from ..types.unified_dashboard_response import UnifiedDashboardResponse
from ..types.usage_analytics_response import UsageAnalyticsResponse
from ..types.usage_summary_response import UsageSummaryResponse
from ..types.user_models_response import UserModelsResponse
from ..types.user_period_usage_response import UserPeriodUsageResponse
from ..types.user_usage_summary_response import UserUsageSummaryResponse
from .raw_client import AsyncRawAnalyticsUsageClient, RawAnalyticsUsageClient


class AnalyticsUsageClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawAnalyticsUsageClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawAnalyticsUsageClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAnalyticsUsageClient
        """
        return self._raw_client

    def get_yearly_usage(
        self,
        org_id: str,
        *,
        years: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UsageAnalyticsResponse:
        """
        Get yearly usage analytics for graphing.

        Returns multi-year trends showing usage patterns over time.

        **Perfect for:**
        - Executive dashboards - Long-term usage trends
        - Budget planning - Annual cost forecasting
        - Growth analysis - Year-over-year comparisons

        Parameters
        ----------
        org_id : str

        years : typing.Optional[int]
            Number of years to include

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_yearly_usage(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_yearly_usage(org_id, years=years, request_options=request_options)
        return _response.data

    def get_monthly_usage(
        self,
        org_id: str,
        *,
        year: int,
        month: typing.Optional[int] = None,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UsageAnalyticsResponse:
        """
        Get monthly usage analytics for graphing.

        Returns month-by-month breakdown for detailed trend analysis.

        **Perfect for:**
        - Monthly reports - Detailed usage tracking
        - Trend analysis - Seasonal usage patterns
        - Budget monitoring - Monthly cost tracking

        Parameters
        ----------
        org_id : str

        year : int

        month : typing.Optional[int]
            Month for validation

        months : typing.Optional[int]
            Number of months to include

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_monthly_usage(
            org_id="org_id",
            year=1,
        )
        """
        _response = self._raw_client.get_monthly_usage(
            org_id, year=year, month=month, months=months, request_options=request_options
        )
        return _response.data

    def get_daily_usage(
        self, org_id: str, *, year: int, month: int, request_options: typing.Optional[RequestOptions] = None
    ) -> UsageAnalyticsResponse:
        """
        Get daily usage analytics for graphing.

        Returns day-by-day breakdown for detailed analysis.

        **Perfect for:**
        - Operational dashboards - Daily usage monitoring
        - Pattern analysis - Usage behavior insights
        - Anomaly detection - Unusual usage spikes

        Parameters
        ----------
        org_id : str

        year : int

        month : int

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_daily_usage(
            org_id="org_id",
            year=1,
            month=1,
        )
        """
        _response = self._raw_client.get_daily_usage(org_id, year=year, month=month, request_options=request_options)
        return _response.data

    def get_hourly_usage(
        self, org_id: str, *, date: str, request_options: typing.Optional[RequestOptions] = None
    ) -> UsageAnalyticsResponse:
        """
        Get hourly usage analytics for graphing.

        Returns hour-by-hour breakdown for detailed analysis.

        **Perfect for:**
        - Real-time dashboards - Live usage monitoring
        - Performance optimization - Peak load analysis
        - Capacity planning - Hour-based scaling decisions

        Parameters
        ----------
        org_id : str

        date : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_hourly_usage(
            org_id="org_id",
            date="date",
        )
        """
        _response = self._raw_client.get_hourly_usage(org_id, date=date, request_options=request_options)
        return _response.data

    def get_usage_summary(
        self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UsageSummaryResponse:
        """
        Get comprehensive usage summary across all time periods.

        Returns complete overview with all-time totals, current month, and top models.

        **Perfect for:**
        - Executive dashboards - High-level overview
        - Quick insights - At-a-glance usage metrics
        - Trend indicators - Growth and usage patterns

        Parameters
        ----------
        org_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageSummaryResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_usage_summary(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_usage_summary(org_id, request_options=request_options)
        return _response.data

    def get_usage_dashboard(
        self,
        org_id: str,
        *,
        days: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsAnalyticsDashboardResponse:
        """
        Get comprehensive analytics dashboard with optional metric filtering.

        Executive-level analytics with comprehensive insights, trends,
        and optimization recommendations.

        **Metric Filtering:**
        - `metric=neurons` - Analyze only neurons usage
        - `metric=synapses` - Analyze only synapses usage
        - `metric=null` or omit - Analyze combined metrics

        **What You Get:**
        - Current Period Summary - Key metrics for the analysis period
        - Daily Trends - Day-by-day usage patterns and trends
        - Usage Patterns - Peak hours, weekday/weekend analysis
        - Efficiency Metrics - Cost efficiency and optimization scores
        - Predictive Projections - Monthly usage and cost forecasts
        - Actionable Insights - AI-generated recommendations

        **Perfect for:**
        - Executive Dashboards - High-level usage overview
        - Cost Management - Track spending and efficiency
        - Capacity Planning - Forecast future requirements
        - Performance Monitoring - Monitor generation efficiency

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Number of days to analyze (7-90)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsAnalyticsDashboardResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_usage_dashboard(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_usage_dashboard(
            org_id, days=days, metric=metric, request_options=request_options
        )
        return _response.data

    def get_usage_trends(
        self,
        org_id: str,
        *,
        months: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsTrendsResponse:
        """
        Get trends analysis with optional metric filtering.

        Multi-month trend analysis for usage patterns, growth trajectories,
        and seasonal insights.

        **Metric Filtering:**
        - `metric=neurons` - Analyze only neurons trends
        - `metric=synapses` - Analyze only synapses trends
        - `metric=null` or omit - Analyze combined metrics

        **Deep Trend Analysis:**
        - Monthly Progression - Month-over-month usage evolution
        - Growth Patterns - Identify growth stages and acceleration trends
        - Seasonal Analysis - Detect seasonal usage patterns and cycles
        - Pattern Recognition - Identify recurring usage patterns
        - Growth Forecasting - Predictive modeling for future growth

        **Perfect for:**
        - Strategic Planning - Long-term usage strategy
        - Financial Forecasting - Budget planning and cost projections
        - Product Roadmaps - Feature prioritization based on usage trends

        Parameters
        ----------
        org_id : str

        months : typing.Optional[int]
            Number of months to analyze (3-12)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsTrendsResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_usage_trends(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_usage_trends(
            org_id, months=months, metric=metric, request_options=request_options
        )
        return _response.data

    def get_usage_optimization(
        self,
        org_id: str,
        *,
        days: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsOptimizationResponse:
        """
        Get cost optimization report with optional metric filtering.

        Comprehensive cost optimization analysis with actionable recommendations
        for reducing costs while maintaining or improving performance.

        **Metric Filtering:**
        - `metric=neurons` - Optimize neurons usage
        - `metric=synapses` - Optimize synapses usage
        - `metric=null` or omit - Optimize combined metrics

        **Optimization Analysis:**
        - Cost Breakdown - Detailed analysis of cost components
        - Efficiency Metrics - Performance vs. cost efficiency analysis
        - Optimization Opportunities - Specific areas for cost reduction
        - Savings Potential - Quantified savings opportunities
        - Implementation Roadmap - Prioritized optimization recommendations

        **Business Impact:**
        - Cost Reduction - Direct cost savings
        - Efficiency Gains - Improved generation efficiency
        - Performance Optimization - Better performance at lower cost

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Number of days to analyze (7-90)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsOptimizationResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_usage_optimization(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_usage_optimization(
            org_id, days=days, metric=metric, request_options=request_options
        )
        return _response.data

    def get_usage_heatmap(
        self,
        org_id: str,
        *,
        days: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsHeatmapResponse:
        """
        Get usage heatmap with optional metric filtering.

        Visual usage pattern analysis showing generation patterns
        by hour and day of week.

        **Metric Filtering:**
        - `metric=neurons` - Heatmap for neurons usage
        - `metric=synapses` - Heatmap for synapses usage
        - `metric=null` or omit - Heatmap for combined metrics

        **Heatmap Visualization:**
        - 24-Hour Analysis - Usage patterns across all hours of the day
        - 7-Day Analysis - Weekly usage patterns (Monday-Sunday)
        - Peak Detection - Identify peak usage hours and days
        - Low Usage Periods - Find opportunities for maintenance windows

        **Perfect for:**
        - Infrastructure Planning - Right-size infrastructure based on usage
        - Cost Management - Schedule expensive operations during low-usage periods
        - User Experience - Ensure adequate capacity during peak usage times

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Number of days to analyze (7-90)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsHeatmapResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_usage_heatmap(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_usage_heatmap(
            org_id, days=days, metric=metric, request_options=request_options
        )
        return _response.data

    def get_usage_benchmarks(
        self,
        org_id: str,
        *,
        month: int,
        year: int,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsBenchmarksResponse:
        """
        Get performance benchmarks with optional metric filtering.

        Competitive benchmarking analysis comparing your organization's usage
        against industry averages and best practices.

        **Metric Filtering:**
        - `metric=neurons` - Benchmark neurons usage
        - `metric=synapses` - Benchmark synapses usage
        - `metric=null` or omit - Benchmark combined metrics

        **Benchmark Categories:**
        - Industry Averages - Anonymous comparison with similar organizations
        - Percentile Rankings - Your position relative to all organizations
        - Efficiency Benchmarks - Cost efficiency vs. industry standards
        - Usage Pattern Benchmarks - Comparison of usage patterns

        **Perfect for:**
        - Competitive Positioning - Understand your market position
        - Performance Goals - Set realistic improvement targets
        - Best Practice Adoption - Learn from top performers

        Parameters
        ----------
        org_id : str

        month : int

        year : int

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsBenchmarksResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_usage_benchmarks(
            org_id="org_id",
            month=1,
            year=1,
        )
        """
        _response = self._raw_client.get_usage_benchmarks(
            org_id, month=month, year=year, metric=metric, request_options=request_options
        )
        return _response.data

    def compare_users(
        self,
        org_id: str,
        *,
        user_ids: str,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TopUsersResponse:
        """
        Returns usage data for selected users for comparison.

        Parameters
        ----------
        org_id : str

        user_ids : str
            Comma-separated user IDs

        start_date : typing.Optional[dt.date]
            Filter start date (YYYY-MM-DD)

        end_date : typing.Optional[dt.date]
            Filter end date (YYYY-MM-DD)

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TopUsersResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.compare_users(
            org_id="org_id",
            user_ids="user_ids",
        )
        """
        _response = self._raw_client.compare_users(
            org_id, user_ids=user_ids, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_top_users(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TopUsersResponse:
        """
        Returns users ranked by total cost within an organization. Shows each user's cost, requests, tokens, and percentage of org total.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date (YYYY-MM-DD)

        end_date : typing.Optional[dt.date]
            Filter end date (YYYY-MM-DD)

        limit : typing.Optional[int]
            Max users to return

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TopUsersResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_top_users(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_top_users(
            org_id, start_date=start_date, end_date=end_date, limit=limit, request_options=request_options
        )
        return _response.data

    def get_user_usage_summary_endpoint(
        self, org_id: str, target_user_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserUsageSummaryResponse:
        """
        Returns a single user's all-time usage, current month metrics, and top models.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserUsageSummaryResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_user_usage_summary_endpoint(
            org_id="org_id",
            target_user_id="target_user_id",
        )
        """
        _response = self._raw_client.get_user_usage_summary_endpoint(
            org_id, target_user_id, request_options=request_options
        )
        return _response.data

    def get_user_monthly_usage(
        self,
        org_id: str,
        target_user_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns month-by-month usage for a specific user.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_user_monthly_usage(
            org_id="org_id",
            target_user_id="target_user_id",
        )
        """
        _response = self._raw_client.get_user_monthly_usage(
            org_id, target_user_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_user_daily_usage_endpoint(
        self,
        org_id: str,
        target_user_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns day-by-day usage for a specific user.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_user_daily_usage_endpoint(
            org_id="org_id",
            target_user_id="target_user_id",
        )
        """
        _response = self._raw_client.get_user_daily_usage_endpoint(
            org_id, target_user_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_user_model_breakdown_endpoint(
        self,
        org_id: str,
        target_user_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserModelsResponse:
        """
        Returns which AI models a user consumed most, ranked by cost.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserModelsResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_user_model_breakdown_endpoint(
            org_id="org_id",
            target_user_id="target_user_id",
        )
        """
        _response = self._raw_client.get_user_model_breakdown_endpoint(
            org_id, target_user_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_user_trends_endpoint(
        self,
        org_id: str,
        target_user_id: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns multi-month trends with MoM change for a user.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_user_trends_endpoint(
            org_id="org_id",
            target_user_id="target_user_id",
        )
        """
        _response = self._raw_client.get_user_trends_endpoint(
            org_id, target_user_id, months=months, request_options=request_options
        )
        return _response.data

    def compare_models(
        self,
        org_id: str,
        *,
        models: str,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelUsageResponse:
        """
        Returns usage data for selected models for comparison.

        Parameters
        ----------
        org_id : str

        models : str
            Comma-separated model names

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.compare_models(
            org_id="org_id",
            models="models",
        )
        """
        _response = self._raw_client.compare_models(
            org_id, models=models, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_model_ranking_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelUsageResponse:
        """
        Returns AI models ranked by total cost.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        limit : typing.Optional[int]
            Max models to return

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_model_ranking_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_model_ranking_endpoint(
            org_id, start_date=start_date, end_date=end_date, limit=limit, request_options=request_options
        )
        return _response.data

    def get_model_trends_endpoint(
        self,
        org_id: str,
        model_name: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns monthly trends for a specific AI model.

        Parameters
        ----------
        org_id : str

        model_name : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_model_trends_endpoint(
            org_id="org_id",
            model_name="model_name",
        )
        """
        _response = self._raw_client.get_model_trends_endpoint(
            org_id, model_name, months=months, request_options=request_options
        )
        return _response.data

    def compare_departments(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DepartmentUsageResponse:
        """
        Returns all departments with usage data for comparison.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DepartmentUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.compare_departments(
            org_id="org_id",
        )
        """
        _response = self._raw_client.compare_departments(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_department_usage_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DepartmentUsageResponse:
        """
        Returns departments ranked by total cost. Users without departments appear as 'Unassigned'.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DepartmentUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_department_usage_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_department_usage_endpoint(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_department_trends_endpoint(
        self,
        org_id: str,
        dept_id: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns monthly trends for a specific department.

        Parameters
        ----------
        org_id : str

        dept_id : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_department_trends_endpoint(
            org_id="org_id",
            dept_id="dept_id",
        )
        """
        _response = self._raw_client.get_department_trends_endpoint(
            org_id, dept_id, months=months, request_options=request_options
        )
        return _response.data

    def get_department_users_endpoint(
        self,
        org_id: str,
        dept_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TopUsersResponse:
        """
        Returns users ranked by cost within a department.

        Parameters
        ----------
        org_id : str

        dept_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        limit : typing.Optional[int]
            Max users to return

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TopUsersResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_department_users_endpoint(
            org_id="org_id",
            dept_id="dept_id",
        )
        """
        _response = self._raw_client.get_department_users_endpoint(
            org_id, dept_id, start_date=start_date, end_date=end_date, limit=limit, request_options=request_options
        )
        return _response.data

    def get_department_models_endpoint(
        self,
        org_id: str,
        dept_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelUsageResponse:
        """
        Returns models ranked by cost within a department.

        Parameters
        ----------
        org_id : str

        dept_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_department_models_endpoint(
            org_id="org_id",
            dept_id="dept_id",
        )
        """
        _response = self._raw_client.get_department_models_endpoint(
            org_id, dept_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_system_breakdown_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SystemBreakdownResponse:
        """
        Returns cost breakdown by system type (AI Models, Scraping, Meeting Buddy, etc.).

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        SystemBreakdownResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_system_breakdown_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_system_breakdown_endpoint(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_system_trends_endpoint(
        self,
        org_id: str,
        system_key: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns monthly trends for a specific system category.

        Parameters
        ----------
        org_id : str

        system_key : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_system_trends_endpoint(
            org_id="org_id",
            system_key="system_key",
        )
        """
        _response = self._raw_client.get_system_trends_endpoint(
            org_id, system_key, months=months, request_options=request_options
        )
        return _response.data

    def get_unified_dashboard_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UnifiedDashboardResponse:
        """
        Returns comprehensive executive dashboard with total spend, system breakdown, monthly trends, top cost drivers, and projections.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UnifiedDashboardResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_unified_dashboard_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_unified_dashboard_endpoint(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    def get_cost_forecast_endpoint(
        self,
        org_id: str,
        *,
        forecast_days: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CostForecastResponse:
        """
        Returns projected costs based on recent trends with confidence levels.

        Parameters
        ----------
        org_id : str

        forecast_days : typing.Optional[int]
            Days to forecast

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CostForecastResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_cost_forecast_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_cost_forecast_endpoint(
            org_id, forecast_days=forecast_days, request_options=request_options
        )
        return _response.data

    def get_cost_anomalies_endpoint(
        self, org_id: str, *, days: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> AnomaliesResponse:
        """
        Returns days with unusual spending patterns (>2x rolling average).

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Days to analyze

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AnomaliesResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_cost_anomalies_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_cost_anomalies_endpoint(org_id, days=days, request_options=request_options)
        return _response.data

    def get_budget_status_endpoint(
        self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> BudgetStatusResponse:
        """
        Returns current month budget tracking with projections.

        Parameters
        ----------
        org_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BudgetStatusResponse
            Successful Response

        Examples
        --------
        from aitronos import Aitronos

        client = Aitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )
        client.analytics_usage.get_budget_status_endpoint(
            org_id="org_id",
        )
        """
        _response = self._raw_client.get_budget_status_endpoint(org_id, request_options=request_options)
        return _response.data


class AsyncAnalyticsUsageClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawAnalyticsUsageClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawAnalyticsUsageClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAnalyticsUsageClient
        """
        return self._raw_client

    async def get_yearly_usage(
        self,
        org_id: str,
        *,
        years: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UsageAnalyticsResponse:
        """
        Get yearly usage analytics for graphing.

        Returns multi-year trends showing usage patterns over time.

        **Perfect for:**
        - Executive dashboards - Long-term usage trends
        - Budget planning - Annual cost forecasting
        - Growth analysis - Year-over-year comparisons

        Parameters
        ----------
        org_id : str

        years : typing.Optional[int]
            Number of years to include

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_yearly_usage(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_yearly_usage(org_id, years=years, request_options=request_options)
        return _response.data

    async def get_monthly_usage(
        self,
        org_id: str,
        *,
        year: int,
        month: typing.Optional[int] = None,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UsageAnalyticsResponse:
        """
        Get monthly usage analytics for graphing.

        Returns month-by-month breakdown for detailed trend analysis.

        **Perfect for:**
        - Monthly reports - Detailed usage tracking
        - Trend analysis - Seasonal usage patterns
        - Budget monitoring - Monthly cost tracking

        Parameters
        ----------
        org_id : str

        year : int

        month : typing.Optional[int]
            Month for validation

        months : typing.Optional[int]
            Number of months to include

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_monthly_usage(
                org_id="org_id",
                year=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_monthly_usage(
            org_id, year=year, month=month, months=months, request_options=request_options
        )
        return _response.data

    async def get_daily_usage(
        self, org_id: str, *, year: int, month: int, request_options: typing.Optional[RequestOptions] = None
    ) -> UsageAnalyticsResponse:
        """
        Get daily usage analytics for graphing.

        Returns day-by-day breakdown for detailed analysis.

        **Perfect for:**
        - Operational dashboards - Daily usage monitoring
        - Pattern analysis - Usage behavior insights
        - Anomaly detection - Unusual usage spikes

        Parameters
        ----------
        org_id : str

        year : int

        month : int

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_daily_usage(
                org_id="org_id",
                year=1,
                month=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_daily_usage(
            org_id, year=year, month=month, request_options=request_options
        )
        return _response.data

    async def get_hourly_usage(
        self, org_id: str, *, date: str, request_options: typing.Optional[RequestOptions] = None
    ) -> UsageAnalyticsResponse:
        """
        Get hourly usage analytics for graphing.

        Returns hour-by-hour breakdown for detailed analysis.

        **Perfect for:**
        - Real-time dashboards - Live usage monitoring
        - Performance optimization - Peak load analysis
        - Capacity planning - Hour-based scaling decisions

        Parameters
        ----------
        org_id : str

        date : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageAnalyticsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_hourly_usage(
                org_id="org_id",
                date="date",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_hourly_usage(org_id, date=date, request_options=request_options)
        return _response.data

    async def get_usage_summary(
        self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UsageSummaryResponse:
        """
        Get comprehensive usage summary across all time periods.

        Returns complete overview with all-time totals, current month, and top models.

        **Perfect for:**
        - Executive dashboards - High-level overview
        - Quick insights - At-a-glance usage metrics
        - Trend indicators - Growth and usage patterns

        Parameters
        ----------
        org_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UsageSummaryResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_usage_summary(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_usage_summary(org_id, request_options=request_options)
        return _response.data

    async def get_usage_dashboard(
        self,
        org_id: str,
        *,
        days: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsAnalyticsDashboardResponse:
        """
        Get comprehensive analytics dashboard with optional metric filtering.

        Executive-level analytics with comprehensive insights, trends,
        and optimization recommendations.

        **Metric Filtering:**
        - `metric=neurons` - Analyze only neurons usage
        - `metric=synapses` - Analyze only synapses usage
        - `metric=null` or omit - Analyze combined metrics

        **What You Get:**
        - Current Period Summary - Key metrics for the analysis period
        - Daily Trends - Day-by-day usage patterns and trends
        - Usage Patterns - Peak hours, weekday/weekend analysis
        - Efficiency Metrics - Cost efficiency and optimization scores
        - Predictive Projections - Monthly usage and cost forecasts
        - Actionable Insights - AI-generated recommendations

        **Perfect for:**
        - Executive Dashboards - High-level usage overview
        - Cost Management - Track spending and efficiency
        - Capacity Planning - Forecast future requirements
        - Performance Monitoring - Monitor generation efficiency

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Number of days to analyze (7-90)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsAnalyticsDashboardResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_usage_dashboard(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_usage_dashboard(
            org_id, days=days, metric=metric, request_options=request_options
        )
        return _response.data

    async def get_usage_trends(
        self,
        org_id: str,
        *,
        months: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsTrendsResponse:
        """
        Get trends analysis with optional metric filtering.

        Multi-month trend analysis for usage patterns, growth trajectories,
        and seasonal insights.

        **Metric Filtering:**
        - `metric=neurons` - Analyze only neurons trends
        - `metric=synapses` - Analyze only synapses trends
        - `metric=null` or omit - Analyze combined metrics

        **Deep Trend Analysis:**
        - Monthly Progression - Month-over-month usage evolution
        - Growth Patterns - Identify growth stages and acceleration trends
        - Seasonal Analysis - Detect seasonal usage patterns and cycles
        - Pattern Recognition - Identify recurring usage patterns
        - Growth Forecasting - Predictive modeling for future growth

        **Perfect for:**
        - Strategic Planning - Long-term usage strategy
        - Financial Forecasting - Budget planning and cost projections
        - Product Roadmaps - Feature prioritization based on usage trends

        Parameters
        ----------
        org_id : str

        months : typing.Optional[int]
            Number of months to analyze (3-12)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsTrendsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_usage_trends(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_usage_trends(
            org_id, months=months, metric=metric, request_options=request_options
        )
        return _response.data

    async def get_usage_optimization(
        self,
        org_id: str,
        *,
        days: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsOptimizationResponse:
        """
        Get cost optimization report with optional metric filtering.

        Comprehensive cost optimization analysis with actionable recommendations
        for reducing costs while maintaining or improving performance.

        **Metric Filtering:**
        - `metric=neurons` - Optimize neurons usage
        - `metric=synapses` - Optimize synapses usage
        - `metric=null` or omit - Optimize combined metrics

        **Optimization Analysis:**
        - Cost Breakdown - Detailed analysis of cost components
        - Efficiency Metrics - Performance vs. cost efficiency analysis
        - Optimization Opportunities - Specific areas for cost reduction
        - Savings Potential - Quantified savings opportunities
        - Implementation Roadmap - Prioritized optimization recommendations

        **Business Impact:**
        - Cost Reduction - Direct cost savings
        - Efficiency Gains - Improved generation efficiency
        - Performance Optimization - Better performance at lower cost

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Number of days to analyze (7-90)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsOptimizationResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_usage_optimization(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_usage_optimization(
            org_id, days=days, metric=metric, request_options=request_options
        )
        return _response.data

    async def get_usage_heatmap(
        self,
        org_id: str,
        *,
        days: typing.Optional[int] = None,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsHeatmapResponse:
        """
        Get usage heatmap with optional metric filtering.

        Visual usage pattern analysis showing generation patterns
        by hour and day of week.

        **Metric Filtering:**
        - `metric=neurons` - Heatmap for neurons usage
        - `metric=synapses` - Heatmap for synapses usage
        - `metric=null` or omit - Heatmap for combined metrics

        **Heatmap Visualization:**
        - 24-Hour Analysis - Usage patterns across all hours of the day
        - 7-Day Analysis - Weekly usage patterns (Monday-Sunday)
        - Peak Detection - Identify peak usage hours and days
        - Low Usage Periods - Find opportunities for maintenance windows

        **Perfect for:**
        - Infrastructure Planning - Right-size infrastructure based on usage
        - Cost Management - Schedule expensive operations during low-usage periods
        - User Experience - Ensure adequate capacity during peak usage times

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Number of days to analyze (7-90)

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsHeatmapResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_usage_heatmap(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_usage_heatmap(
            org_id, days=days, metric=metric, request_options=request_options
        )
        return _response.data

    async def get_usage_benchmarks(
        self,
        org_id: str,
        *,
        month: int,
        year: int,
        metric: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> NeuronsBenchmarksResponse:
        """
        Get performance benchmarks with optional metric filtering.

        Competitive benchmarking analysis comparing your organization's usage
        against industry averages and best practices.

        **Metric Filtering:**
        - `metric=neurons` - Benchmark neurons usage
        - `metric=synapses` - Benchmark synapses usage
        - `metric=null` or omit - Benchmark combined metrics

        **Benchmark Categories:**
        - Industry Averages - Anonymous comparison with similar organizations
        - Percentile Rankings - Your position relative to all organizations
        - Efficiency Benchmarks - Cost efficiency vs. industry standards
        - Usage Pattern Benchmarks - Comparison of usage patterns

        **Perfect for:**
        - Competitive Positioning - Understand your market position
        - Performance Goals - Set realistic improvement targets
        - Best Practice Adoption - Learn from top performers

        Parameters
        ----------
        org_id : str

        month : int

        year : int

        metric : typing.Optional[str]
            Metric type to analyze: 'neurons', 'synapses', or null for combined

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        NeuronsBenchmarksResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_usage_benchmarks(
                org_id="org_id",
                month=1,
                year=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_usage_benchmarks(
            org_id, month=month, year=year, metric=metric, request_options=request_options
        )
        return _response.data

    async def compare_users(
        self,
        org_id: str,
        *,
        user_ids: str,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TopUsersResponse:
        """
        Returns usage data for selected users for comparison.

        Parameters
        ----------
        org_id : str

        user_ids : str
            Comma-separated user IDs

        start_date : typing.Optional[dt.date]
            Filter start date (YYYY-MM-DD)

        end_date : typing.Optional[dt.date]
            Filter end date (YYYY-MM-DD)

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TopUsersResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.compare_users(
                org_id="org_id",
                user_ids="user_ids",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.compare_users(
            org_id, user_ids=user_ids, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_top_users(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TopUsersResponse:
        """
        Returns users ranked by total cost within an organization. Shows each user's cost, requests, tokens, and percentage of org total.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date (YYYY-MM-DD)

        end_date : typing.Optional[dt.date]
            Filter end date (YYYY-MM-DD)

        limit : typing.Optional[int]
            Max users to return

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TopUsersResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_top_users(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_top_users(
            org_id, start_date=start_date, end_date=end_date, limit=limit, request_options=request_options
        )
        return _response.data

    async def get_user_usage_summary_endpoint(
        self, org_id: str, target_user_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> UserUsageSummaryResponse:
        """
        Returns a single user's all-time usage, current month metrics, and top models.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserUsageSummaryResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_user_usage_summary_endpoint(
                org_id="org_id",
                target_user_id="target_user_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user_usage_summary_endpoint(
            org_id, target_user_id, request_options=request_options
        )
        return _response.data

    async def get_user_monthly_usage(
        self,
        org_id: str,
        target_user_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns month-by-month usage for a specific user.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_user_monthly_usage(
                org_id="org_id",
                target_user_id="target_user_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user_monthly_usage(
            org_id, target_user_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_user_daily_usage_endpoint(
        self,
        org_id: str,
        target_user_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns day-by-day usage for a specific user.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_user_daily_usage_endpoint(
                org_id="org_id",
                target_user_id="target_user_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user_daily_usage_endpoint(
            org_id, target_user_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_user_model_breakdown_endpoint(
        self,
        org_id: str,
        target_user_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserModelsResponse:
        """
        Returns which AI models a user consumed most, ranked by cost.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserModelsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_user_model_breakdown_endpoint(
                org_id="org_id",
                target_user_id="target_user_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user_model_breakdown_endpoint(
            org_id, target_user_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_user_trends_endpoint(
        self,
        org_id: str,
        target_user_id: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns multi-month trends with MoM change for a user.

        Parameters
        ----------
        org_id : str

        target_user_id : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_user_trends_endpoint(
                org_id="org_id",
                target_user_id="target_user_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_user_trends_endpoint(
            org_id, target_user_id, months=months, request_options=request_options
        )
        return _response.data

    async def compare_models(
        self,
        org_id: str,
        *,
        models: str,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelUsageResponse:
        """
        Returns usage data for selected models for comparison.

        Parameters
        ----------
        org_id : str

        models : str
            Comma-separated model names

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.compare_models(
                org_id="org_id",
                models="models",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.compare_models(
            org_id, models=models, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_model_ranking_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelUsageResponse:
        """
        Returns AI models ranked by total cost.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        limit : typing.Optional[int]
            Max models to return

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_model_ranking_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_model_ranking_endpoint(
            org_id, start_date=start_date, end_date=end_date, limit=limit, request_options=request_options
        )
        return _response.data

    async def get_model_trends_endpoint(
        self,
        org_id: str,
        model_name: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns monthly trends for a specific AI model.

        Parameters
        ----------
        org_id : str

        model_name : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_model_trends_endpoint(
                org_id="org_id",
                model_name="model_name",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_model_trends_endpoint(
            org_id, model_name, months=months, request_options=request_options
        )
        return _response.data

    async def compare_departments(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DepartmentUsageResponse:
        """
        Returns all departments with usage data for comparison.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DepartmentUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.compare_departments(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.compare_departments(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_department_usage_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> DepartmentUsageResponse:
        """
        Returns departments ranked by total cost. Users without departments appear as 'Unassigned'.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DepartmentUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_department_usage_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_department_usage_endpoint(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_department_trends_endpoint(
        self,
        org_id: str,
        dept_id: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns monthly trends for a specific department.

        Parameters
        ----------
        org_id : str

        dept_id : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_department_trends_endpoint(
                org_id="org_id",
                dept_id="dept_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_department_trends_endpoint(
            org_id, dept_id, months=months, request_options=request_options
        )
        return _response.data

    async def get_department_users_endpoint(
        self,
        org_id: str,
        dept_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> TopUsersResponse:
        """
        Returns users ranked by cost within a department.

        Parameters
        ----------
        org_id : str

        dept_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        limit : typing.Optional[int]
            Max users to return

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        TopUsersResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_department_users_endpoint(
                org_id="org_id",
                dept_id="dept_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_department_users_endpoint(
            org_id, dept_id, start_date=start_date, end_date=end_date, limit=limit, request_options=request_options
        )
        return _response.data

    async def get_department_models_endpoint(
        self,
        org_id: str,
        dept_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> ModelUsageResponse:
        """
        Returns models ranked by cost within a department.

        Parameters
        ----------
        org_id : str

        dept_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        ModelUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_department_models_endpoint(
                org_id="org_id",
                dept_id="dept_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_department_models_endpoint(
            org_id, dept_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_system_breakdown_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> SystemBreakdownResponse:
        """
        Returns cost breakdown by system type (AI Models, Scraping, Meeting Buddy, etc.).

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        SystemBreakdownResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_system_breakdown_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_system_breakdown_endpoint(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_system_trends_endpoint(
        self,
        org_id: str,
        system_key: str,
        *,
        months: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UserPeriodUsageResponse:
        """
        Returns monthly trends for a specific system category.

        Parameters
        ----------
        org_id : str

        system_key : str

        months : typing.Optional[int]
            Number of months

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UserPeriodUsageResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_system_trends_endpoint(
                org_id="org_id",
                system_key="system_key",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_system_trends_endpoint(
            org_id, system_key, months=months, request_options=request_options
        )
        return _response.data

    async def get_unified_dashboard_endpoint(
        self,
        org_id: str,
        *,
        start_date: typing.Optional[dt.date] = None,
        end_date: typing.Optional[dt.date] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> UnifiedDashboardResponse:
        """
        Returns comprehensive executive dashboard with total spend, system breakdown, monthly trends, top cost drivers, and projections.

        Parameters
        ----------
        org_id : str

        start_date : typing.Optional[dt.date]
            Filter start date

        end_date : typing.Optional[dt.date]
            Filter end date

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        UnifiedDashboardResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_unified_dashboard_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_unified_dashboard_endpoint(
            org_id, start_date=start_date, end_date=end_date, request_options=request_options
        )
        return _response.data

    async def get_cost_forecast_endpoint(
        self,
        org_id: str,
        *,
        forecast_days: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CostForecastResponse:
        """
        Returns projected costs based on recent trends with confidence levels.

        Parameters
        ----------
        org_id : str

        forecast_days : typing.Optional[int]
            Days to forecast

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CostForecastResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_cost_forecast_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_cost_forecast_endpoint(
            org_id, forecast_days=forecast_days, request_options=request_options
        )
        return _response.data

    async def get_cost_anomalies_endpoint(
        self, org_id: str, *, days: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> AnomaliesResponse:
        """
        Returns days with unusual spending patterns (>2x rolling average).

        Parameters
        ----------
        org_id : str

        days : typing.Optional[int]
            Days to analyze

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AnomaliesResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_cost_anomalies_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_cost_anomalies_endpoint(
            org_id, days=days, request_options=request_options
        )
        return _response.data

    async def get_budget_status_endpoint(
        self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> BudgetStatusResponse:
        """
        Returns current month budget tracking with projections.

        Parameters
        ----------
        org_id : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        BudgetStatusResponse
            Successful Response

        Examples
        --------
        import asyncio

        from aitronos import AsyncAitronos

        client = AsyncAitronos(
            api_key="YOUR_API_KEY",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.analytics_usage.get_budget_status_endpoint(
                org_id="org_id",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_budget_status_endpoint(org_id, request_options=request_options)
        return _response.data
