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

    Interface paths

    This file was auto-generated by openapi-typescript. Do not make direct changes to the file.

    interface paths {
        "/customers/{customerId}/usage": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { customerId: string };
                    query: { endDate: string; startDate: string };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                customerId: string;
                                totalCostCents: number;
                                totalEvents: number;
                                totalInputTokens: number;
                                totalOutputTokens: number;
                                totalTokens: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/events": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: {
                        cursor?: string;
                        customerId?: string;
                        eventType?: string;
                        limit?: string;
                        model?: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": { hasMore: boolean; nextCursor: string
                            | null } & {
                                data: {
                                    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;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            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;
                        };
                    };
                };
                responses: {
                    "201": {
                        content: { "application/json": { id: string } };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/events/batch": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            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;
                            }[];
                        };
                    };
                };
                responses: {
                    "201": {
                        content: { "application/json": { count: number } };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/project": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                id: string;
                                name: string;
                                organizationId: string;
                                slug: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/quota-alerts/{alertId}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { alertId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: { "application/json": { success: boolean } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { alertId: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                id: string;
                                lastTriggeredAt?: string
                                | null;
                                quotaId: string;
                                threshold: number;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { alertId: string };
                    query?: undefined;
                };
                requestBody?: { content: { "application/json": { threshold?: number } } };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                id: string;
                                lastTriggeredAt?: string | null;
                                quotaId: string;
                                threshold: number;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            trace?: undefined;
        };
        "/quota-alerts/{alertId}/history": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { alertId: string };
                    query?: { cursor?: string; limit?: string };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": { hasMore: boolean; nextCursor: string
                            | null } & {
                                data: {
                                    currentUsage: number;
                                    id: string;
                                    limitValue: number;
                                    percentage: number;
                                    quotaAlertId: string;
                                    quotaId: string;
                                    threshold: number;
                                    triggeredAt: string;
                                    webhookResponseCode: number | null;
                                    webhookStatus: string;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/quotas": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: { cursor?: string; limit?: string };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": { hasMore: boolean; nextCursor: string
                            | null } & {
                                data: {
                                    createdAt: string;
                                    dimensionFilters: { [key: string]: unknown };
                                    id: string;
                                    limitValue: number;
                                    metric: string;
                                    name: string;
                                    period: string;
                                    projectId: string;
                                    updatedAt: string;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            dimensionFilters: { [key: string]: unknown };
                            limitValue: number;
                            metric: "total_tokens" | "total_events" | "total_cost_cents";
                            name: string;
                            period: "hour" | "day" | "week" | "month";
                        };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                id: string;
                                limitValue: number;
                                metric: string;
                                name: string;
                                period: string;
                                projectId: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/quotas/{id}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { id: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: { "application/json": { success: boolean } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { id: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                id: string;
                                limitValue: number;
                                metric: string;
                                name: string;
                                period: string;
                                projectId: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { id: string };
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            dimensionFilters?: { [key: string]: unknown };
                            limitValue?: number;
                            metric?: "total_tokens" | "total_events" | "total_cost_cents";
                            name?: string;
                            period?: "hour" | "day" | "week" | "month";
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                id: string;
                                limitValue: number;
                                metric: string;
                                name: string;
                                period: string;
                                projectId: string;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            trace?: undefined;
        };
        "/quotas/{quotaId}/alerts": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { quotaId: string };
                    query?: { cursor?: string; limit?: string };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": { hasMore: boolean; nextCursor: string
                            | null } & {
                                data: {
                                    createdAt: string;
                                    id: string;
                                    lastTriggeredAt?: string | null;
                                    quotaId: string;
                                    threshold: number;
                                    updatedAt: string;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { quotaId: string };
                    query?: undefined;
                };
                requestBody?: { content: { "application/json": { threshold: number } } };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                id: string;
                                lastTriggeredAt?: string | null;
                                quotaId: string;
                                threshold: number;
                                updatedAt: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/quotas/check": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: { "application/json": { [key: string]: unknown } };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                allowed: boolean;
                                quotas: {
                                    exceeded: boolean;
                                    id: string;
                                    limit: number;
                                    metric: string;
                                    name: string;
                                    period: string;
                                    remaining: number;
                                    used: number;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/rate-limits": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: { cursor?: string; limit?: string };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": { hasMore: boolean; nextCursor: string
                            | null } & {
                                data: {
                                    createdAt: string;
                                    dimensionFilters: { [key: string]: unknown };
                                    enabled: boolean;
                                    id: string;
                                    limitValue: number;
                                    name: string;
                                    projectId: string;
                                    updatedAt: string;
                                    window: string;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            dimensionFilters: { [key: string]: unknown };
                            enabled: boolean;
                            limitValue: number;
                            name: string;
                            window: "hour" | "second" | "minute";
                        };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                enabled: boolean;
                                id: string;
                                limitValue: number;
                                name: string;
                                projectId: string;
                                updatedAt: string;
                                window: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/rate-limits/{id}": {
            delete: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { id: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: { "application/json": { success: boolean } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { id: string };
                    query?: undefined;
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                enabled: boolean;
                                id: string;
                                limitValue: number;
                                name: string;
                                projectId: string;
                                updatedAt: string;
                                window: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path: { id: string };
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            dimensionFilters?: { [key: string]: unknown };
                            enabled?: boolean;
                            limitValue?: number;
                            name?: string;
                            window?: "hour" | "second" | "minute";
                        };
                    };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                enabled: boolean;
                                id: string;
                                limitValue: number;
                                name: string;
                                projectId: string;
                                updatedAt: string;
                                window: string;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "404": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            trace?: undefined;
        };
        "/rate-limits/check": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: { "application/json": { [key: string]: unknown } };
                };
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                allowed: boolean;
                                rateLimits: {
                                    exceeded: boolean;
                                    id: string;
                                    limit: number;
                                    name: string;
                                    remaining: number;
                                    reset: number;
                                    window: string;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/track": {
            delete?: undefined;
            get?: undefined;
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query?: undefined;
                };
                requestBody?: {
                    content: {
                        "application/json": {
                            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;
                        };
                    };
                };
                responses: {
                    "201": {
                        content: {
                            "application/json": {
                                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;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "429": {
                        content: {
                            "application/json": {
                                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;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            put?: undefined;
            trace?: undefined;
        };
        "/usage": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query: {
                        customerId?: string;
                        endDate: string;
                        eventType?: string;
                        model?: string;
                        startDate: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                totalCostCents: number;
                                totalEvents: number;
                                totalInputTokens: number;
                                totalOutputTokens: number;
                                totalTokens: number;
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/usage/breakdown": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query: {
                        customerId?: string;
                        endDate: string;
                        eventType?: string;
                        groupBy: "model"
                        | "customer_id"
                        | "event_type"
                        | "provider";
                        model?: string;
                        startDate: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                data: {
                                    dimension?: string
                                    | null;
                                    totalCostCents: number;
                                    totalEvents: number;
                                    totalInputTokens: number;
                                    totalOutputTokens: number;
                                    totalTokens: number;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
        "/usage/timeseries": {
            delete?: undefined;
            get: {
                parameters: {
                    cookie?: undefined;
                    header?: undefined;
                    path?: undefined;
                    query: {
                        customerId?: string;
                        endDate: string;
                        eventType?: string;
                        interval: "hour"
                        | "day"
                        | "week";
                        model?: string;
                        startDate: string;
                    };
                };
                requestBody?: undefined;
                responses: {
                    "200": {
                        content: {
                            "application/json": {
                                data: {
                                    timestamp: string;
                                    totalCostCents: number;
                                    totalEvents: number;
                                    totalInputTokens: number;
                                    totalOutputTokens: number;
                                    totalTokens: number;
                                }[];
                            };
                        };
                        headers: { [name: string]: unknown };
                    };
                    "400": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                    "401": {
                        content: { "application/json": { error: string } };
                        headers: { [name: string]: unknown };
                    };
                };
            };
            head?: undefined;
            options?: undefined;
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            patch?: undefined;
            post?: undefined;
            put?: undefined;
            trace?: undefined;
        };
    }
    Index

    Properties

    "/customers/{customerId}/usage": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { customerId: string };
                query: { endDate: string; startDate: string };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            customerId: string;
                            totalCostCents: number;
                            totalEvents: number;
                            totalInputTokens: number;
                            totalOutputTokens: number;
                            totalTokens: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { customerId: string };
              query: { endDate: string; startDate: string };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          customerId: string;
                          totalCostCents: number;
                          totalEvents: number;
                          totalInputTokens: number;
                          totalOutputTokens: number;
                          totalTokens: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get customer usage

      Retrieve usage summary for a specific customer within a date range.

      This endpoint provides aggregated metrics for a single customer, making it ideal for:
      - Customer billing and invoicing
      - Per-tenant usage dashboards
      - Customer-specific analytics
      - Usage-based pricing calculations
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { customerId: string };
            query: { endDate: string; startDate: string };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { customerId: string }
          • customerId: string

            Customer identifier to get usage for

        • query: { endDate: string; startDate: string }
          • endDate: string

            End of the date range (ISO 8601 format)

          • startDate: string

            Start of the date range (ISO 8601 format)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        customerId: string;
                        totalCostCents: number;
                        totalEvents: number;
                        totalInputTokens: number;
                        totalOutputTokens: number;
                        totalTokens: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      customerId: string;
                      totalCostCents: number;
                      totalEvents: number;
                      totalInputTokens: number;
                      totalOutputTokens: number;
                      totalTokens: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Customer usage summary

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/events": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: {
                    cursor?: string;
                    customerId?: string;
                    eventType?: string;
                    limit?: string;
                    model?: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": { hasMore: boolean; nextCursor: string
                        | null } & {
                            data: {
                                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;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        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;
                    };
                };
            };
            responses: {
                "201": {
                    content: { "application/json": { id: string } };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: {
                  cursor?: string;
                  customerId?: string;
                  eventType?: string;
                  limit?: string;
                  model?: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": { hasMore: boolean; nextCursor: string
                      | null } & {
                          data: {
                              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;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List usage events

      Retrieve a paginated list of usage events with optional filtering.

      Use cursor-based pagination by passing the `nextCursor` from the previous response. You can filter events by customer, event type, or model.
      
      **Pagination:**
      - Use the `cursor` parameter from the previous response's `nextCursor` field
      - The `hasMore` field indicates if there are more results
      - Maximum limit is 100 events per request
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: {
                cursor?: string;
                customerId?: string;
                eventType?: string;
                limit?: string;
                model?: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • Optionalpath?: undefined
        • Optionalquery?: {
              cursor?: string;
              customerId?: string;
              eventType?: string;
              limit?: string;
              model?: string;
          }
          • Optionalcursor?: string

            Pagination cursor from the previous response

          • OptionalcustomerId?: string

            Filter events by customer ID

          • OptionaleventType?: string

            Filter events by type (e.g., "model_call", "embedding")

          • Optionallimit?: string

            Maximum number of events to return (1-100, default: 50)

          • Optionalmodel?: string

            Filter events by model name (e.g., "gpt-4", "claude-3")

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": { hasMore: boolean; nextCursor: string | null } & {
                        data: {
                            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;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": { hasMore: boolean; nextCursor: string | null } & {
                      data: {
                          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;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          List of events

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      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;
                  };
              };
          };
          responses: {
              "201": {
                  content: { "application/json": { id: string } };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Ingest a usage event

      Record a single usage event for metering and analytics.

      This endpoint only records the event without checking quotas or rate limits. For quota enforcement and rate limiting, use `POST /v1/track` instead.
      
      **When to use this endpoint:**
      - Recording events for analytics only
      - Post-event tracking after successful operations
      - Bulk ingestion without enforcement
      
      **When to use /v1/track instead:**
      - Need quota enforcement before processing
      - Need rate limit checking
      - Want all-in-one tracking with enforcement
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    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;
                };
            };
        }
      • responses: {
            "201": {
                content: { "application/json": { id: string } };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: { "application/json": { id: string } };
              headers: { [name: string]: unknown };
          }

          Event ingested successfully

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid request body

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/events/batch": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        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;
                        }[];
                    };
                };
            };
            responses: {
                "201": {
                    content: { "application/json": { count: number } };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      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;
                      }[];
                  };
              };
          };
          responses: {
              "201": {
                  content: { "application/json": { count: number } };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Ingest multiple usage events

      Record multiple usage events in a single request for efficient bulk ingestion.

      **Limits:**
      - Maximum 1000 events per batch
      - Events are processed asynchronously
      - All events must be valid or the entire batch will be rejected
      
      **Use cases:**
      - Bulk import of historical data
      - Batch processing of events
      - High-throughput event ingestion
      
      For quota enforcement and rate limiting, use `POST /v1/track` instead.
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    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;
                    }[];
                };
            };
        }
      • responses: {
            "201": {
                content: { "application/json": { count: number } };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: { "application/json": { count: number } };
              headers: { [name: string]: unknown };
          }

          Events ingested successfully

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid request body

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/project": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            id: string;
                            name: string;
                            organizationId: string;
                            slug: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          id: string;
                          name: string;
                          organizationId: string;
                          slug: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get current project

      Returns the project associated with the API key used for authentication.

      The project contains metadata about your organization's configuration, including:
      - Project ID and organization ID
      - Project name and slug
      - Creation and update timestamps
      
      This endpoint is useful for verifying your API key is valid and retrieving project details.
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        id: string;
                        name: string;
                        organizationId: string;
                        slug: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      id: string;
                      name: string;
                      organizationId: string;
                      slug: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Project found

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Project not found

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/quota-alerts/{alertId}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { alertId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { success: boolean } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { alertId: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            id: string;
                            lastTriggeredAt?: string
                            | null;
                            quotaId: string;
                            threshold: number;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { alertId: string };
                query?: undefined;
            };
            requestBody?: { content: { "application/json": { threshold?: number } } };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            id: string;
                            lastTriggeredAt?: string | null;
                            quotaId: string;
                            threshold: number;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        trace?: undefined;
    }

    Type Declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { alertId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: { "application/json": { success: boolean } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a quota alert

      Remove an alert configuration

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { alertId: string };
            query?: undefined;
        }
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: { "application/json": { success: boolean } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: { "application/json": { success: boolean } };
              headers: { [name: string]: unknown };
          }

          Alert deleted successfully

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Alert not found

    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { alertId: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          id: string;
                          lastTriggeredAt?: string
                          | null;
                          quotaId: string;
                          threshold: number;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a quota alert

      Get details of a specific alert

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { alertId: string };
            query?: undefined;
        }
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        id: string;
                        lastTriggeredAt?: string | null;
                        quotaId: string;
                        threshold: number;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      id: string;
                      lastTriggeredAt?: string | null;
                      quotaId: string;
                      threshold: number;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Alert details

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Alert not found

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • put: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { alertId: string };
              query?: undefined;
          };
          requestBody?: { content: { "application/json": { threshold?: number } } };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          id: string;
                          lastTriggeredAt?: string | null;
                          quotaId: string;
                          threshold: number;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update a quota alert

      Update the threshold for an alert

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { alertId: string };
            query?: undefined;
        }
      • OptionalrequestBody?: { content: { "application/json": { threshold?: number } } }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        id: string;
                        lastTriggeredAt?: string | null;
                        quotaId: string;
                        threshold: number;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      id: string;
                      lastTriggeredAt?: string | null;
                      quotaId: string;
                      threshold: number;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Alert updated successfully

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Alert not found

    • Optionaltrace?: undefined
    "/quota-alerts/{alertId}/history": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { alertId: string };
                query?: { cursor?: string; limit?: string };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": { hasMore: boolean; nextCursor: string
                        | null } & {
                            data: {
                                currentUsage: number;
                                id: string;
                                limitValue: number;
                                percentage: number;
                                quotaAlertId: string;
                                quotaId: string;
                                threshold: number;
                                triggeredAt: string;
                                webhookResponseCode: number | null;
                                webhookStatus: string;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { alertId: string };
              query?: { cursor?: string; limit?: string };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": { hasMore: boolean; nextCursor: string
                      | null } & {
                          data: {
                              currentUsage: number;
                              id: string;
                              limitValue: number;
                              percentage: number;
                              quotaAlertId: string;
                              quotaId: string;
                              threshold: number;
                              triggeredAt: string;
                              webhookResponseCode: number | null;
                              webhookStatus: string;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get alert history

      View a log of triggered alerts for a specific alert

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { alertId: string };
            query?: { cursor?: string; limit?: string };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { alertId: string }
        • Optionalquery?: { cursor?: string; limit?: string }
          • Optionalcursor?: string

            Pagination cursor from the previous response

          • Optionallimit?: string

            Maximum number of log entries to return (1-100, default: 50)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": { hasMore: boolean; nextCursor: string | null } & {
                        data: {
                            currentUsage: number;
                            id: string;
                            limitValue: number;
                            percentage: number;
                            quotaAlertId: string;
                            quotaId: string;
                            threshold: number;
                            triggeredAt: string;
                            webhookResponseCode: number | null;
                            webhookStatus: string;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": { hasMore: boolean; nextCursor: string | null } & {
                      data: {
                          currentUsage: number;
                          id: string;
                          limitValue: number;
                          percentage: number;
                          quotaAlertId: string;
                          quotaId: string;
                          threshold: number;
                          triggeredAt: string;
                          webhookResponseCode: number | null;
                          webhookStatus: string;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Alert history

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Alert not found

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/quotas": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: { cursor?: string; limit?: string };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": { hasMore: boolean; nextCursor: string
                        | null } & {
                            data: {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                id: string;
                                limitValue: number;
                                metric: string;
                                name: string;
                                period: string;
                                projectId: string;
                                updatedAt: string;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        dimensionFilters: { [key: string]: unknown };
                        limitValue: number;
                        metric: "total_tokens" | "total_events" | "total_cost_cents";
                        name: string;
                        period: "hour" | "day" | "week" | "month";
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            id: string;
                            limitValue: number;
                            metric: string;
                            name: string;
                            period: string;
                            projectId: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: { cursor?: string; limit?: string };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": { hasMore: boolean; nextCursor: string
                      | null } & {
                          data: {
                              createdAt: string;
                              dimensionFilters: { [key: string]: unknown };
                              id: string;
                              limitValue: number;
                              metric: string;
                              name: string;
                              period: string;
                              projectId: string;
                              updatedAt: string;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List quotas

      List all quotas for the project.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: { cursor?: string; limit?: string };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • Optionalpath?: undefined
        • Optionalquery?: { cursor?: string; limit?: string }
          • Optionalcursor?: string

            Pagination cursor from the previous response

          • Optionallimit?: string

            Maximum number of quotas to return (1-100, default: 50)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": { hasMore: boolean; nextCursor: string | null } & {
                        data: {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            id: string;
                            limitValue: number;
                            metric: string;
                            name: string;
                            period: string;
                            projectId: string;
                            updatedAt: string;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": { hasMore: boolean; nextCursor: string | null } & {
                      data: {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          id: string;
                          limitValue: number;
                          metric: string;
                          name: string;
                          period: string;
                          projectId: string;
                          updatedAt: string;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          List of quotas

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      dimensionFilters: { [key: string]: unknown };
                      limitValue: number;
                      metric: "total_tokens" | "total_events" | "total_cost_cents";
                      name: string;
                      period: "hour" | "day" | "week" | "month";
                  };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          id: string;
                          limitValue: number;
                          metric: string;
                          name: string;
                          period: string;
                          projectId: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Create a quota

      Create a new usage quota with dimension filters.

      Quotas allow you to limit usage based on metrics like total tokens, cost, or event count. You can apply quotas to specific customers, models, event types, or any combination using dimension filters.
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    dimensionFilters: { [key: string]: unknown };
                    limitValue: number;
                    metric: "total_tokens" | "total_events" | "total_cost_cents";
                    name: string;
                    period: "hour" | "day" | "week" | "month";
                };
            };
        }
      • responses: {
            "201": {
                content: {
                    "application/json": {
                        createdAt: string;
                        dimensionFilters: { [key: string]: unknown };
                        id: string;
                        limitValue: number;
                        metric: string;
                        name: string;
                        period: string;
                        projectId: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      createdAt: string;
                      dimensionFilters: { [key: string]: unknown };
                      id: string;
                      limitValue: number;
                      metric: string;
                      name: string;
                      period: string;
                      projectId: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Quota created

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid request

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/quotas/{id}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { id: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { success: boolean } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { id: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            id: string;
                            limitValue: number;
                            metric: string;
                            name: string;
                            period: string;
                            projectId: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { id: string };
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        dimensionFilters?: { [key: string]: unknown };
                        limitValue?: number;
                        metric?: "total_tokens" | "total_events" | "total_cost_cents";
                        name?: string;
                        period?: "hour" | "day" | "week" | "month";
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            id: string;
                            limitValue: number;
                            metric: string;
                            name: string;
                            period: string;
                            projectId: string;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        trace?: undefined;
    }

    Type Declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { id: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: { "application/json": { success: boolean } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a quota

      Delete a quota by ID.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { id: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { id: string }
          • id: string

            Unique identifier for the quota

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: { "application/json": { success: boolean } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: { "application/json": { success: boolean } };
              headers: { [name: string]: unknown };
          }

          Quota deleted

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Quota not found

    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { id: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          id: string;
                          limitValue: number;
                          metric: string;
                          name: string;
                          period: string;
                          projectId: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a quota

      Get a specific quota by ID.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { id: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { id: string }
          • id: string

            Unique identifier for the quota

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        dimensionFilters: { [key: string]: unknown };
                        id: string;
                        limitValue: number;
                        metric: string;
                        name: string;
                        period: string;
                        projectId: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      dimensionFilters: { [key: string]: unknown };
                      id: string;
                      limitValue: number;
                      metric: string;
                      name: string;
                      period: string;
                      projectId: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Quota found

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Quota not found

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • put: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { id: string };
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      dimensionFilters?: { [key: string]: unknown };
                      limitValue?: number;
                      metric?: "total_tokens" | "total_events" | "total_cost_cents";
                      name?: string;
                      period?: "hour" | "day" | "week" | "month";
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          id: string;
                          limitValue: number;
                          metric: string;
                          name: string;
                          period: string;
                          projectId: string;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update a quota

      Update an existing quota.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { id: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { id: string }
          • id: string

            Unique identifier for the quota

        • Optionalquery?: undefined
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    dimensionFilters?: { [key: string]: unknown };
                    limitValue?: number;
                    metric?: "total_tokens" | "total_events" | "total_cost_cents";
                    name?: string;
                    period?: "hour" | "day" | "week" | "month";
                };
            };
        }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        dimensionFilters: { [key: string]: unknown };
                        id: string;
                        limitValue: number;
                        metric: string;
                        name: string;
                        period: string;
                        projectId: string;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      dimensionFilters: { [key: string]: unknown };
                      id: string;
                      limitValue: number;
                      metric: string;
                      name: string;
                      period: string;
                      projectId: string;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Quota updated

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Quota not found

    • Optionaltrace?: undefined
    "/quotas/{quotaId}/alerts": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { quotaId: string };
                query?: { cursor?: string; limit?: string };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": { hasMore: boolean; nextCursor: string
                        | null } & {
                            data: {
                                createdAt: string;
                                id: string;
                                lastTriggeredAt?: string | null;
                                quotaId: string;
                                threshold: number;
                                updatedAt: string;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { quotaId: string };
                query?: undefined;
            };
            requestBody?: { content: { "application/json": { threshold: number } } };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            id: string;
                            lastTriggeredAt?: string | null;
                            quotaId: string;
                            threshold: number;
                            updatedAt: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { quotaId: string };
              query?: { cursor?: string; limit?: string };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": { hasMore: boolean; nextCursor: string
                      | null } & {
                          data: {
                              createdAt: string;
                              id: string;
                              lastTriggeredAt?: string | null;
                              quotaId: string;
                              threshold: number;
                              updatedAt: string;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List quota alerts

      Get all alerts configured for a quota

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { quotaId: string };
            query?: { cursor?: string; limit?: string };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { quotaId: string }
        • Optionalquery?: { cursor?: string; limit?: string }
          • Optionalcursor?: string

            Pagination cursor from the previous response

          • Optionallimit?: string

            Maximum number of alerts to return (1-100, default: 50)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": { hasMore: boolean; nextCursor: string | null } & {
                        data: {
                            createdAt: string;
                            id: string;
                            lastTriggeredAt?: string | null;
                            quotaId: string;
                            threshold: number;
                            updatedAt: string;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": { hasMore: boolean; nextCursor: string | null } & {
                      data: {
                          createdAt: string;
                          id: string;
                          lastTriggeredAt?: string | null;
                          quotaId: string;
                          threshold: number;
                          updatedAt: string;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          List of alerts

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { quotaId: string };
              query?: undefined;
          };
          requestBody?: { content: { "application/json": { threshold: number } } };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          id: string;
                          lastTriggeredAt?: string | null;
                          quotaId: string;
                          threshold: number;
                          updatedAt: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Create a quota alert

      Configure an alert for when a quota reaches a threshold. Alerts are sent to all active project webhooks.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { quotaId: string };
            query?: undefined;
        }
      • OptionalrequestBody?: { content: { "application/json": { threshold: number } } }
      • responses: {
            "201": {
                content: {
                    "application/json": {
                        createdAt: string;
                        id: string;
                        lastTriggeredAt?: string | null;
                        quotaId: string;
                        threshold: number;
                        updatedAt: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      createdAt: string;
                      id: string;
                      lastTriggeredAt?: string | null;
                      quotaId: string;
                      threshold: number;
                      updatedAt: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Alert created successfully

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid request body

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/quotas/check": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: { "application/json": { [key: string]: unknown } };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            allowed: boolean;
                            quotas: {
                                exceeded: boolean;
                                id: string;
                                limit: number;
                                metric: string;
                                name: string;
                                period: string;
                                remaining: number;
                                used: number;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: { "application/json": { [key: string]: unknown } };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          allowed: boolean;
                          quotas: {
                              exceeded: boolean;
                              id: string;
                              limit: number;
                              metric: string;
                              name: string;
                              period: string;
                              remaining: number;
                              used: number;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Check quotas

      Check usage against all matching quotas for the given dimensions without consuming quota.

      This endpoint allows you to query quota status without actually recording usage. Useful for:
      - Pre-flight checks before processing requests
      - Displaying quota status to users
      - Monitoring quota consumption
      
      **Dimension Matching:**
      Quotas are matched based on dimension filters. Pass dimensions like:
      - `customer_id`: Filter by customer
      - `event_type`: Filter by event type
      - `model`: Filter by model
      - `provider`: Filter by provider
      - Any custom dimension from event properties
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: { content: { "application/json": { [key: string]: unknown } } }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        allowed: boolean;
                        quotas: {
                            exceeded: boolean;
                            id: string;
                            limit: number;
                            metric: string;
                            name: string;
                            period: string;
                            remaining: number;
                            used: number;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      allowed: boolean;
                      quotas: {
                          exceeded: boolean;
                          id: string;
                          limit: number;
                          metric: string;
                          name: string;
                          period: string;
                          remaining: number;
                          used: number;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Quota check result

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/rate-limits": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: { cursor?: string; limit?: string };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": { hasMore: boolean; nextCursor: string
                        | null } & {
                            data: {
                                createdAt: string;
                                dimensionFilters: { [key: string]: unknown };
                                enabled: boolean;
                                id: string;
                                limitValue: number;
                                name: string;
                                projectId: string;
                                updatedAt: string;
                                window: string;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        dimensionFilters: { [key: string]: unknown };
                        enabled: boolean;
                        limitValue: number;
                        name: string;
                        window: "hour" | "second" | "minute";
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            enabled: boolean;
                            id: string;
                            limitValue: number;
                            name: string;
                            projectId: string;
                            updatedAt: string;
                            window: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: { cursor?: string; limit?: string };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": { hasMore: boolean; nextCursor: string
                      | null } & {
                          data: {
                              createdAt: string;
                              dimensionFilters: { [key: string]: unknown };
                              enabled: boolean;
                              id: string;
                              limitValue: number;
                              name: string;
                              projectId: string;
                              updatedAt: string;
                              window: string;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      List rate limits

      List all rate limits for the project.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: { cursor?: string; limit?: string };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • Optionalpath?: undefined
        • Optionalquery?: { cursor?: string; limit?: string }
          • Optionalcursor?: string

            Pagination cursor from the previous response

          • Optionallimit?: string

            Maximum number of rate limits to return (1-100, default: 50)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": { hasMore: boolean; nextCursor: string | null } & {
                        data: {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            enabled: boolean;
                            id: string;
                            limitValue: number;
                            name: string;
                            projectId: string;
                            updatedAt: string;
                            window: string;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": { hasMore: boolean; nextCursor: string | null } & {
                      data: {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          enabled: boolean;
                          id: string;
                          limitValue: number;
                          name: string;
                          projectId: string;
                          updatedAt: string;
                          window: string;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          List of rate limits

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      dimensionFilters: { [key: string]: unknown };
                      enabled: boolean;
                      limitValue: number;
                      name: string;
                      window: "hour" | "second" | "minute";
                  };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          enabled: boolean;
                          id: string;
                          limitValue: number;
                          name: string;
                          projectId: string;
                          updatedAt: string;
                          window: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Create a rate limit

      Create a new rate limit with dimension filters.

      Rate limits control how many requests can be made within a time window. You can apply rate limits to specific customers, models, event types, or any combination using dimension filters.
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    dimensionFilters: { [key: string]: unknown };
                    enabled: boolean;
                    limitValue: number;
                    name: string;
                    window: "hour" | "second" | "minute";
                };
            };
        }
      • responses: {
            "201": {
                content: {
                    "application/json": {
                        createdAt: string;
                        dimensionFilters: { [key: string]: unknown };
                        enabled: boolean;
                        id: string;
                        limitValue: number;
                        name: string;
                        projectId: string;
                        updatedAt: string;
                        window: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      createdAt: string;
                      dimensionFilters: { [key: string]: unknown };
                      enabled: boolean;
                      id: string;
                      limitValue: number;
                      name: string;
                      projectId: string;
                      updatedAt: string;
                      window: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Rate limit created

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid request

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/rate-limits/{id}": {
        delete: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { id: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: { "application/json": { success: boolean } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { id: string };
                query?: undefined;
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            enabled: boolean;
                            id: string;
                            limitValue: number;
                            name: string;
                            projectId: string;
                            updatedAt: string;
                            window: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path: { id: string };
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        dimensionFilters?: { [key: string]: unknown };
                        enabled?: boolean;
                        limitValue?: number;
                        name?: string;
                        window?: "hour" | "second" | "minute";
                    };
                };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            createdAt: string;
                            dimensionFilters: { [key: string]: unknown };
                            enabled: boolean;
                            id: string;
                            limitValue: number;
                            name: string;
                            projectId: string;
                            updatedAt: string;
                            window: string;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "404": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        trace?: undefined;
    }

    Type Declaration

    • delete: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { id: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: { "application/json": { success: boolean } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Delete a rate limit

      Delete a rate limit by ID.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { id: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { id: string }
          • id: string

            Unique identifier for the rate limit

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: { "application/json": { success: boolean } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: { "application/json": { success: boolean } };
              headers: { [name: string]: unknown };
          }

          Rate limit deleted

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Rate limit not found

    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { id: string };
              query?: undefined;
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          enabled: boolean;
                          id: string;
                          limitValue: number;
                          name: string;
                          projectId: string;
                          updatedAt: string;
                          window: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get a rate limit

      Get a specific rate limit by ID.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { id: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { id: string }
          • id: string

            Unique identifier for the rate limit

        • Optionalquery?: undefined
      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        dimensionFilters: { [key: string]: unknown };
                        enabled: boolean;
                        id: string;
                        limitValue: number;
                        name: string;
                        projectId: string;
                        updatedAt: string;
                        window: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      dimensionFilters: { [key: string]: unknown };
                      enabled: boolean;
                      id: string;
                      limitValue: number;
                      name: string;
                      projectId: string;
                      updatedAt: string;
                      window: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Rate limit found

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Rate limit not found

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • put: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path: { id: string };
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      dimensionFilters?: { [key: string]: unknown };
                      enabled?: boolean;
                      limitValue?: number;
                      name?: string;
                      window?: "hour" | "second" | "minute";
                  };
              };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          createdAt: string;
                          dimensionFilters: { [key: string]: unknown };
                          enabled: boolean;
                          id: string;
                          limitValue: number;
                          name: string;
                          projectId: string;
                          updatedAt: string;
                          window: string;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "404": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Update a rate limit

      Update an existing rate limit.

      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path: { id: string };
            query?: undefined;
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • path: { id: string }
          • id: string

            Unique identifier for the rate limit

        • Optionalquery?: undefined
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    dimensionFilters?: { [key: string]: unknown };
                    enabled?: boolean;
                    limitValue?: number;
                    name?: string;
                    window?: "hour" | "second" | "minute";
                };
            };
        }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        createdAt: string;
                        dimensionFilters: { [key: string]: unknown };
                        enabled: boolean;
                        id: string;
                        limitValue: number;
                        name: string;
                        projectId: string;
                        updatedAt: string;
                        window: string;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "404": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      createdAt: string;
                      dimensionFilters: { [key: string]: unknown };
                      enabled: boolean;
                      id: string;
                      limitValue: number;
                      name: string;
                      projectId: string;
                      updatedAt: string;
                      window: string;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Rate limit updated

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

        • 404: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Rate limit not found

    • Optionaltrace?: undefined
    "/rate-limits/check": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: { "application/json": { [key: string]: unknown } };
            };
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            allowed: boolean;
                            rateLimits: {
                                exceeded: boolean;
                                id: string;
                                limit: number;
                                name: string;
                                remaining: number;
                                reset: number;
                                window: string;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: { "application/json": { [key: string]: unknown } };
          };
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          allowed: boolean;
                          rateLimits: {
                              exceeded: boolean;
                              id: string;
                              limit: number;
                              name: string;
                              remaining: number;
                              reset: number;
                              window: string;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Check rate limits

      Check current rate limit status for the given dimensions without consuming a request.

      This endpoint allows you to query rate limit status without actually counting against the limit. Useful for:
      - Pre-flight checks before processing requests
      - Displaying rate limit status to users
      - Monitoring rate limit consumption
      
      **Dimension Matching:**
      Rate limits are matched based on dimension filters. Pass dimensions like:
      - `customer_id`: Filter by customer
      - `event_type`: Filter by event type
      - `model`: Filter by model
      - `provider`: Filter by provider
      - Any custom dimension from event properties
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: { content: { "application/json": { [key: string]: unknown } } }
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        allowed: boolean;
                        rateLimits: {
                            exceeded: boolean;
                            id: string;
                            limit: number;
                            name: string;
                            remaining: number;
                            reset: number;
                            window: string;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      allowed: boolean;
                      rateLimits: {
                          exceeded: boolean;
                          id: string;
                          limit: number;
                          name: string;
                          remaining: number;
                          reset: number;
                          window: string;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Rate limit check result

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/track": {
        delete?: undefined;
        get?: undefined;
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query?: undefined;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        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;
                    };
                };
            };
            responses: {
                "201": {
                    content: {
                        "application/json": {
                            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;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "429": {
                    content: {
                        "application/json": {
                            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;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
            };
        };
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • Optionalget?: undefined
    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • post: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query?: undefined;
          };
          requestBody?: {
              content: {
                  "application/json": {
                      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;
                  };
              };
          };
          responses: {
              "201": {
                  content: {
                      "application/json": {
                          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;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "429": {
                  content: {
                      "application/json": {
                          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;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Track usage with enforcement

      All-in-one endpoint for tracking usage with quota and rate limit enforcement.

      **This is the recommended endpoint** for most use cases. It performs three operations in sequence:
      1. **Rate Limit Check**: Validates against configured rate limits (fast, Redis-based)
      2. **Quota Check**: Validates against configured quotas (database-based)
      3. **Event Ingestion**: Records the event if all checks pass
      
      **Response Codes:**
      - `201 Created`: Event tracked successfully, all limits within bounds
      - `429 Too Many Requests`: Rate limit or quota exceeded (check response body for details)
      
      **Rate Limit Headers:**
      The response includes standard rate limit headers:
      - `X-RateLimit-Limit`: Maximum requests allowed
      - `X-RateLimit-Remaining`: Requests remaining in current window
      - `X-RateLimit-Reset`: Unix timestamp when window resets
      - `Retry-After`: Seconds to wait before retrying (on 429 responses)
      
      **Quota Headers (on quota exceeded):**
      When a quota is exceeded, the response includes:
      - `Retry-After`: Seconds to wait before retrying
      - `X-Quota-Reset`: Unix timestamp when the quota period resets
      - `X-Quota-Period`: Quota period (hour, day, week, month)
      - `X-Quota-Metric`: Quota metric (total_tokens, total_events, total_cost_cents)
      
      **Dimension Matching:**
      Quotas and rate limits are matched based on dimensions extracted from:
      - `customerId` → `customer_id`
      - `eventType` → `event_type`
      - `model` → `model`
      - `provider` → `provider`
      - `properties` → All string values are included as dimensions
      
      • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
      • OptionalrequestBody?: {
            content: {
                "application/json": {
                    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;
                };
            };
        }
      • responses: {
            "201": {
                content: {
                    "application/json": {
                        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;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "429": {
                content: {
                    "application/json": {
                        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;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
        }
        • 201: {
              content: {
                  "application/json": {
                      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;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Event tracked successfully - all limits within bounds

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid request body

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

        • 429: {
              content: {
                  "application/json": {
                      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;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Rate limit or quota exceeded - request was blocked

    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/usage": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query: {
                    customerId?: string;
                    endDate: string;
                    eventType?: string;
                    model?: string;
                    startDate: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            totalCostCents: number;
                            totalEvents: number;
                            totalInputTokens: number;
                            totalOutputTokens: number;
                            totalTokens: number;
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query: {
                  customerId?: string;
                  endDate: string;
                  eventType?: string;
                  model?: string;
                  startDate: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          totalCostCents: number;
                          totalEvents: number;
                          totalInputTokens: number;
                          totalOutputTokens: number;
                          totalTokens: number;
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get usage summary

      Retrieve aggregated usage metrics for the project.

      Returns totals for events, tokens, and costs within the specified date range. You can filter by customer, event type, or model to get specific subsets of data.
      
      **Metrics Included:**
      - Total events count
      - Total tokens (input + output)
      - Total input tokens
      - Total output tokens
      - Total cost in cents
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query: {
                customerId?: string;
                endDate: string;
                eventType?: string;
                model?: string;
                startDate: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • Optionalpath?: undefined
        • query: {
              customerId?: string;
              endDate: string;
              eventType?: string;
              model?: string;
              startDate: string;
          }
          • OptionalcustomerId?: string

            Filter usage by customer ID

          • endDate: string

            End of the date range (ISO 8601 format)

          • OptionaleventType?: string

            Filter usage by event type (e.g., "model_call", "embedding")

          • Optionalmodel?: string

            Filter usage by model name (e.g., "gpt-4", "claude-3")

          • startDate: string

            Start of the date range (ISO 8601 format)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        totalCostCents: number;
                        totalEvents: number;
                        totalInputTokens: number;
                        totalOutputTokens: number;
                        totalTokens: number;
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      totalCostCents: number;
                      totalEvents: number;
                      totalInputTokens: number;
                      totalOutputTokens: number;
                      totalTokens: number;
                  };
              };
              headers: { [name: string]: unknown };
          }

          Usage summary

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/usage/breakdown": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query: {
                    customerId?: string;
                    endDate: string;
                    eventType?: string;
                    groupBy: "model" | "customer_id" | "event_type" | "provider";
                    model?: string;
                    startDate: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                dimension?: string
                                | null;
                                totalCostCents: number;
                                totalEvents: number;
                                totalInputTokens: number;
                                totalOutputTokens: number;
                                totalTokens: number;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query: {
                  customerId?: string;
                  endDate: string;
                  eventType?: string;
                  groupBy: "model" | "customer_id" | "event_type" | "provider";
                  model?: string;
                  startDate: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          data: {
                              dimension?: string
                              | null;
                              totalCostCents: number;
                              totalEvents: number;
                              totalInputTokens: number;
                              totalOutputTokens: number;
                              totalTokens: number;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get usage breakdown

      Retrieve usage metrics grouped by a specific dimension.

      This endpoint provides detailed breakdowns of usage data, allowing you to see how usage is distributed across different dimensions like models, customers, event types, or providers.
      
      **Use Cases:**
      - See which models consume the most tokens
      - Identify top customers by usage
      - Compare usage across different event types
      - Analyze provider-specific consumption
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query: {
                customerId?: string;
                endDate: string;
                eventType?: string;
                groupBy: "model" | "customer_id" | "event_type" | "provider";
                model?: string;
                startDate: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • Optionalpath?: undefined
        • query: {
              customerId?: string;
              endDate: string;
              eventType?: string;
              groupBy: "model" | "customer_id" | "event_type" | "provider";
              model?: string;
              startDate: string;
          }
          • OptionalcustomerId?: string

            Filter usage by customer ID before grouping

          • endDate: string

            End of the date range (ISO 8601 format)

          • OptionaleventType?: string

            Filter usage by event type before grouping

          • groupBy: "model" | "customer_id" | "event_type" | "provider"

            Dimension to group usage by

          • Optionalmodel?: string

            Filter usage by model name before grouping

          • startDate: string

            Start of the date range (ISO 8601 format)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            dimension?: string | null;
                            totalCostCents: number;
                            totalEvents: number;
                            totalInputTokens: number;
                            totalOutputTokens: number;
                            totalTokens: number;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      data: {
                          dimension?: string | null;
                          totalCostCents: number;
                          totalEvents: number;
                          totalInputTokens: number;
                          totalOutputTokens: number;
                          totalTokens: number;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Usage breakdown

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined
    "/usage/timeseries": {
        delete?: undefined;
        get: {
            parameters: {
                cookie?: undefined;
                header?: undefined;
                path?: undefined;
                query: {
                    customerId?: string;
                    endDate: string;
                    eventType?: string;
                    interval: "hour" | "day" | "week";
                    model?: string;
                    startDate: string;
                };
            };
            requestBody?: undefined;
            responses: {
                "200": {
                    content: {
                        "application/json": {
                            data: {
                                timestamp: string;
                                totalCostCents: number;
                                totalEvents: number;
                                totalInputTokens: number;
                                totalOutputTokens: number;
                                totalTokens: number;
                            }[];
                        };
                    };
                    headers: { [name: string]: unknown };
                };
                "400": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
                "401": {
                    content: { "application/json": { error: string } };
                    headers: { [name: string]: unknown };
                };
            };
        };
        head?: undefined;
        options?: undefined;
        parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query?: undefined;
        };
        patch?: undefined;
        post?: undefined;
        put?: undefined;
        trace?: undefined;
    }

    Type Declaration

    • Optionaldelete?: undefined
    • get: {
          parameters: {
              cookie?: undefined;
              header?: undefined;
              path?: undefined;
              query: {
                  customerId?: string;
                  endDate: string;
                  eventType?: string;
                  interval: "hour" | "day" | "week";
                  model?: string;
                  startDate: string;
              };
          };
          requestBody?: undefined;
          responses: {
              "200": {
                  content: {
                      "application/json": {
                          data: {
                              timestamp: string;
                              totalCostCents: number;
                              totalEvents: number;
                              totalInputTokens: number;
                              totalOutputTokens: number;
                              totalTokens: number;
                          }[];
                      };
                  };
                  headers: { [name: string]: unknown };
              };
              "400": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
              "401": {
                  content: { "application/json": { error: string } };
                  headers: { [name: string]: unknown };
              };
          };
      }

      Get usage timeseries

      Retrieve usage metrics bucketed by time interval.

      Returns time-series data showing how usage changes over time. Useful for creating charts, identifying trends, and monitoring usage patterns.
      
      **Intervals:**
      - `hour`: Bucket data by hour
      - `day`: Bucket data by day
      - `week`: Bucket data by week
      
      Each data point includes the timestamp and all usage metrics for that time period.
      
      • parameters: {
            cookie?: undefined;
            header?: undefined;
            path?: undefined;
            query: {
                customerId?: string;
                endDate: string;
                eventType?: string;
                interval: "hour" | "day" | "week";
                model?: string;
                startDate: string;
            };
        }
        • Optionalcookie?: undefined
        • Optionalheader?: undefined
        • Optionalpath?: undefined
        • query: {
              customerId?: string;
              endDate: string;
              eventType?: string;
              interval: "hour" | "day" | "week";
              model?: string;
              startDate: string;
          }
          • OptionalcustomerId?: string

            Filter usage by customer ID

          • endDate: string

            End of the date range (ISO 8601 format)

          • OptionaleventType?: string

            Filter usage by event type

          • interval: "hour" | "day" | "week"

            Time interval for bucketing data

          • Optionalmodel?: string

            Filter usage by model name

          • startDate: string

            Start of the date range (ISO 8601 format)

      • OptionalrequestBody?: undefined
      • responses: {
            "200": {
                content: {
                    "application/json": {
                        data: {
                            timestamp: string;
                            totalCostCents: number;
                            totalEvents: number;
                            totalInputTokens: number;
                            totalOutputTokens: number;
                            totalTokens: number;
                        }[];
                    };
                };
                headers: { [name: string]: unknown };
            };
            "400": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
            "401": {
                content: { "application/json": { error: string } };
                headers: { [name: string]: unknown };
            };
        }
        • 200: {
              content: {
                  "application/json": {
                      data: {
                          timestamp: string;
                          totalCostCents: number;
                          totalEvents: number;
                          totalInputTokens: number;
                          totalOutputTokens: number;
                          totalTokens: number;
                      }[];
                  };
              };
              headers: { [name: string]: unknown };
          }

          Usage timeseries

        • 400: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Invalid query parameters

        • 401: {
              content: { "application/json": { error: string } };
              headers: { [name: string]: unknown };
          }

          Unauthorized - Invalid or missing API key

    • Optionalhead?: undefined
    • Optionaloptions?: undefined
    • parameters: { cookie?: undefined; header?: undefined; path?: undefined; query?: undefined }
    • Optionalpatch?: undefined
    • Optionalpost?: undefined
    • Optionalput?: undefined
    • Optionaltrace?: undefined