/**
 * AI usage API — cost-control Phase 0.
 *
 *   GET /api/admin/ai-usage — spend rollup from the AI usage ledger.
 *
 * Owner-only (fail closed outside local open mode, matching audit-api).
 * Read-only: the ledger is populated by the inference hooks; nothing here
 * mutates it.
 *
 * Query params:
 *   since, until      ISO timestamp or epoch ms
 *   feature           filter to one feature ('chat' | 'title' | 'caption' | …)
 *   group_by          CSV of feature|model|day (default "feature,model,day");
 *                     unknown tokens → 400
 *   include_events=1  append recent raw rows (paginated via limit/offset)
 *   limit, offset     raw-event pagination (limit clamped 1–500)
 *
 * Response: { totals, groups, events? } — token sums per class, costUsd, and
 * cacheHitRate (= cacheRead / (input + cacheRead)) per group and overall.
 */
import type { FastifyInstance } from 'fastify';
import { type AuthService } from '../../services/auth-service.js';
import type { AiUsageLedger } from '../../services/ai-usage-ledger.js';
export declare function registerAiUsageApiRoutes(fastify: FastifyInstance, authService: AuthService, ledger: AiUsageLedger): Promise<void>;
