/** * Hand-written wrapper. DO NOT regenerate this file. * * The model data lives in `openrouter.video-models.json` (regenerated by * `fetch-openrouter-models.ts` from `GET /api/v1/videos/models` — video * generation models do not appear in the plain `GET /api/v1/models` * listing). This wrapper re-exports it typed so consumers can keep * `import { videoModels } from './openrouter.video-models'`. * * The data is loaded via `JSON.parse(readFileSync(...))` rather than an * `import ... with { type: 'json' }` attribute so the loader doesn't have * to support JSON import attributes. */ import { readFileSync } from 'node:fs' import { dirname, resolve } from 'node:path' import { fileURLToPath } from 'node:url' export interface OpenRouterVideoApiModel { id: string name: string /** Supported clip lengths in seconds; null when the API doesn't report them. */ supported_durations: Array | null /** e.g. '480p' | '720p' | '1080p' | '1K' | '2K' | '4K'; null when unreported. */ supported_resolutions: Array | null /** e.g. '16:9' | '9:16' | '1:1'; null when unreported. */ supported_aspect_ratios: Array | null /** Which `frame_images[].frame_type` values the model accepts; null when unreported. */ supported_frame_images: Array | null /** Exact 'WIDTHxHEIGHT' sizes; null when unreported. */ supported_sizes: Array | null /** Whether the model can generate audio; null when unknown. */ generate_audio: boolean | null /** Whether the model honors a deterministic seed; null when unknown. */ seed: boolean | null pricing_skus?: Record | null allowed_passthrough_parameters?: Array } const __dirname = dirname(fileURLToPath(import.meta.url)) const DATA_PATH = resolve(__dirname, 'openrouter.video-models.json') export const videoModels: Array = JSON.parse( readFileSync(DATA_PATH, 'utf-8'), )