/** * Model capabilities client. * * The model roster — internal model ids, friendly aliases, defaults, and each * model's parameter constraints (aspect ratios / resolutions / durations / * reference-image caps / Seedream size presets) — is owned by ab-api and served * from POST /model/capabilities (public, no auth). The CLI fetches it at runtime * instead of hardcoding it, so this npm package never ships the internal model * matrix or provider details, and validation can't drift from the backend. * * Fetched once per process and memoized; the catalog is static server-side. */ export interface ModelConstraints { aspectRatios?: string[]; resolutions?: string[]; durations?: number[]; durationMin?: number; durationMax?: number; durationDefault?: number; refImageMax?: number; /** Omni-modal reference caps (Seedance 2.0): videos and audio clips per request. */ refVideoMax?: number; refAudioMax?: number; sizes?: string[]; /** aspect-ratio → [width, height] pixel preset (Seedream). Per model: the same * ratio maps to different pixels on different Seedream variants. */ sizePresets?: Record; /** total-pixel bounds (width × height); the backend rescales sizes outside them. */ pixelMin?: number; pixelMax?: number; } export interface ModelDescriptor { id: string; label: string; aliases?: string[]; default?: boolean; constraints: ModelConstraints; } export interface VoiceCapabilities { provider: string; defaultVoiceId: string; speedMin: number; speedMax: number; } export interface DigitalHumanCapabilities { sources: string[]; defaultVoiceId: string; } export interface ModelCapabilities { image: ModelDescriptor[]; video: ModelDescriptor[]; voice: VoiceCapabilities; digitalHuman: DigitalHumanCapabilities; } /** Fetch (and memoize) the model capabilities catalog from ab-api. */ export declare function getCapabilities(apiBaseUrl?: string): Promise; /** * Resolve a user-supplied model (friendly alias or full id) against a model * list. Returns the matched descriptor, or null when nothing matches. */ export declare function matchModel(list: ModelDescriptor[], input: string): ModelDescriptor | null; /** The descriptor flagged `default` in a list, falling back to the first entry. */ export declare function defaultModel(list: ModelDescriptor[]): ModelDescriptor | undefined;