@limitry/client - v0.4.1
    Preparing search index...

    Interface components

    interface components {
        headers: never;
        parameters: never;
        pathItems: never;
        requestBodies: never;
        responses: never;
        schemas: {
            CustomerUsageResponse: {
                customerId: string;
                totalCostCents: number;
                totalEvents: number;
                totalInputTokens: number;
                totalOutputTokens: number;
                totalTokens: number;
            };
            ErrorResponse: { error: string };
            Event: {
                costCents?: number | null;
                createdAt: string;
                customerId: string;
                eventType: string;
                id: string;
                inputTokens?: number | null;
                latencyMs?: number | null;
                model?: string | null;
                outputTokens?: number | null;
                properties: { [key: string]: unknown };
                provider?: string | null;
                totalTokens?: number | null;
            };
            EventsBatchPostRequest: {
                events: {
                    costCents?: number;
                    customerId: string;
                    eventType: string;
                    idempotencyKey?: string;
                    inputTokens?: number;
                    latencyMs?: number;
                    model?: string;
                    outputTokens?: number;
                    properties?: { [key: string]: unknown };
                    provider?: string;
                    timestamp?: string;
                    totalTokens?: number;
                }[];
            };
            EventsBatchPostResponse: { count: number };
            EventsPostRequest: {
                costCents?: number;
                customerId: string;
                eventType: string;
                idempotencyKey?: string;
                inputTokens?: number;
                latencyMs?: number;
                model?: string;
                outputTokens?: number;
                properties?: { [key: string]: unknown };
                provider?: string;
                timestamp?: string;
                totalTokens?: number;
            };
            EventsPostResponse: { id: string };
            PaginationCursor: { hasMore: boolean; nextCursor: string | null };
            Project: {
                createdAt: string;
                id: string;
                name: string;
                organizationId: string;
                slug: string;
                updatedAt: string;
            };
            Quota: {
                createdAt: string;
                dimensionFilters: { [key: string]: unknown };
                id: string;
                limitValue: number;
                metric: string;
                name: string;
                period: string;
                projectId: string;
                updatedAt: string;
            };
            QuotaAlert: {
                createdAt: string;
                id: string;
                lastTriggeredAt?: string
                | null;
                quotaId: string;
                threshold: number;
                updatedAt: string;
            };
            QuotaAlertLog: {
                currentUsage: number;
                id: string;
                limitValue: number;
                percentage: number;
                quotaAlertId: string;
                quotaId: string;
                threshold: number;
                triggeredAt: string;
                webhookResponseCode: number
                | null;
                webhookStatus: string;
            };
            QuotaAlertsDeleteResponse: { success: boolean };
            QuotaAlertsPostRequest: { threshold: number };
            QuotaAlertsPutRequest: { threshold?: number };
            QuotaCheckResult: {
                exceeded: boolean;
                id: string;
                limit: number;
                metric: string;
                name: string;
                period: string;
                remaining: number;
                used: number;
            };
            QuotasCheckRequest: { [key: string]: unknown };
            QuotasCheckResponse: {
                allowed: boolean;
                quotas: {
                    exceeded: boolean;
                    id: string;
                    limit: number;
                    metric: string;
                    name: string;
                    period: string;
                    remaining: number;
                    used: number;
                }[];
            };
            QuotasDeleteResponse: { success: boolean };
            QuotasPostRequest: {
                dimensionFilters: { [key: string]: unknown };
                limitValue: number;
                metric: "total_tokens" | "total_events" | "total_cost_cents";
                name: string;
                period: "hour" | "day" | "week" | "month";
            };
            QuotasPutRequest: {
                dimensionFilters?: { [key: string]: unknown };
                limitValue?: number;
                metric?: "total_tokens" | "total_events" | "total_cost_cents";
                name?: string;
                period?: "hour" | "day" | "week" | "month";
            };
            QuotaStatus: {
                exceeded: boolean;
                id: string;
                limit: number;
                metric: string;
                name: string;
                period: string;
                remaining: number;
                reset: number;
                used: number;
            };
            RateLimit: {
                createdAt: string;
                dimensionFilters: { [key: string]: unknown };
                enabled: boolean;
                id: string;
                limitValue: number;
                name: string;
                projectId: string;
                updatedAt: string;
                window: string;
            };
            RateLimitCheckResult: {
                exceeded: boolean;
                id: string;
                limit: number;
                name: string;
                remaining: number;
                reset: number;
                window: string;
            };
            RateLimitsCheckRequest: { [key: string]: unknown };
            RateLimitsCheckResponse: {
                allowed: boolean;
                rateLimits: {
                    exceeded: boolean;
                    id: string;
                    limit: number;
                    name: string;
                    remaining: number;
                    reset: number;
                    window: string;
                }[];
            };
            RateLimitsDeleteResponse: { success: boolean };
            RateLimitsPostRequest: {
                dimensionFilters: { [key: string]: unknown };
                enabled: boolean;
                limitValue: number;
                name: string;
                window: "hour" | "second" | "minute";
            };
            RateLimitsPutRequest: {
                dimensionFilters?: { [key: string]: unknown };
                enabled?: boolean;
                limitValue?: number;
                name?: string;
                window?: "hour" | "second" | "minute";
            };
            RateLimitStatus: {
                exceeded: boolean;
                id: string;
                limit: number;
                name: string;
                remaining: number;
                reset: number;
                window: string;
            };
            TrackPostErrorResponse: {
                allowed: boolean;
                error: string;
                quotas?: {
                    exceeded: boolean;
                    id: string;
                    limit: number;
                    metric: string;
                    name: string;
                    period: string;
                    remaining: number;
                    reset: number;
                    used: number;
                }[];
                rateLimits?: {
                    exceeded: boolean;
                    id: string;
                    limit: number;
                    name: string;
                    remaining: number;
                    reset: number;
                    window: string;
                }[];
            };
            TrackPostRequest: {
                costCents?: number;
                customerId: string;
                eventType: string;
                idempotencyKey?: string;
                inputTokens?: number;
                latencyMs?: number;
                model?: string;
                outputTokens?: number;
                properties?: { [key: string]: unknown };
                provider?: string;
                timestamp?: string;
                totalTokens?: number;
            };
            TrackPostResponse: {
                allowed: boolean;
                id: string;
                quotas: {
                    exceeded: boolean;
                    id: string;
                    limit: number;
                    metric: string;
                    name: string;
                    period: string;
                    remaining: number;
                    reset: number;
                    used: number;
                }[];
                rateLimits: {
                    exceeded: boolean;
                    id: string;
                    limit: number;
                    name: string;
                    remaining: number;
                    reset: number;
                    window: string;
                }[];
            };
            UsageBreakdownItem: {
                dimension?: string
                | null;
                totalCostCents: number;
                totalEvents: number;
                totalInputTokens: number;
                totalOutputTokens: number;
                totalTokens: number;
            };
            UsageBreakdownResponse: {
                data: {
                    dimension?: string
                    | null;
                    totalCostCents: number;
                    totalEvents: number;
                    totalInputTokens: number;
                    totalOutputTokens: number;
                    totalTokens: number;
                }[];
            };
            UsageSummary: {
                totalCostCents: number;
                totalEvents: number;
                totalInputTokens: number;
                totalOutputTokens: number;
                totalTokens: number;
            };
            UsageTimeseriesItem: {
                timestamp: string;
                totalCostCents: number;
                totalEvents: number;
                totalInputTokens: number;
                totalOutputTokens: number;
                totalTokens: number;
            };
            UsageTimeseriesResponse: {
                data: {
                    timestamp: string;
                    totalCostCents: number;
                    totalEvents: number;
                    totalInputTokens: number;
                    totalOutputTokens: number;
                    totalTokens: number;
                }[];
            };
        };
    }
    Index

    Properties

    headers: never
    parameters: never
    pathItems: never
    requestBodies: never
    responses: never
    schemas: {
        CustomerUsageResponse: {
            customerId: string;
            totalCostCents: number;
            totalEvents: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalTokens: number;
        };
        ErrorResponse: { error: string };
        Event: {
            costCents?: number | null;
            createdAt: string;
            customerId: string;
            eventType: string;
            id: string;
            inputTokens?: number | null;
            latencyMs?: number | null;
            model?: string | null;
            outputTokens?: number | null;
            properties: { [key: string]: unknown };
            provider?: string | null;
            totalTokens?: number | null;
        };
        EventsBatchPostRequest: {
            events: {
                costCents?: number;
                customerId: string;
                eventType: string;
                idempotencyKey?: string;
                inputTokens?: number;
                latencyMs?: number;
                model?: string;
                outputTokens?: number;
                properties?: { [key: string]: unknown };
                provider?: string;
                timestamp?: string;
                totalTokens?: number;
            }[];
        };
        EventsBatchPostResponse: { count: number };
        EventsPostRequest: {
            costCents?: number;
            customerId: string;
            eventType: string;
            idempotencyKey?: string;
            inputTokens?: number;
            latencyMs?: number;
            model?: string;
            outputTokens?: number;
            properties?: { [key: string]: unknown };
            provider?: string;
            timestamp?: string;
            totalTokens?: number;
        };
        EventsPostResponse: { id: string };
        PaginationCursor: { hasMore: boolean; nextCursor: string | null };
        Project: {
            createdAt: string;
            id: string;
            name: string;
            organizationId: string;
            slug: string;
            updatedAt: string;
        };
        Quota: {
            createdAt: string;
            dimensionFilters: { [key: string]: unknown };
            id: string;
            limitValue: number;
            metric: string;
            name: string;
            period: string;
            projectId: string;
            updatedAt: string;
        };
        QuotaAlert: {
            createdAt: string;
            id: string;
            lastTriggeredAt?: string
            | null;
            quotaId: string;
            threshold: number;
            updatedAt: string;
        };
        QuotaAlertLog: {
            currentUsage: number;
            id: string;
            limitValue: number;
            percentage: number;
            quotaAlertId: string;
            quotaId: string;
            threshold: number;
            triggeredAt: string;
            webhookResponseCode: number
            | null;
            webhookStatus: string;
        };
        QuotaAlertsDeleteResponse: { success: boolean };
        QuotaAlertsPostRequest: { threshold: number };
        QuotaAlertsPutRequest: { threshold?: number };
        QuotaCheckResult: {
            exceeded: boolean;
            id: string;
            limit: number;
            metric: string;
            name: string;
            period: string;
            remaining: number;
            used: number;
        };
        QuotasCheckRequest: { [key: string]: unknown };
        QuotasCheckResponse: {
            allowed: boolean;
            quotas: {
                exceeded: boolean;
                id: string;
                limit: number;
                metric: string;
                name: string;
                period: string;
                remaining: number;
                used: number;
            }[];
        };
        QuotasDeleteResponse: { success: boolean };
        QuotasPostRequest: {
            dimensionFilters: { [key: string]: unknown };
            limitValue: number;
            metric: "total_tokens" | "total_events" | "total_cost_cents";
            name: string;
            period: "hour" | "day" | "week" | "month";
        };
        QuotasPutRequest: {
            dimensionFilters?: { [key: string]: unknown };
            limitValue?: number;
            metric?: "total_tokens" | "total_events" | "total_cost_cents";
            name?: string;
            period?: "hour" | "day" | "week" | "month";
        };
        QuotaStatus: {
            exceeded: boolean;
            id: string;
            limit: number;
            metric: string;
            name: string;
            period: string;
            remaining: number;
            reset: number;
            used: number;
        };
        RateLimit: {
            createdAt: string;
            dimensionFilters: { [key: string]: unknown };
            enabled: boolean;
            id: string;
            limitValue: number;
            name: string;
            projectId: string;
            updatedAt: string;
            window: string;
        };
        RateLimitCheckResult: {
            exceeded: boolean;
            id: string;
            limit: number;
            name: string;
            remaining: number;
            reset: number;
            window: string;
        };
        RateLimitsCheckRequest: { [key: string]: unknown };
        RateLimitsCheckResponse: {
            allowed: boolean;
            rateLimits: {
                exceeded: boolean;
                id: string;
                limit: number;
                name: string;
                remaining: number;
                reset: number;
                window: string;
            }[];
        };
        RateLimitsDeleteResponse: { success: boolean };
        RateLimitsPostRequest: {
            dimensionFilters: { [key: string]: unknown };
            enabled: boolean;
            limitValue: number;
            name: string;
            window: "hour" | "second" | "minute";
        };
        RateLimitsPutRequest: {
            dimensionFilters?: { [key: string]: unknown };
            enabled?: boolean;
            limitValue?: number;
            name?: string;
            window?: "hour" | "second" | "minute";
        };
        RateLimitStatus: {
            exceeded: boolean;
            id: string;
            limit: number;
            name: string;
            remaining: number;
            reset: number;
            window: string;
        };
        TrackPostErrorResponse: {
            allowed: boolean;
            error: string;
            quotas?: {
                exceeded: boolean;
                id: string;
                limit: number;
                metric: string;
                name: string;
                period: string;
                remaining: number;
                reset: number;
                used: number;
            }[];
            rateLimits?: {
                exceeded: boolean;
                id: string;
                limit: number;
                name: string;
                remaining: number;
                reset: number;
                window: string;
            }[];
        };
        TrackPostRequest: {
            costCents?: number;
            customerId: string;
            eventType: string;
            idempotencyKey?: string;
            inputTokens?: number;
            latencyMs?: number;
            model?: string;
            outputTokens?: number;
            properties?: { [key: string]: unknown };
            provider?: string;
            timestamp?: string;
            totalTokens?: number;
        };
        TrackPostResponse: {
            allowed: boolean;
            id: string;
            quotas: {
                exceeded: boolean;
                id: string;
                limit: number;
                metric: string;
                name: string;
                period: string;
                remaining: number;
                reset: number;
                used: number;
            }[];
            rateLimits: {
                exceeded: boolean;
                id: string;
                limit: number;
                name: string;
                remaining: number;
                reset: number;
                window: string;
            }[];
        };
        UsageBreakdownItem: {
            dimension?: string
            | null;
            totalCostCents: number;
            totalEvents: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalTokens: number;
        };
        UsageBreakdownResponse: {
            data: {
                dimension?: string
                | null;
                totalCostCents: number;
                totalEvents: number;
                totalInputTokens: number;
                totalOutputTokens: number;
                totalTokens: number;
            }[];
        };
        UsageSummary: {
            totalCostCents: number;
            totalEvents: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalTokens: number;
        };
        UsageTimeseriesItem: {
            timestamp: string;
            totalCostCents: number;
            totalEvents: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalTokens: number;
        };
        UsageTimeseriesResponse: {
            data: {
                timestamp: string;
                totalCostCents: number;
                totalEvents: number;
                totalInputTokens: number;
                totalOutputTokens: number;
                totalTokens: number;
            }[];
        };
    }

    Type Declaration

    • CustomerUsageResponse: {
          customerId: string;
          totalCostCents: number;
          totalEvents: number;
          totalInputTokens: number;
          totalOutputTokens: number;
          totalTokens: number;
      }
      • customerId: string

        Customer identifier

      • totalCostCents: number

        Total cost in cents for this customer

      • totalEvents: number

        Total number of events for this customer

      • totalInputTokens: number

        Total input tokens consumed

      • totalOutputTokens: number

        Total output tokens generated

      • totalTokens: number

        Total tokens consumed by this customer

    • ErrorResponse: { error: string }
      {
      * "error": "Invalid request"
      * }
      • error: string

        Error message describing what went wrong

    • Event: {
          costCents?: number | null;
          createdAt: string;
          customerId: string;
          eventType: string;
          id: string;
          inputTokens?: number | null;
          latencyMs?: number | null;
          model?: string | null;
          outputTokens?: number | null;
          properties: { [key: string]: unknown };
          provider?: string | null;
          totalTokens?: number | null;
      }
      • OptionalcostCents?: number | null

        Cost in cents (if provided)

      • createdAt: string

        Format: date-time

        ISO 8601 timestamp when the event was created

      • customerId: string

        Customer identifier associated with the event

      • eventType: string

        Type of event that was recorded

      • id: string

        Unique identifier for the event

      • OptionalinputTokens?: number | null

        Input tokens consumed (if provided)

      • OptionallatencyMs?: number | null

        Request latency in milliseconds (if provided)

      • Optionalmodel?: string | null

        Model name used (if provided)

      • OptionaloutputTokens?: number | null

        Output tokens generated (if provided)

      • properties: { [key: string]: unknown }

        Custom properties/dimensions associated with the event

      • Optionalprovider?: string | null

        Provider name (if provided)

      • OptionaltotalTokens?: number | null

        Total tokens for the event

    • EventsBatchPostRequest: {
          events: {
              costCents?: number;
              customerId: string;
              eventType: string;
              idempotencyKey?: string;
              inputTokens?: number;
              latencyMs?: number;
              model?: string;
              outputTokens?: number;
              properties?: { [key: string]: unknown };
              provider?: string;
              timestamp?: string;
              totalTokens?: number;
          }[];
      }
      • events: {
            costCents?: number;
            customerId: string;
            eventType: string;
            idempotencyKey?: string;
            inputTokens?: number;
            latencyMs?: number;
            model?: string;
            outputTokens?: number;
            properties?: { [key: string]: unknown };
            provider?: string;
            timestamp?: string;
            totalTokens?: number;
        }[]

        Array of events to ingest (max 1000)

    • EventsBatchPostResponse: { count: number }
      • count: number

        Number of events successfully ingested

    • EventsPostRequest: {
          costCents?: number;
          customerId: string;
          eventType: string;
          idempotencyKey?: string;
          inputTokens?: number;
          latencyMs?: number;
          model?: string;
          outputTokens?: number;
          properties?: { [key: string]: unknown };
          provider?: string;
          timestamp?: string;
          totalTokens?: number;
      }
      • OptionalcostCents?: number

        Cost in cents (e.g., 25 = $0.25)

      • customerId: string

        Your customer's identifier (e.g., user ID, tenant ID)

      • eventType: string

        Type of event (e.g., "model_call", "embedding", "tool_call")

      • OptionalidempotencyKey?: string

        Unique key for deduplication (prevents duplicate events)

      • OptionalinputTokens?: number

        Number of input tokens consumed

      • OptionallatencyMs?: number

        Request latency in milliseconds

      • Optionalmodel?: string

        Model used (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo")

      • OptionaloutputTokens?: number

        Number of output tokens generated

      • Optionalproperties?: { [key: string]: unknown }

        Custom dimensions for filtering and grouping (e.g., user_id, team_id, feature)

      • Optionalprovider?: string

        Provider name (e.g., "openai", "anthropic", "google")

      • Optionaltimestamp?: string

        Format: date-time

        ISO 8601 timestamp (defaults to current time if not provided)

      • OptionaltotalTokens?: number

        Total tokens (auto-calculated if not provided)

    • EventsPostResponse: { id: string }
      • id: string

        Unique identifier for the ingested event

    • PaginationCursor: { hasMore: boolean; nextCursor: string | null }
      {
      * "nextCursor": "eyJpZCI6ImV2dF9hYmMxMjMifQ",
      * "hasMore": true
      * }
      • hasMore: boolean

        Whether there are more results available

      • nextCursor: string | null

        Cursor for the next page of results. Null if there are no more results.

    • Project: {
          createdAt: string;
          id: string;
          name: string;
          organizationId: string;
          slug: string;
          updatedAt: string;
      }
      • createdAt: string

        Format: date-time

        ISO 8601 timestamp when the project was created

      • id: string

        Unique identifier for the project

      • name: string

        Human-readable name of the project

      • organizationId: string

        ID of the organization that owns this project

      • slug: string

        URL-friendly identifier for the project

      • updatedAt: string

        Format: date-time

        ISO 8601 timestamp when the project was last updated

    • Quota: {
          createdAt: string;
          dimensionFilters: { [key: string]: unknown };
          id: string;
          limitValue: number;
          metric: string;
          name: string;
          period: string;
          projectId: string;
          updatedAt: string;
      }
      • createdAt: string

        Format: date-time

        ISO 8601 timestamp when the quota was created

      • dimensionFilters: { [key: string]: unknown }

        Dimension filters that determine which events match this quota (e.g., {"customer_id": "cust_123", "model": "gpt-4"})

      • id: string

        Unique identifier for the quota

      • limitValue: number

        Quota limit value

      • metric: string

        Metric being tracked (e.g., "total_tokens", "cost_cents", "total_events")

      • name: string

        Human-readable name for the quota

      • period: string

        Time period for the quota (e.g., "day", "month", "year")

      • projectId: string

        ID of the project that owns this quota

      • updatedAt: string

        Format: date-time

        ISO 8601 timestamp when the quota was last updated

    • QuotaAlert: {
          createdAt: string;
          id: string;
          lastTriggeredAt?: string | null;
          quotaId: string;
          threshold: number;
          updatedAt: string;
      }
      • createdAt: string

        Format: date-time

      • id: string
      • OptionallastTriggeredAt?: string | null

        Format: date-time

      • quotaId: string
      • threshold: number
      • updatedAt: string

        Format: date-time

    • QuotaAlertLog: {
          currentUsage: number;
          id: string;
          limitValue: number;
          percentage: number;
          quotaAlertId: string;
          quotaId: string;
          threshold: number;
          triggeredAt: string;
          webhookResponseCode: number | null;
          webhookStatus: string;
      }
      • currentUsage: number
      • id: string
      • limitValue: number
      • percentage: number
      • quotaAlertId: string
      • quotaId: string
      • threshold: number
      • triggeredAt: string

        Format: date-time

      • webhookResponseCode: number | null
      • webhookStatus: string
    • QuotaAlertsDeleteResponse: { success: boolean }
      • success: boolean

        Whether the alert was successfully deleted

    • QuotaAlertsPostRequest: { threshold: number }
      • threshold: number

        Threshold percentage (1-100) at which to trigger the alert

    • QuotaAlertsPutRequest: { threshold?: number }
      • Optionalthreshold?: number

        Threshold percentage (1-100) at which to trigger the alert

    • QuotaCheckResult: {
          exceeded: boolean;
          id: string;
          limit: number;
          metric: string;
          name: string;
          period: string;
          remaining: number;
          used: number;
      }
      • exceeded: boolean

        Whether the quota has been exceeded

      • id: string

        Unique identifier for the quota

      • limit: number

        Quota limit value

      • metric: string

        Metric being tracked

      • name: string

        Human-readable name of the quota

      • period: string

        Time period for the quota

      • remaining: number

        Remaining quota (limit - used)

      • used: number

        Current usage value

    • QuotasCheckRequest: { [key: string]: unknown }

      Dimensions object for quota matching (e.g., {"customer_id": "cust_123", "model": "gpt-4"})

    • QuotasCheckResponse: {
          allowed: boolean;
          quotas: {
              exceeded: boolean;
              id: string;
              limit: number;
              metric: string;
              name: string;
              period: string;
              remaining: number;
              used: number;
          }[];
      }
      • allowed: boolean

        Whether the quota check passed

      • quotas: {
            exceeded: boolean;
            id: string;
            limit: number;
            metric: string;
            name: string;
            period: string;
            remaining: number;
            used: number;
        }[]

        Status of all matching quotas

    • QuotasDeleteResponse: { success: boolean }
      • success: boolean

        Whether the quota was successfully deleted

    • QuotasPostRequest: {
          dimensionFilters: { [key: string]: unknown };
          limitValue: number;
          metric: "total_tokens" | "total_events" | "total_cost_cents";
          name: string;
          period: "hour" | "day" | "week" | "month";
      }
      • dimensionFilters: { [key: string]: unknown }

        Dimension filters that determine which events match this quota

        {}
        
      • limitValue: number

        Quota limit value

      • metric: "total_tokens" | "total_events" | "total_cost_cents"

        Metric being tracked

      • name: string

        Human-readable name for the quota

      • period: "hour" | "day" | "week" | "month"

        Time period for the quota

    • QuotasPutRequest: {
          dimensionFilters?: { [key: string]: unknown };
          limitValue?: number;
          metric?: "total_tokens" | "total_events" | "total_cost_cents";
          name?: string;
          period?: "hour" | "day" | "week" | "month";
      }
      • OptionaldimensionFilters?: { [key: string]: unknown }

        Dimension filters that determine which events match this quota

      • OptionallimitValue?: number

        Quota limit value

      • Optionalmetric?: "total_tokens" | "total_events" | "total_cost_cents"

        Metric being tracked

      • Optionalname?: string

        Human-readable name for the quota

      • Optionalperiod?: "hour" | "day" | "week" | "month"

        Time period for the quota

    • QuotaStatus: {
          exceeded: boolean;
          id: string;
          limit: number;
          metric: string;
          name: string;
          period: string;
          remaining: number;
          reset: number;
          used: number;
      }
      • exceeded: boolean

        Whether the quota has been exceeded

      • id: string

        Unique identifier for the quota

      • limit: number

        Quota limit value

      • metric: string

        Metric being tracked (e.g., "total_tokens", "cost_cents")

      • name: string

        Human-readable name of the quota

      • period: string

        Period for the quota (e.g., "day", "month", "year")

      • remaining: number

        Remaining quota (limit - used)

      • reset: number

        Unix timestamp when the quota period resets

      • used: number

        Current usage value

    • RateLimit: {
          createdAt: string;
          dimensionFilters: { [key: string]: unknown };
          enabled: boolean;
          id: string;
          limitValue: number;
          name: string;
          projectId: string;
          updatedAt: string;
          window: string;
      }
      • createdAt: string

        Format: date-time

        ISO 8601 timestamp when the rate limit was created

      • dimensionFilters: { [key: string]: unknown }

        Dimension filters that determine which requests match this rate limit (e.g., {"customer_id": "cust_123"})

      • enabled: boolean

        Whether the rate limit is currently enabled

      • id: string

        Unique identifier for the rate limit

      • limitValue: number

        Maximum number of requests allowed in the time window

      • name: string

        Human-readable name for the rate limit

      • projectId: string

        ID of the project that owns this rate limit

      • updatedAt: string

        Format: date-time

        ISO 8601 timestamp when the rate limit was last updated

      • window: string

        Time window for the rate limit (e.g., "1m", "1h", "1d")

    • RateLimitCheckResult: {
          exceeded: boolean;
          id: string;
          limit: number;
          name: string;
          remaining: number;
          reset: number;
          window: string;
      }
      • exceeded: boolean

        Whether the rate limit has been exceeded

      • id: string

        Unique identifier for the rate limit

      • limit: number

        Maximum requests allowed in the window

      • name: string

        Human-readable name of the rate limit

      • remaining: number

        Number of requests remaining in the current window

      • reset: number

        Unix timestamp when the rate limit window resets

      • window: string

        Time window for the rate limit

    • RateLimitsCheckRequest: { [key: string]: unknown }

      Dimensions object for rate limit matching (e.g., {"customer_id": "cust_123"})

    • RateLimitsCheckResponse: {
          allowed: boolean;
          rateLimits: {
              exceeded: boolean;
              id: string;
              limit: number;
              name: string;
              remaining: number;
              reset: number;
              window: string;
          }[];
      }
      • allowed: boolean

        Whether the rate limit check passed

      • rateLimits: {
            exceeded: boolean;
            id: string;
            limit: number;
            name: string;
            remaining: number;
            reset: number;
            window: string;
        }[]

        Status of all matching rate limits

    • RateLimitsDeleteResponse: { success: boolean }
      • success: boolean

        Whether the rate limit was successfully deleted

    • RateLimitsPostRequest: {
          dimensionFilters: { [key: string]: unknown };
          enabled: boolean;
          limitValue: number;
          name: string;
          window: "hour" | "second" | "minute";
      }
      • dimensionFilters: { [key: string]: unknown }

        Dimension filters that determine which requests match this rate limit

        {}
        
      • enabled: boolean

        Whether the rate limit is enabled

        true
        
      • limitValue: number

        Maximum number of requests allowed in the time window

      • name: string

        Human-readable name for the rate limit

      • window: "hour" | "second" | "minute"

        Time window for the rate limit

    • RateLimitsPutRequest: {
          dimensionFilters?: { [key: string]: unknown };
          enabled?: boolean;
          limitValue?: number;
          name?: string;
          window?: "hour" | "second" | "minute";
      }
      • OptionaldimensionFilters?: { [key: string]: unknown }

        Dimension filters that determine which requests match this rate limit

      • Optionalenabled?: boolean

        Whether the rate limit is enabled

      • OptionallimitValue?: number

        Maximum number of requests allowed in the time window

      • Optionalname?: string

        Human-readable name for the rate limit

      • Optionalwindow?: "hour" | "second" | "minute"

        Time window for the rate limit

    • RateLimitStatus: {
          exceeded: boolean;
          id: string;
          limit: number;
          name: string;
          remaining: number;
          reset: number;
          window: string;
      }
      • exceeded: boolean

        Whether the rate limit has been exceeded

      • id: string

        Unique identifier for the rate limit

      • limit: number

        Maximum number of requests allowed in the window

      • name: string

        Human-readable name of the rate limit

      • remaining: number

        Number of requests remaining in the current window

      • reset: number

        Unix timestamp when the rate limit window resets

      • window: string

        Time window for the rate limit (e.g., "1m", "1h", "1d")

    • TrackPostErrorResponse: {
          allowed: boolean;
          error: string;
          quotas?: {
              exceeded: boolean;
              id: string;
              limit: number;
              metric: string;
              name: string;
              period: string;
              remaining: number;
              reset: number;
              used: number;
          }[];
          rateLimits?: {
              exceeded: boolean;
              id: string;
              limit: number;
              name: string;
              remaining: number;
              reset: number;
              window: string;
          }[];
      }
      • allowed: boolean

        Whether the request was allowed (always false for 429 responses)

      • error: string

        Error message indicating which limit was exceeded

      • Optionalquotas?: {
            exceeded: boolean;
            id: string;
            limit: number;
            metric: string;
            name: string;
            period: string;
            remaining: number;
            reset: number;
            used: number;
        }[]

        Status of all matching quotas

      • OptionalrateLimits?: {
            exceeded: boolean;
            id: string;
            limit: number;
            name: string;
            remaining: number;
            reset: number;
            window: string;
        }[]

        Status of all matching rate limits

    • TrackPostRequest: {
          costCents?: number;
          customerId: string;
          eventType: string;
          idempotencyKey?: string;
          inputTokens?: number;
          latencyMs?: number;
          model?: string;
          outputTokens?: number;
          properties?: { [key: string]: unknown };
          provider?: string;
          timestamp?: string;
          totalTokens?: number;
      }
      • OptionalcostCents?: number

        Cost in cents (e.g., 25 = $0.25)

      • customerId: string

        Your customer's identifier (e.g., user ID, tenant ID)

      • eventType: string

        Type of event (e.g., "model_call", "embedding", "tool_call")

      • OptionalidempotencyKey?: string

        Unique key for deduplication (prevents duplicate events)

      • OptionalinputTokens?: number

        Number of input tokens consumed

      • OptionallatencyMs?: number

        Request latency in milliseconds

      • Optionalmodel?: string

        Model used (e.g., "gpt-4", "claude-3-opus", "gpt-3.5-turbo")

      • OptionaloutputTokens?: number

        Number of output tokens generated

      • Optionalproperties?: { [key: string]: unknown }

        Custom dimensions for quota/rate limit matching (e.g., user_id, team_id, feature)

      • Optionalprovider?: string

        Provider name (e.g., "openai", "anthropic", "google")

      • Optionaltimestamp?: string

        Format: date-time

        ISO 8601 timestamp (defaults to current time if not provided)

      • OptionaltotalTokens?: number

        Total tokens (auto-calculated if not provided)

    • TrackPostResponse: {
          allowed: boolean;
          id: string;
          quotas: {
              exceeded: boolean;
              id: string;
              limit: number;
              metric: string;
              name: string;
              period: string;
              remaining: number;
              reset: number;
              used: number;
          }[];
          rateLimits: {
              exceeded: boolean;
              id: string;
              limit: number;
              name: string;
              remaining: number;
              reset: number;
              window: string;
          }[];
      }
      • allowed: boolean

        Whether the request was allowed (always true for 201 responses)

      • id: string

        Unique identifier for the ingested event

      • quotas: {
            exceeded: boolean;
            id: string;
            limit: number;
            metric: string;
            name: string;
            period: string;
            remaining: number;
            reset: number;
            used: number;
        }[]

        Status of all matching quotas

      • rateLimits: {
            exceeded: boolean;
            id: string;
            limit: number;
            name: string;
            remaining: number;
            reset: number;
            window: string;
        }[]

        Status of all matching rate limits

    • UsageBreakdownItem: {
          dimension?: string | null;
          totalCostCents: number;
          totalEvents: number;
          totalInputTokens: number;
          totalOutputTokens: number;
          totalTokens: number;
      }
      • Optionaldimension?: string | null

        Dimension value (e.g., model name, customer ID)

      • totalCostCents: number

        Total cost in cents

      • totalEvents: number

        Total events for this dimension

      • totalInputTokens: number

        Total input tokens

      • totalOutputTokens: number

        Total output tokens

      • totalTokens: number

        Total tokens for this dimension

    • UsageBreakdownResponse: {
          data: {
              dimension?: string | null;
              totalCostCents: number;
              totalEvents: number;
              totalInputTokens: number;
              totalOutputTokens: number;
              totalTokens: number;
          }[];
      }
      • data: {
            dimension?: string | null;
            totalCostCents: number;
            totalEvents: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalTokens: number;
        }[]

        Array of usage breakdown by dimension

    • UsageSummary: {
          totalCostCents: number;
          totalEvents: number;
          totalInputTokens: number;
          totalOutputTokens: number;
          totalTokens: number;
      }
      • totalCostCents: number

        Total cost in cents across all events

      • totalEvents: number

        Total number of events in the time range

      • totalInputTokens: number

        Total input tokens consumed

      • totalOutputTokens: number

        Total output tokens generated

      • totalTokens: number

        Total tokens consumed across all events

    • UsageTimeseriesItem: {
          timestamp: string;
          totalCostCents: number;
          totalEvents: number;
          totalInputTokens: number;
          totalOutputTokens: number;
          totalTokens: number;
      }
      • timestamp: string

        Format: date-time

        Timestamp for this data point

      • totalCostCents: number

        Total cost in cents

      • totalEvents: number

        Total events in this time bucket

      • totalInputTokens: number

        Total input tokens

      • totalOutputTokens: number

        Total output tokens

      • totalTokens: number

        Total tokens in this time bucket

    • UsageTimeseriesResponse: {
          data: {
              timestamp: string;
              totalCostCents: number;
              totalEvents: number;
              totalInputTokens: number;
              totalOutputTokens: number;
              totalTokens: number;
          }[];
      }
      • data: {
            timestamp: string;
            totalCostCents: number;
            totalEvents: number;
            totalInputTokens: number;
            totalOutputTokens: number;
            totalTokens: number;
        }[]

        Array of usage data over time