export type VideoModelType = 'image-to-video' | 'text-to-video'; export interface VideoModelSpec { id: string; name: string; type: VideoModelType; durations: string[]; resolutions: string[]; aspectRatios: string[]; audio: boolean; audioConfigurable: boolean; audioInput: boolean; videoInput: boolean; /** Supports structured `elements` with @Element1/@Element2 prompt refs */ supportsElements: boolean; /** Supports flat `reference_image_urls` array */ supportsReferenceImages: boolean; /** Supports `scene_image_urls` for environment/style anchoring */ supportsSceneImages: boolean; /** Supports `end_image_url` for targeted ending composition */ supportsEndImage: boolean; /** Max duration in seconds */ maxDurationSec: number; /** * Supports per-reference audio (Wan 2.7 R2V): each `elements[].audio_url` * can drive a different speaker's lip-sync inside a single render. */ perReferenceAudio?: boolean; /** * Supports `reference_audio_urls` — voice-donor clips (up to 3, 2-15s each, * ≤15s aggregate, wav/mp3, ≤15MB per file) bound in-prompt as @Audio1, * @Audio2, … so a character's voice (timbre / accent / pacing) stays * consistent across shots. Must be paired with ≥1 reference image (Venice * rejects audio-only requests at validation). Distinct from `audioInput` * (lip-sync `audio_url`): these four R2V models accept reference audio but * do NOT set `audio_input: true` in GET /models. Confirmed live via * /video/quote (HTTP 200) 2026-07-23. */ supportsReferenceAudio?: boolean; /** * Minimum allowed duration (seconds) for `audio_url` input. * Wan 2.7 rejects audio shorter than 3 seconds. Use the pre-flight * helper in `src/venice/audio-preflight.ts` to pad shorter clips. */ minAudioInputSec?: number; /** * How much prompt the model wants. * * `'directorial'` (the default, and every family except MiniMax H3 Max) is * the house style: camera, blocking, location geography, aesthetic, and * reference role clauses all stated per shot, because these models render * what they are told and drift when they are not. * * `'simple'` models degrade with that treatment. They compose their own * coverage — framing, cutting, and beat rhythm — from one plain statement of * intent, and a wall of directorial clauses fights the shot the model would * have chosen. The prompt builder drops the heavy blocks for these (see * `buildVideoPrompt` / `buildMontagePrompt`) and keeps only what binds * identity and look. */ promptStyle?: 'simple' | 'directorial'; privacy: 'private' | 'anonymized'; offline: boolean; } /** * True when a model wants a short, plain prompt rather than the full * directorial stack. Drives the lean branches in the mini-drama prompt * builder; unknown ids fall through to directorial (the safe default). */ export declare function modelWantsSimplePrompt(modelId: string): boolean; /** * MiniMax H3 (all variants) image-to-video renders die server-side when the * START frame (`image_url`) contains a recognizable human face: Venice accepts * and bills the queue, then `/video/retrieve` 500s forever, with no * needs_consent handshake like Seedance. Loop chaining (which feeds each shot's * last frame into the next shot's i2v) and any panel-anchored i2v off a * face-bearing panel hit this. See AGENTS.md anti-pattern 31 (PR #25). * * Callers use this to avoid feeding a face-bearing start frame to these models * (degrade to t2v, skip face-continuity prompting, etc.). It's a per-model * capability so a future Venice fix — or a new i2v family — is a one-line change. */ export declare function i2vRejectsFaceStartFrame(modelId: string): boolean; /** * Per-image-model positive-prompt length caps. * * Venice silently rejects requests with overly long positive prompts on * certain models (observed at ~1800-2200 chars on seedream-v5-lite; the * mini-drama character-reference builder used to emit 2400+ char prompts). * * Default cap is intentionally conservative (300 chars). Callers should * keep the most-important style cue + character anchor inline and move * everything else to negative_prompt. */ export declare const DEFAULT_MAX_POSITIVE_PROMPT_CHARS = 300; export declare const MAX_POSITIVE_PROMPT_CHARS: Record; /** * Look up the positive-prompt cap for an image-generation model. * Falls back to DEFAULT_MAX_POSITIVE_PROMPT_CHARS when unspecified. */ export declare function getMaxPositivePromptChars(modelId: string): number; export declare const VIDEO_MODELS: VideoModelSpec[]; export interface ImageModelSpec { id: string; name: string; type: 'generation' | 'edit' | 'upscale' | 'background-remove'; offline: boolean; } export declare const IMAGE_GENERATION_MODELS: ImageModelSpec[]; export declare const MULTI_EDIT_MODELS: readonly ["qwen-edit", "qwen-image-2-edit", "qwen-image-2-pro-edit", "flux-2-max-edit", "gpt-image-1-5-edit", "gpt-image-2-edit", "grok-imagine-edit", "nano-banana-2-edit", "nano-banana-pro-edit", "seedream-v4-edit", "seedream-v5-lite-edit"]; export type MultiEditModelId = typeof MULTI_EDIT_MODELS[number]; export interface MusicModelSpec { id: string; name: string; type: 'music' | 'sound-effects' | 'tts'; offline: boolean; /** Selectable voices (voice-enabled models). `default_voice` first if known. */ voices?: string[]; /** Default voice id. For seed-audio this is the sentinel "Describe in prompt". */ defaultVoice?: string; /** `speed` param support + bounds. */ supportsSpeed?: boolean; minSpeed?: number; maxSpeed?: number; defaultSpeed?: number; /** Lyrics / instrumental behaviour. */ supportsLyrics?: boolean; lyricsRequired?: boolean; supportsForceInstrumental?: boolean; supportsLanguageCode?: boolean; /** Output containers the model can emit (`response_format` on retrieve). */ supportedFormats?: string[]; defaultFormat?: string; /** Prompt length bounds, in characters. */ promptCharacterLimit?: number; minPromptLength?: number; /** Default generation length in seconds. */ defaultDurationSec?: number; /** Per-second price in USD (for budgeting without a `/audio/quote` round-trip). */ pricingPerSecondUsd?: number; /** One-line human summary. */ description?: string; } export declare const MUSIC_MODELS: MusicModelSpec[]; export declare const TTS_MODELS: readonly ["tts-kokoro", "tts-qwen3-0-6b", "tts-qwen3-1-7b"]; export type TTSModelId = typeof TTS_MODELS[number]; export declare function getVideoModel(id: string): VideoModelSpec | undefined; export declare function getMusicModel(id: string): MusicModelSpec | undefined; export declare function listMusicModels(filter?: { type?: MusicModelSpec['type']; }): MusicModelSpec[]; export declare function listVideoModels(filter?: { type?: VideoModelType; audio?: boolean; minDurationSec?: number; supportsElements?: boolean; supportsReferenceImages?: boolean; supportsEndImage?: boolean; imageToVideo?: boolean; }): VideoModelSpec[]; /** * Check if a model supports a given duration string (e.g. "8s"). * Falls back to checking max duration if the duration is within range. */ export declare function modelSupportsDuration(modelId: string, duration: string): boolean; /** * For a given model, return the closest valid duration to the requested one. */ export declare function closestValidDuration(modelId: string, requestedSec: number): string | undefined; /** * Venice's `bitrate_mode` for the Seedance family: `'high'` encodes at ~5-6x * the bitrate for sharper output and far fewer compression artifacts (larger * files), `'standard'` is the API default. It does NOT affect token price. */ export type BitrateMode = 'standard' | 'high'; /** * Default `bitrate_mode` applied to every Seedance 2.5 render. Seedance 2.5's * standard encode is visibly soft/blocky on detailed footage; `'high'` is the * dramatic-quality default and costs nothing extra. */ export declare const DEFAULT_SEEDANCE_25_BITRATE_MODE: BitrateMode; /** * True for any Seedance 2.5 video model id — the registry ids * (`seedance-2-5-text-to-video`, `-image-to-video`, `-reference-to-video`) as * well as the `-basic` / `-i2v` id spellings some launch scripts use. */ export declare function isSeedance25VideoModel(modelId: string): boolean; /** * Resolve the `bitrate_mode` to attach to a `/video/queue` body for a model. * An explicit override always wins; otherwise Seedance 2.5 defaults to `'high'` * and every other model returns `undefined` (the field is Seedance-only, so * callers should skip it rather than send it to models that reject it). */ export declare function resolveBitrateMode(modelId: string, override?: BitrateMode): BitrateMode | undefined; /** * Build the model-specific parameters for a video queue request. * Handles resolution, aspect_ratio, and end_image_url based on model capabilities. */ export declare function buildModelParams(modelId: string, opts: { aspectRatio?: string; resolution?: string; endImageUrl?: string; }): Record; //# sourceMappingURL=models.d.ts.map