Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

Add catalog-routed video generation (#998)

Tashfeen60f3e7042c00
diff --git a/README.md b/README.md
index 9818ce61..3c349c6c 100644
--- a/README.md
+++ b/README.md
@@ -147,11 +147,11 @@ Based on public documentation, July 2026 — corrections welcome.
![Feature overview](repo-assets/features.png)
-- **Every OpenAI surface** — `/v1/chat/completions`, `/v1/responses` (what Codex CLI needs), `/v1/completions` (editor ghost-text autocomplete), `/v1/images/generations`, `/v1/audio/speech`, `/v1/embeddings`, and `/v1/models` — streaming and non-streaming, from the official SDKs or any OpenAI-compatible client. [API reference →](docs/api.md)
+- **Every OpenAI-style surface** — `/v1/chat/completions`, `/v1/responses` (what Codex CLI needs), `/v1/completions` (editor ghost-text autocomplete), `/v1/images/generations`, `/v1/videos/generations`, `/v1/audio/speech`, `/v1/embeddings`, and `/v1/models` — streaming and non-streaming, from the official SDKs or any OpenAI-compatible client. [API reference →](docs/api.md)
- **Anthropic Messages API** — `/v1/messages` speaks Anthropic's wire format over the same router, so **Claude Code** and the official Anthropic SDKs run against your free pool. [Details →](docs/api.md#anthropic--claude-clients)
- **Native Gemini + Ollama surfaces** — Gemini CLI can use `/v1beta` (`generateContent`, streaming, token counting, models), while opt-in Ollama emulation serves NDJSON chat/generate, tags, metadata, and embeddings for Zed, JetBrains, and other local-model clients.
- **Fusion (multi-model synthesis)** — request the virtual `fusion` model and the router fans your prompt out to a panel of diverse free models in parallel, then a judge model synthesizes one answer from the drafts. [Details →](docs/api.md#fusion-multi-model-synthesis)
-- **Image generation & text-to-speech** — `/v1/images/generations` and `/v1/audio/speech` route across the providers that serve media models, including custom OpenAI-compatible media endpoints.
+- **Image, video & speech generation** — `/v1/images/generations`, `/v1/videos/generations`, and `/v1/audio/speech` route across the providers that serve media models; images and speech also accept custom OpenAI-compatible media endpoints. Video jobs are normalized across synchronous and queued providers and return a completed MP4.
- **Tool calling & structured outputs** — OpenAI-style `tools` round-trip across providers (plain-text tool calls are rescued into real `tool_calls`), plus `response_format`, `seed`, `logprobs`, penalties, and the rest of the sampling params passed through per provider.
- **Smart routing, six strategies** — live per-model speed/capability/reliability scores rank your chain; automatic fallover retries the next model on 429/5xx with cooldowns and key rotation. [Routing in detail →](docs/architecture.md#routing-in-detail)
- **Unified models & profiles** — the same model on several providers collapses into one entry with strict in-group failover; named fallback-chain profiles (a coding chain, a vision chain) switch from the dashboard or per request via `auto:<profile>`.
diff --git a/client/src/App.tsx b/client/src/App.tsx
index 7ccbd3de..01f04666 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -33,6 +33,7 @@ import ModelDetailPage from '@/pages/ModelDetailPage'
import FusionPage from '@/pages/FusionPage'
import EmbeddingsPage from '@/pages/EmbeddingsPage'
import ImagePage from '@/pages/ImagePage'
+import VideoPage from '@/pages/VideoPage'
import AudioPage from '@/pages/AudioPage'
import MediaDetailPage from '@/pages/MediaDetailPage'
import EmbeddingDetailPage from '@/pages/EmbeddingDetailPage'
@@ -63,13 +64,14 @@ const navItems = [
{ to: '/premium', labelKey: 'nav.premium' },
]
-// The five modality pages behind "Models"; surfaced in the nav dropdown and
+// The modality pages behind "Models"; surfaced in the nav dropdown and
// the mobile submenu so Fusion/Embeddings/Image/Audio are discoverable without
// first landing on the chat table.
const modelItems = [
{ to: '/models/chat', labelKey: 'models.chatModelsTab' },
{ to: '/models/embeddings', labelKey: 'models.embeddingsTab' },
{ to: '/models/image', labelKey: 'models.imageTab' },
+ { to: '/models/video', labelKey: 'models.videoTab' },
{ to: '/models/audio', labelKey: 'models.audioTab' },
{ to: '/models/fusion', labelKey: 'models.fusionTab' },
]
@@ -410,6 +412,8 @@ function App() {
<Route path="/models/embeddings/:id" element={<EmbeddingDetailPage />} />
<Route path="/models/image" element={<ImagePage />} />
<Route path="/models/image/:id" element={<MediaDetailPage modality="image" />} />
+ <Route path="/models/video" element={<VideoPage />} />
+ <Route path="/models/video/:id" element={<MediaDetailPage modality="video" />} />
<Route path="/models/audio" element={<AudioPage />} />
<Route path="/models/audio/:id" element={<MediaDetailPage modality="audio" />} />
<Route path="/models/transcription/:id" element={<MediaDetailPage modality="transcription" />} />
diff --git a/client/src/components/command-palette.tsx b/client/src/components/command-palette.tsx
index f14dab4d..8b1c9bac 100644
--- a/client/src/components/command-palette.tsx
+++ b/client/src/components/command-palette.tsx
@@ -6,6 +6,7 @@ import {
Bot,
Boxes,
ChartColumn,
+ Clapperboard,
Copy,
Image as ImageIcon,
KeyRound,
@@ -108,6 +109,7 @@ export function CommandPalette() {
{ id: 'p-chat', group: 'pages', label: t('models.chatModelsTab'), keywords: 'models chat routing fallback', icon: MessageSquare, run: go('/models/chat') },
{ id: 'p-embeddings', group: 'pages', label: t('models.embeddingsTab'), keywords: 'models embeddings vectors', icon: Layers, run: go('/models/embeddings') },
{ id: 'p-image', group: 'pages', label: t('models.imageTab'), keywords: 'models image generation', icon: ImageIcon, run: go('/models/image') },
+ { id: 'p-video', group: 'pages', label: t('models.videoTab'), keywords: 'models video text to video generation mp4', icon: Clapperboard, run: go('/models/video') },
{ id: 'p-audio', group: 'pages', label: t('models.audioTab'), keywords: 'models audio speech tts stt transcription whisper', icon: AudioLines, run: go('/models/audio') },
{ id: 'p-fusion', group: 'pages', label: t('models.fusionTab'), keywords: 'models fusion synthesis panel judge', icon: Zap, run: go('/models/fusion') },
{ id: 'p-playground', group: 'pages', label: t('nav.playground'), keywords: 'playground test chat try', icon: SquareTerminal, run: go('/playground') },
diff --git a/client/src/components/media-models.tsx b/client/src/components/media-models.tsx
index 4d992bd6..7808accc 100644
--- a/client/src/components/media-models.tsx
+++ b/client/src/components/media-models.tsx
@@ -1,6 +1,6 @@
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { Link } from 'react-router-dom'
-import { AudioLines, Image as ImageIcon, Mic } from 'lucide-react'
+import { AudioLines, Clapperboard, Image as ImageIcon, Mic } from 'lucide-react'
import { apiFetch } from '@/lib/api'
import { Switch } from '@/components/ui/switch'
import { ConfirmButton } from '@/components/confirm-button'
@@ -16,7 +16,7 @@ export interface MediaModel {
platform: string
modelId: string
displayName: string
- modality: 'image' | 'audio' | 'transcription'
+ modality: 'image' | 'video' | 'audio' | 'transcription'
enabled: boolean
quotaLabel: string
keyCount: number
@@ -25,7 +25,7 @@ export interface MediaModel {
interface MediaData { models: MediaModel[] }
interface MediaUsage {
- modality: 'image' | 'audio' | 'transcription'
+ modality: 'image' | 'video' | 'audio' | 'transcription'
models: {
id: number
platform: string
@@ -129,7 +129,7 @@ function MediaGroupCard({
)
}
-// Shared list view for the Image and Audio dashboard tabs. Mirrors the chat
+// Shared list view for the Image, Video, and Audio dashboard tabs. Mirrors the chat
// Models page: media models are consolidated into one logical-model group per
// name (with a "N providers" badge), each linking to its own detail page, and a
// per-provider enable toggle (saved immediately). Rows arrive from the signed
@@ -137,7 +137,7 @@ function MediaGroupCard({
// applied. The Audio tab carries both directions of the modality: audio out
// (text to speech, /v1/audio/speech) and audio in (speech to text,
// /v1/audio/transcriptions) as two sections of one page.
-export function MediaModelsView({ modality }: { modality: 'image' | 'audio' }) {
+export function MediaModelsView({ modality }: { modality: 'image' | 'video' | 'audio' }) {
const { t } = useI18n()
const queryClient = useQueryClient()
@@ -178,8 +178,16 @@ export function MediaModelsView({ modality }: { modality: 'image' | 'audio' }) {
// Every models tab shares one title; the tab bar above says which set you are
// looking at, so repeating "Image"/"Audio" here just competed with it.
const title = t('models.title')
- const description = modality === 'image' ? t('models.imageDesc') : t('models.audioDesc')
- const endpoint = modality === 'image' ? '/v1/images/generations' : '/v1/audio/speech'
+ const description = modality === 'image'
+ ? t('models.imageDesc')
+ : modality === 'video'
+ ? t('models.videoDesc')
+ : t('models.audioDesc')
+ const endpoint = modality === 'image'
+ ? '/v1/images/generations'
+ : modality === 'video'
+ ? '/v1/videos/generations'
+ : '/v1/audio/speech'
const renderGroups = (gs: MediaGroup[], detailBase: string) => gs.map(g => (
<MediaGroupCard
@@ -226,7 +234,7 @@ export function MediaModelsView({ modality }: { modality: 'image' | 'audio' }) {
</>
) : groups.length === 0 ? (
<EmptyState
- icon={modality === 'image' ? ImageIcon : AudioLines}
+ icon={modality === 'image' ? ImageIcon : modality === 'video' ? Clapperboard : AudioLines}
title={t('models.mediaEmpty')}
/>
) : (
diff --git a/client/src/components/models-tabs.tsx b/client/src/components/models-tabs.tsx
index 5b7bf92c..439ef27c 100644
--- a/client/src/components/models-tabs.tsx
+++ b/client/src/components/models-tabs.tsx
@@ -17,6 +17,7 @@ export function ModelsTabs() {
<NavLink to="/models/chat" className={({ isActive }) => tab(isActive)}>{t('models.chatModelsTab')}</NavLink>
<NavLink to="/models/embeddings" className={({ isActive }) => tab(isActive)}>{t('models.embeddingsTab')}</NavLink>
<NavLink to="/models/image" className={({ isActive }) => tab(isActive)}>{t('models.imageTab')}</NavLink>
+ <NavLink to="/models/video" className={({ isActive }) => tab(isActive)}>{t('models.videoTab')}</NavLink>
<NavLink to="/models/audio" className={({ isActive }) => tab(isActive)}>{t('models.audioTab')}</NavLink>
<NavLink to="/models/fusion" className={({ isActive }) => tab(isActive)}>{t('models.fusionTab')}</NavLink>
</div>
diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.json
index 5ab9abbc..e897bb57 100644
--- a/client/src/i18n/locales/am.json
+++ b/client/src/i18n/locales/am.json
@@ -172,8 +172,10 @@
"fusionTab": "ቅልጥፍና",
"embeddingsTab": "መክተቻዎች",
"imageTab": "ምስል",
+ "videoTab": "Video",
"audioTab": "ኦዲዮ",
"imageDesc": "የጽሑፍ-ወደ-ምስል ማመንጨት ሞዴሎች.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "የጽሑፍ-ወደ-ንግግር እና የንግግር-ወደ-ጽሑፍ ሞዴሎች.",
"mediaHint": "በኩል ይፍጠሩ",
"mediaEmpty": "እስካሁን ምንም ሞዴሎች የሉም. ከካታሎግ ይመሳሰላሉ።",
diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json
index daf2f384..353dd98e 100644
--- a/client/src/i18n/locales/ar.json
+++ b/client/src/i18n/locales/ar.json
@@ -172,8 +172,10 @@
"fusionTab": "الانصهار",
"embeddingsTab": "التضمين",
"imageTab": "صورة",
+ "videoTab": "Video",
"audioTab": "الصوت",
"imageDesc": "نماذج توليد النص إلى الصورة.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "نماذج تحويل النص إلى كلام ومن الكلام إلى نص.",
"mediaHint": "توليد عبر",
"mediaEmpty": "لا توجد نماذج حتى الآن. يقومون بالمزامنة من الكتالوج.",
diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.json
index b56bd6f1..8fdce348 100644
--- a/client/src/i18n/locales/az.json
+++ b/client/src/i18n/locales/az.json
@@ -172,8 +172,10 @@
"fusionTab": "Birləşmə",
"embeddingsTab": "Yerləşdirmələr",
"imageTab": "Şəkil",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Mətn-şəkildən görüntüyə generasiya modelləri.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Mətn-çıxış və nitq-mətn modelləri.",
"mediaHint": "Generasiya vasitəsilə",
"mediaEmpty": "Hələ model yoxdur. Onlar kataloqdan sinxronlaşır.",
diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.json
index c2f847f9..6ab8fd12 100644
--- a/client/src/i18n/locales/bg.json
+++ b/client/src/i18n/locales/bg.json
@@ -172,8 +172,10 @@
"fusionTab": "Сливане",
"embeddingsTab": "Вграждания",
"imageTab": "Изображение",
+ "videoTab": "Video",
"audioTab": "Аудио",
"imageDesc": "Модели за генериране на текст в изображение.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Модели текст в реч и реч в текст.",
"mediaHint": "Генерирай чрез",
"mediaEmpty": "Все още няма модели. Синхронизират се от каталога.",
diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.json
index f21b4276..a288a20c 100644
--- a/client/src/i18n/locales/bn.json
+++ b/client/src/i18n/locales/bn.json
@@ -172,8 +172,10 @@
"fusionTab": "ফিউশন",
"embeddingsTab": "এমবেডিং",
"imageTab": "ছবি",
+ "videoTab": "Video",
"audioTab": "অডিও",
"imageDesc": "টেক্সট-টু-ইমেজ জেনারেশন মডেল।",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "টেক্সট-টু-স্পিচ এবং স্পিচ-টু-টেক্সট মডেল।",
"mediaHint": "এর মাধ্যমে তৈরি করুন",
"mediaEmpty": "এখনো কোনো মডেল নেই। তারা ক্যাটালগ থেকে সিঙ্ক.",
diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.json
index f83ff2ea..65fd3672 100644
--- a/client/src/i18n/locales/cs.json
+++ b/client/src/i18n/locales/cs.json
@@ -172,8 +172,10 @@
"fusionTab": "Fúze",
"embeddingsTab": "Vložení",
"imageTab": "Obrázek",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modely generování textu na obraz.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modely převodu textu na řeč a převodu řeči na text.",
"mediaHint": "Generujte přes",
"mediaEmpty": "Modely zatím nejsou. Synchronizují se z katalogu.",
diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.json
index 4d7f4eb1..1802409d 100644
--- a/client/src/i18n/locales/da.json
+++ b/client/src/i18n/locales/da.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Indlejringer",
"imageTab": "Billede",
+ "videoTab": "Video",
"audioTab": "Lyd",
"imageDesc": "Modeller til generering af tekst til billede.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Tekst-til-tale og tale-til-tekst-modeller.",
"mediaHint": "Generer via",
"mediaEmpty": "Ingen modeller endnu. De synkroniserer fra kataloget.",
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index ec7ffea1..e5a37a56 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Einbettungen",
"imageTab": "Bild",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modelle zur Text-zu-Bild-Generierung.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Text-to-Speech- und Speech-to-Text-Modelle.",
"mediaHint": "Generieren über",
"mediaEmpty": "Noch keine Modelle. Sie werden aus dem Katalog synchronisiert.",
diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.json
index afd97904..4abc0c1c 100644
--- a/client/src/i18n/locales/el.json
+++ b/client/src/i18n/locales/el.json
@@ -172,8 +172,10 @@
"fusionTab": "Σύντηξη",
"embeddingsTab": "Ενσωματώσεις",
"imageTab": "Εικόνα",
+ "videoTab": "Video",
"audioTab": "Ήχος",
"imageDesc": "Μοντέλα δημιουργίας κειμένου σε εικόνα.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Μοντέλα μετατροπής κειμένου σε ομιλία και ομιλίας σε κείμενο.",
"mediaHint": "Δημιουργία μέσω",
"mediaEmpty": "Δεν υπάρχουν ακόμη μοντέλα. Συγχρονίζονται από τον κατάλογο.",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index c66db2a3..8557a862 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Embeddings",
"imageTab": "Image",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Text-to-image generation models.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Text-to-speech and speech-to-text models.",
"mediaHint": "Generate via",
"mediaEmpty": "No models yet. They sync from the catalog.",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index bcc968f0..f3f77dc1 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusión",
"embeddingsTab": "Embeddings",
"imageTab": "Imagen",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modelos de generación de texto a imagen.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modelos de texto a voz y de voz a texto.",
"mediaHint": "Generar mediante",
"mediaEmpty": "Aún no hay modelos. Se sincronizan desde el catálogo.",
diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.json
index 63ead53f..6bf18efa 100644
--- a/client/src/i18n/locales/fa.json
+++ b/client/src/i18n/locales/fa.json
@@ -172,8 +172,10 @@
"fusionTab": "فیوژن",
"embeddingsTab": "جاسازی ها",
"imageTab": "تصویر",
+ "videoTab": "Video",
"audioTab": "صوتی",
"imageDesc": "مدل های تولید متن به تصویر",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "مدل های تبدیل متن به گفتار و گفتار به متن.",
"mediaHint": "ایجاد از طریق",
"mediaEmpty": "هنوز مدلی وجود ندارد. آنها از کاتالوگ همگام می شوند.",
diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.json
index fd5864e1..bb8fbc87 100644
--- a/client/src/i18n/locales/fi.json
+++ b/client/src/i18n/locales/fi.json
@@ -172,8 +172,10 @@
"fusionTab": "Fuusio",
"embeddingsTab": "Upotukset",
"imageTab": "Kuva",
+ "videoTab": "Video",
"audioTab": "Ääni",
"imageDesc": "Tekstistä kuvaksi -generointimallit.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Tekstistä puheeksi -mallit ja puheesta tekstiksi -mallit.",
"mediaHint": "Generoi",
"mediaEmpty": "Ei vielä malleja. Ne synkronoituvat katalogista.",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index c63b2f9d..ab022157 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Embeddings",
"imageTab": "Image",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modèles de génération texte-image.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modèles de synthèse et de reconnaissance vocales.",
"mediaHint": "Générer via",
"mediaEmpty": "Aucun modèle pour l'instant. Ils se synchronisent depuis le catalogue.",
diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.json
index 7d5c0d96..e2269bbe 100644
--- a/client/src/i18n/locales/gu.json
+++ b/client/src/i18n/locales/gu.json
@@ -172,8 +172,10 @@
"fusionTab": "ફ્યુઝન",
"embeddingsTab": "એમ્બેડિંગ્સ",
"imageTab": "છબી",
+ "videoTab": "Video",
"audioTab": "ઓડિયો",
"imageDesc": "ટેક્સ્ટ-ટુ-ઇમેજ જનરેશન મોડલ્સ.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "ટેક્સ્ટ-ટુ-સ્પીચ અને સ્પીચ-ટુ-ટેક્સ્ટ મોડલ્સ.",
"mediaHint": "દ્વારા જનરેટ કરો",
"mediaEmpty": "હજુ સુધી કોઈ મોડલ નથી. તેઓ કેટલોગમાંથી સમન્વયિત થાય છે.",
diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.json
index 9d202ed3..262fe60f 100644
--- a/client/src/i18n/locales/ha.json
+++ b/client/src/i18n/locales/ha.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Abun ciki",
"imageTab": "Hoto",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Tsarin tsara rubutu-zuwa-hoto.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Tsarin rubutu-zuwa-magana da magana-zuwa-rubutu.",
"mediaHint": "Ƙirƙira ta hanyar",
"mediaEmpty": "Babu samfura tukuna. Suna daidaitawa daga kasidar.",
diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.json
index 5f68b343..324493b1 100644
--- a/client/src/i18n/locales/he.json
+++ b/client/src/i18n/locales/he.json
@@ -172,8 +172,10 @@
"fusionTab": "היתוך",
"embeddingsTab": "הטבעות",
"imageTab": "תמונה",
+ "videoTab": "Video",
"audioTab": "אודיו",
"imageDesc": "מודלים ליצירת טקסט לתמונה.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "מודלים של טקסט לדיבור ודיבור לטקסט.",
"mediaHint": "יצור דרך",
"mediaEmpty": "עדיין אין דגמים. הם מסונכרנים מהקטלוג.",
diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.json
index 9d17397c..7ef978f0 100644
--- a/client/src/i18n/locales/hi.json
+++ b/client/src/i18n/locales/hi.json
@@ -172,8 +172,10 @@
"fusionTab": "संलयन",
"embeddingsTab": "एंबेडिंग",
"imageTab": "छवि",
+ "videoTab": "Video",
"audioTab": "ऑडियो",
"imageDesc": "टेक्स्ट-टू-इमेज जनरेशन मॉडल।",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "पाठ-से-वाक् और वाक्-से-पाठ मॉडल।",
"mediaHint": "के माध्यम से उत्पन्न करें",
"mediaEmpty": "अभी तक कोई मॉडल नहीं. वे कैटलॉग से सिंक होते हैं।",
diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.json
index 2843fbcb..ddbb1f90 100644
--- a/client/src/i18n/locales/hr.json
+++ b/client/src/i18n/locales/hr.json
@@ -172,8 +172,10 @@
"fusionTab": "Fuzija",
"embeddingsTab": "Ugradnja",
"imageTab": "Slika",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modeli generiranja teksta u sliku.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modeli pretvaranja teksta u govor i govora u tekst.",
"mediaHint": "Generirajte putem",
"mediaEmpty": "Još nema modela. Sinkroniziraju se iz kataloga.",
diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.json
index df8a9176..5d463e82 100644
--- a/client/src/i18n/locales/hu.json
+++ b/client/src/i18n/locales/hu.json
@@ -172,8 +172,10 @@
"fusionTab": "Fúzió",
"embeddingsTab": "Beágyazások",
"imageTab": "Kép",
+ "videoTab": "Video",
"audioTab": "Hang",
"imageDesc": "Szövegből képre generáló modellek.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Szöveg-beszéd és beszéd-szöveg modellek.",
"mediaHint": "Generálj",
"mediaEmpty": "Még nincsenek modellek. Szinkronizálódnak a katalógusból.",
diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.json
index 4413205b..58dbca39 100644
--- a/client/src/i18n/locales/id.json
+++ b/client/src/i18n/locales/id.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusi",
"embeddingsTab": "Penyematan",
"imageTab": "Gambar",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Model pembuatan teks-ke-gambar.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Model teks-ke-ucapan dan ucapan-ke-teks.",
"mediaHint": "Hasilkan melalui",
"mediaEmpty": "Belum ada model. Mereka menyinkronkan dari katalog.",
diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.json
index dce98a86..3a73ce7f 100644
--- a/client/src/i18n/locales/ig.json
+++ b/client/src/i18n/locales/ig.json
@@ -172,8 +172,10 @@
"fusionTab": "Ngwakọta",
"embeddingsTab": "Ntinye",
"imageTab": "Onyonyo",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Ụdị ọgbọ ederede gaa na onyonyo.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Ụdị ederede na-okwu na okwu-na-ederede.",
"mediaHint": "Mepụta site na",
"mediaEmpty": "Ọnweghị ụdịdị. Ha mekọrịta site na katalọgụ.",
diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.json
index 0084854a..e7c1c567 100644
--- a/client/src/i18n/locales/it.json
+++ b/client/src/i18n/locales/it.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Embedding",
"imageTab": "Immagine",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modelli di generazione testo-immagine.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modelli di sintesi e riconoscimento vocale.",
"mediaHint": "Genera tramite",
"mediaEmpty": "Nessun modello ancora. Vengono sincronizzati dal catalogo.",
diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.json
index e0f48915..6d440210 100644
--- a/client/src/i18n/locales/ja.json
+++ b/client/src/i18n/locales/ja.json
@@ -172,8 +172,10 @@
"fusionTab": "フュージョン",
"embeddingsTab": "埋め込み",
"imageTab": "画像",
+ "videoTab": "Video",
"audioTab": "オーディオ",
"imageDesc": "テキストから画像への生成モデル。",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "テキスト読み上げモデルと音声読み上げモデル。",
"mediaHint": "経由で生成",
"mediaEmpty": "まだモデルはありません。カタログから同期します。",
diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.json
index ed16a43d..d3acc267 100644
--- a/client/src/i18n/locales/ka.json
+++ b/client/src/i18n/locales/ka.json
@@ -172,8 +172,10 @@
"fusionTab": "შერწყმა",
"embeddingsTab": "ჩაშენებები",
"imageTab": "გამოსახულება",
+ "videoTab": "Video",
"audioTab": "აუდიო",
"imageDesc": "ტექსტის გამოსახულების გენერირების მოდელები.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "ტექსტი-სიტყვა და მეტყველება-ტექსტის მოდელები.",
"mediaHint": "გენერირება მეშვეობით",
"mediaEmpty": "მოდელები ჯერ არ არის. ისინი სინქრონიზებულია კატალოგიდან.",
diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.json
index 86057bfa..f0a86602 100644
--- a/client/src/i18n/locales/km.json
+++ b/client/src/i18n/locales/km.json
@@ -172,8 +172,10 @@
"fusionTab": "ការរួមបញ្ចូល",
"embeddingsTab": "ការបញ្ចូល",
"imageTab": "រូបភាព",
+ "videoTab": "Video",
"audioTab": "សំឡេង",
"imageDesc": "ម៉ូដែលបង្កើតអត្ថបទទៅរូបភាព។",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "គំរូបម្លែងអត្ថបទទៅសំឡេង និងសំឡេងទៅអត្ថបទ។",
"mediaHint": "បង្កើតតាមរយៈ",
"mediaEmpty": "មិនទាន់មានម៉ូដែលទេ។ វាធ្វើសមកាលកម្មពីកាតាឡុក។",
diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.json
index 4af0b5a4..85801cd9 100644
--- a/client/src/i18n/locales/kn.json
+++ b/client/src/i18n/locales/kn.json
@@ -172,8 +172,10 @@
"fusionTab": "ಫ್ಯೂಷನ್",
"embeddingsTab": "ಎಂಬೆಡಿಂಗ್‌ಗಳು",
"imageTab": "ಚಿತ್ರ",
+ "videoTab": "Video",
"audioTab": "ಆಡಿಯೋ",
"imageDesc": "ಪಠ್ಯದಿಂದ ಚಿತ್ರ ರಚನೆಯ ಮಾದರಿಗಳು.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "ಪಠ್ಯದಿಂದ ಭಾಷಣ ಮತ್ತು ಭಾಷಣದಿಂದ ಪಠ್ಯದ ಮಾದರಿಗಳು.",
"mediaHint": "ಮೂಲಕ ಉತ್ಪಾದಿಸಿ",
"mediaEmpty": "ಇನ್ನೂ ಯಾವುದೇ ಮಾದರಿಗಳಿಲ್ಲ. ಅವರು ಕ್ಯಾಟಲಾಗ್‌ನಿಂದ ಸಿಂಕ್ ಮಾಡುತ್ತಾರೆ.",
diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.json
index d1026d83..9a5301fe 100644
--- a/client/src/i18n/locales/ko.json
+++ b/client/src/i18n/locales/ko.json
@@ -172,8 +172,10 @@
"fusionTab": "퓨전",
"embeddingsTab": "임베딩",
"imageTab": "이미지",
+ "videoTab": "Video",
"audioTab": "오디오",
"imageDesc": "Text-to-image generation models.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Text-to-speech and speech-to-text models.",
"mediaHint": "다음을 통해 생성",
"mediaEmpty": "아직 모델이 없습니다. They sync from the catalog.",
diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.json
index b275d284..83b3d366 100644
--- a/client/src/i18n/locales/lt.json
+++ b/client/src/i18n/locales/lt.json
@@ -172,8 +172,10 @@
"fusionTab": "Sintezė",
"embeddingsTab": "Įterpimai",
"imageTab": "Vaizdas",
+ "videoTab": "Video",
"audioTab": "Garsas",
"imageDesc": "Teksto į vaizdą generavimo modeliai.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Teksto į kalbą ir kalbos į tekstą modeliai.",
"mediaHint": "Generuoti per",
"mediaEmpty": "Modelių dar nėra. Jie sinchronizuojami pagal katalogą.",
diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.json
index 506ae951..47ef01f8 100644
--- a/client/src/i18n/locales/ml.json
+++ b/client/src/i18n/locales/ml.json
@@ -172,8 +172,10 @@
"fusionTab": "ഫ്യൂഷൻ",
"embeddingsTab": "ഉൾച്ചേർക്കലുകൾ",
"imageTab": "ചിത്രം",
+ "videoTab": "Video",
"audioTab": "ഓഡിയോ",
"imageDesc": "ടെക്സ്റ്റ്-ടു-ഇമേജ് ജനറേഷൻ മോഡലുകൾ.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "ടെക്സ്റ്റ്-ടു-സ്പീച്ച്, സ്പീച്ച്-ടു-ടെക്സ്റ്റ് മോഡലുകൾ.",
"mediaHint": "വഴി സൃഷ്ടിക്കുക",
"mediaEmpty": "ഇതുവരെ മോഡലുകളൊന്നുമില്ല. കാറ്റലോഗിൽ നിന്ന് അവ സമന്വയിപ്പിക്കുന്നു.",
diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.json
index e742e945..5f807ccf 100644
--- a/client/src/i18n/locales/mr.json
+++ b/client/src/i18n/locales/mr.json
@@ -172,8 +172,10 @@
"fusionTab": "फ्यूजन",
"embeddingsTab": "एम्बेडिंग",
"imageTab": "प्रतिमा",
+ "videoTab": "Video",
"audioTab": "ऑडिओ",
"imageDesc": "मजकूर ते प्रतिमा निर्मिती मॉडेल.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "टेक्स्ट-टू-स्पीच आणि स्पीच-टू-टेक्स्ट मॉडेल.",
"mediaHint": "द्वारे व्युत्पन्न करा",
"mediaEmpty": "अद्याप कोणतेही मॉडेल नाहीत. ते कॅटलॉगमधून समक्रमित करतात.",
diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.json
index 4aab8d2b..52cdc4bc 100644
--- a/client/src/i18n/locales/ms.json
+++ b/client/src/i18n/locales/ms.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusi",
"embeddingsTab": "Penyisipan",
"imageTab": "Imej",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Model penjanaan teks-ke-imej.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Model teks-ke-ucapan dan pertuturan-ke-teks.",
"mediaHint": "Jana melalui",
"mediaEmpty": "Belum ada model lagi. Mereka diselaraskan dari katalog.",
diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.json
index 6784b96a..cd5abab3 100644
--- a/client/src/i18n/locales/my.json
+++ b/client/src/i18n/locales/my.json
@@ -172,8 +172,10 @@
"fusionTab": "ပေါင်းစပ်ခြင်း",
"embeddingsTab": "ထည့်သွင်းမှုများ",
"imageTab": "ပုံ",
+ "videoTab": "Video",
"audioTab": "အသံ",
"imageDesc": "စာသားမှ ပုံသို့ ဖန်တီးမှု မော်ဒယ်များ။",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "စာသားမှ အသံသို့ ပြောင်းလဲခြင်းနှင့် အသံမှ စာသားသို့ ပြောင်းလဲခြင်း မော်ဒယ်များ။",
"mediaHint": "ထုတ်လုပ်ခြင်းမှတဆင့်",
"mediaEmpty": "မော်ဒယ်မရှိသေးဘူး။ Catalog ကနေ sync လုပ်ကြပါတယ်။",
diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.json
index 71fb5a94..24d74be3 100644
--- a/client/src/i18n/locales/ne.json
+++ b/client/src/i18n/locales/ne.json
@@ -172,8 +172,10 @@
"fusionTab": "फ्युजन",
"embeddingsTab": "सम्मिलित गर्नुहोस्",
"imageTab": "छवि",
+ "videoTab": "Video",
"audioTab": "अडियो",
"imageDesc": "पाठ-देखि-छवि उत्पादन मोडेलहरू।",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "पाठ-देखि-भाषण र भाषण-देखि-पाठ मोडेलहरू।",
"mediaHint": "यसबाट उत्पन्न गर्नुहोस्",
"mediaEmpty": "अहिलेसम्म कुनै मोडेलहरू छैनन्। तिनीहरू क्याटलगबाट समक्रमण गर्छन्।",
diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.json
index dc2c0ffd..217727b5 100644
--- a/client/src/i18n/locales/nl.json
+++ b/client/src/i18n/locales/nl.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusie",
"embeddingsTab": "Embeddings",
"imageTab": "Afbeelding",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Tekst-naar-beeld generatiemodellen.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Tekst-naar-spraak en spraak-naar-tekst modellen.",
"mediaHint": "Genereer via",
"mediaEmpty": "Nog geen modellen. Ze synchroniseren vanuit de catalogus.",
diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.json
index a364a758..9977cefc 100644
--- a/client/src/i18n/locales/no.json
+++ b/client/src/i18n/locales/no.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusjon",
"embeddingsTab": "Innleiringer",
"imageTab": "Bilde",
+ "videoTab": "Video",
"audioTab": "Lyd",
"imageDesc": "Modeller for tekst-til-bilde-generering.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Tekst-til-tale og tale-til-tekst-modeller.",
"mediaHint": "Generer via",
"mediaEmpty": "Ingen modeller ennå. De synkroniserer fra katalogen.",
diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.json
index 5f3efe22..03fa9242 100644
--- a/client/src/i18n/locales/or.json
+++ b/client/src/i18n/locales/or.json
@@ -172,8 +172,10 @@
"fusionTab": "ଫ୍ୟୁଜନ୍",
"embeddingsTab": "ଏମ୍ବେଡିଂ",
"imageTab": "ଚିତ୍ର",
+ "videoTab": "Video",
"audioTab": "ଅଡିଓ",
"imageDesc": "ଟେକ୍ସଟ୍-ରୁ-ଫଟୋ ଜେନେରେସନ୍ ମଡେଲ୍।",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "ଟେକ୍ସଟ୍-ରୁ-ସ୍ପିଚ୍ ଏବଂ ସ୍ପିଚ୍-ରୁ-ଟେକ୍ସଟ୍ ମଡେଲ୍।",
"mediaHint": "ମାଧ୍ୟମରେ ସୃଷ୍ଟି କରନ୍ତୁ",
"mediaEmpty": "ଏପର୍ଯ୍ୟନ୍ତ କୌଣସି ମଡେଲ୍ ନାହିଁ। ସେଗୁଡିକ କ୍ୟାଟଲଗ୍ ରୁ ସିଙ୍କ୍ରୋନାଇଜ୍ କରନ୍ତୁ।",
diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.json
index 9cf4a540..cef609cb 100644
--- a/client/src/i18n/locales/pa.json
+++ b/client/src/i18n/locales/pa.json
@@ -172,8 +172,10 @@
"fusionTab": "ਫਿਊਜ਼ਨ",
"embeddingsTab": "ਏਮਬੈਡਿੰਗਸ",
"imageTab": "ਚਿੱਤਰ",
+ "videoTab": "Video",
"audioTab": "ਆਡੀਓ",
"imageDesc": "ਟੈਕਸਟ ਤੋਂ ਚਿੱਤਰ ਬਣਾਉਣ ਵਾਲੇ ਮਾਡਲ।",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "ਟੈਕਸਟ-ਟੂ-ਸਪੀਚ ਅਤੇ ਸਪੀਚ-ਟੂ-ਟੈਕਸਟ ਮਾਡਲ।",
"mediaHint": "ਰਾਹੀਂ ਤਿਆਰ ਕਰੋ",
"mediaEmpty": "ਅਜੇ ਤੱਕ ਕੋਈ ਮਾਡਲ ਨਹੀਂ ਹਨ। ਉਹ ਕੈਟਾਲਾਗ ਤੋਂ ਸਿੰਕ ਕਰਦੇ ਹਨ।",
diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.json
index e2792e83..4b6d3e51 100644
--- a/client/src/i18n/locales/pl.json
+++ b/client/src/i18n/locales/pl.json
@@ -172,8 +172,10 @@
"fusionTab": "Fuzja",
"embeddingsTab": "Osadzenia",
"imageTab": "Obraz",
+ "videoTab": "Video",
"audioTab": "Dźwięk",
"imageDesc": "Modele generowania tekstu na obraz.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modele zamiany tekstu na mowę i mowy na tekst.",
"mediaHint": "Generuj przez",
"mediaEmpty": "Nie ma jeszcze żadnych modeli. Synchronizują się z katalogiem.",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index 6f57ac3f..23ca79b3 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusão",
"embeddingsTab": "Embeddings",
"imageTab": "Imagem",
+ "videoTab": "Video",
"audioTab": "Áudio",
"imageDesc": "Modelos de geração de texto para imagem.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modelos de texto para fala e de fala para texto.",
"mediaHint": "Gerar via",
"mediaEmpty": "Ainda sem modelos. Eles sincronizam do catálogo.",
diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.json
index 11c65ee5..965f4b4f 100644
--- a/client/src/i18n/locales/pt-PT.json
+++ b/client/src/i18n/locales/pt-PT.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusão",
"embeddingsTab": "Embeddings",
"imageTab": "Imagem",
+ "videoTab": "Video",
"audioTab": "Áudio",
"imageDesc": "Modelos de geração de texto para imagem.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modelos de texto para fala e de voz para texto.",
"mediaHint": "Gerar via",
"mediaEmpty": "Ainda não há modelos. Eles sincronizam a partir do catálogo.",
diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.json
index 62f20ed4..c6b37aec 100644
--- a/client/src/i18n/locales/ro.json
+++ b/client/src/i18n/locales/ro.json
@@ -172,8 +172,10 @@
"fusionTab": "Fuziune",
"embeddingsTab": "Încorporații",
"imageTab": "Imagine",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Modele de generare text-to-image.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modele text-to-speech și speech-to-text.",
"mediaHint": "Generează prin",
"mediaEmpty": "Încă nu există modele. Se sincronizează din catalog.",
diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.json
index 03ec544e..0481a0dd 100644
--- a/client/src/i18n/locales/ru.json
+++ b/client/src/i18n/locales/ru.json
@@ -172,8 +172,10 @@
"fusionTab": "Фьюжн",
"embeddingsTab": "Вложения",
"imageTab": "Изображение",
+ "videoTab": "Video",
"audioTab": "Аудио",
"imageDesc": "Модели преобразования текста в изображение.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Модели преобразования текста в речь и речи в текст.",
"mediaHint": "Создать через",
"mediaEmpty": "Моделей пока нет. Они синхронизируются из каталога.",
diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.json
index 0e6e229c..56dacc48 100644
--- a/client/src/i18n/locales/si.json
+++ b/client/src/i18n/locales/si.json
@@ -172,8 +172,10 @@
"fusionTab": "විලයනය",
"embeddingsTab": "කාවැද්දීම",
"imageTab": "රූපය",
+ "videoTab": "Video",
"audioTab": "ශ්රව්ය උපකරණ",
"imageDesc": "පෙළ සිට රූප උත්පාදන ආකෘති.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "පෙළ සිට කථනය සහ කථනයෙන් පෙළ ආකෘති.",
"mediaHint": "හරහා ජනනය කරන්න",
"mediaEmpty": "තවමත් ආකෘති නොමැත. ඒවා නාමාවලියෙන් සමමුහුර්ත කරයි.",
diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.json
index b447d926..11e5fa3a 100644
--- a/client/src/i18n/locales/sk.json
+++ b/client/src/i18n/locales/sk.json
@@ -172,8 +172,10 @@
"fusionTab": "Fúzia",
"embeddingsTab": "Vkladania",
"imageTab": "Obrázok",
+ "videoTab": "Video",
"audioTab": "Zvuk",
"imageDesc": "Modely generovania textu na obraz.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Modely prevodu textu na reč a prevodu reči na text.",
"mediaHint": "Generovať cez",
"mediaEmpty": "Zatiaľ žiadne modely. Synchronizujú sa z katalógu.",
diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.json
index df297b8c..459559c5 100644
--- a/client/src/i18n/locales/sr.json
+++ b/client/src/i18n/locales/sr.json
@@ -172,8 +172,10 @@
"fusionTab": "Фусион",
"embeddingsTab": "Ембеддингс",
"imageTab": "Слика",
+ "videoTab": "Video",
"audioTab": "Аудио",
"imageDesc": "Модели генерисања текста у слику.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Модели претварања текста у говор и говора у текст.",
"mediaHint": "Генеришите преко",
"mediaEmpty": "Још нема модела. Они се синхронизују из каталога.",
diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.json
index 9c398e48..2e82f26b 100644
--- a/client/src/i18n/locales/sv.json
+++ b/client/src/i18n/locales/sv.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Inbäddningar",
"imageTab": "Bild",
+ "videoTab": "Video",
"audioTab": "Ljud",
"imageDesc": "Text-till-bild-genereringsmodeller.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Text-till-tal och tal-till-text-modeller.",
"mediaHint": "Generera via",
"mediaEmpty": "Inga modeller än. De synkar från katalogen.",
diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.json
index 419ffd09..07c6e316 100644
--- a/client/src/i18n/locales/sw.json
+++ b/client/src/i18n/locales/sw.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Upachikaji",
"imageTab": "Picha",
+ "videoTab": "Video",
"audioTab": "Sauti",
"imageDesc": "Miundo ya kutengeneza maandishi-hadi-picha.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Miundo ya maandishi-hadi-hotuba na mifano ya hotuba-kwa-maandishi.",
"mediaHint": "Tengeneza kupitia",
"mediaEmpty": "Hakuna mifano bado. Wanasawazisha kutoka kwa katalogi.",
diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.json
index ff018cff..0117e7de 100644
--- a/client/src/i18n/locales/ta.json
+++ b/client/src/i18n/locales/ta.json
@@ -172,8 +172,10 @@
"fusionTab": "இணைவு",
"embeddingsTab": "உட்பொதிப்புகள்",
"imageTab": "படம்",
+ "videoTab": "Video",
"audioTab": "ஆடியோ",
"imageDesc": "உரையிலிருந்து பட உருவாக்க மாதிரிகள்.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "உரையிலிருந்து பேச்சு மற்றும் பேச்சுக்கு உரை மாதிரிகள்.",
"mediaHint": "மூலம் உருவாக்கவும்",
"mediaEmpty": "இன்னும் மாதிரிகள் இல்லை. அவை அட்டவணையில் இருந்து ஒத்திசைக்கப்படுகின்றன.",
diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.json
index 67e95e2f..1e83c30b 100644
--- a/client/src/i18n/locales/te.json
+++ b/client/src/i18n/locales/te.json
@@ -172,8 +172,10 @@
"fusionTab": "ఫ్యూజన్",
"embeddingsTab": "పొందుపరచడం",
"imageTab": "చిత్రం",
+ "videoTab": "Video",
"audioTab": "ఆడియో",
"imageDesc": "టెక్స్ట్-టు-ఇమేజ్ జనరేషన్ మోడల్స్.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "టెక్స్ట్-టు-స్పీచ్ మరియు స్పీచ్-టు-టెక్స్ట్ మోడల్స్.",
"mediaHint": "ద్వారా రూపొందించండి",
"mediaEmpty": "ఇంకా మోడల్‌లు లేవు. అవి కేటలాగ్ నుండి సమకాలీకరించబడతాయి.",
diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.json
index b2dc3b1a..3fee7fb0 100644
--- a/client/src/i18n/locales/th.json
+++ b/client/src/i18n/locales/th.json
@@ -172,8 +172,10 @@
"fusionTab": "ฟิวชั่น",
"embeddingsTab": "การฝัง",
"imageTab": "รูปภาพ",
+ "videoTab": "Video",
"audioTab": "เสียง",
"imageDesc": "แบบจำลองการสร้างข้อความเป็นรูปภาพ",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "รูปแบบการอ่านออกเสียงข้อความและคำพูดเป็นข้อความ",
"mediaHint": "สร้างผ่าน",
"mediaEmpty": "ยังไม่มีรุ่น พวกเขาซิงค์จากแคตตาล็อก",
diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.json
index ead7aa4c..511a6c98 100644
--- a/client/src/i18n/locales/tl.json
+++ b/client/src/i18n/locales/tl.json
@@ -172,8 +172,10 @@
"fusionTab": "Pagsasanib",
"embeddingsTab": "Mga Embedding",
"imageTab": "Larawan",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Mga modelo ng pagbuo ng teksto-sa-larawan.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Mga modelo ng text-to-speech at speech-to-text.",
"mediaHint": "Mag-generate sa pamamagitan ng",
"mediaEmpty": "Wala pang modelo. Nagse-sync sila mula sa katalogo.",
diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.json
index 4a96c967..ad32422c 100644
--- a/client/src/i18n/locales/tr.json
+++ b/client/src/i18n/locales/tr.json
@@ -172,8 +172,10 @@
"fusionTab": "Füzyon",
"embeddingsTab": "Gömmeler",
"imageTab": "Resim",
+ "videoTab": "Video",
"audioTab": "Ses",
"imageDesc": "Metinden görüntüye üretim modelleri.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Metinden konuşmaya ve konuşmayı metne dönüştürme modelleri.",
"mediaHint": "Şununla oluştur:",
"mediaEmpty": "Henüz model yok. Katalogdan senkronize edilirler.",
diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.json
index c5f87d6b..7eb1f64c 100644
--- a/client/src/i18n/locales/uk.json
+++ b/client/src/i18n/locales/uk.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "Вбудовування",
"imageTab": "Зображення",
+ "videoTab": "Video",
"audioTab": "Аудіо",
"imageDesc": "Моделі генерації тексту в зображення.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Моделі синтезу мовлення та мовлення в текст.",
"mediaHint": "Згенерувати через",
"mediaEmpty": "Моделей ще немає. Вони синхронізуються з каталогу.",
diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.json
index 9bdfcebf..833ac68c 100644
--- a/client/src/i18n/locales/ur.json
+++ b/client/src/i18n/locales/ur.json
@@ -172,8 +172,10 @@
"fusionTab": "فیوژن",
"embeddingsTab": "ایمبیڈنگز",
"imageTab": "تصویر",
+ "videoTab": "Video",
"audioTab": "آڈیو",
"imageDesc": "ٹیکسٹ ٹو امیج جنریشن ماڈلز۔",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "متن سے تقریر اور تقریر سے متن کے ماڈل۔",
"mediaHint": "کے ذریعے پیدا کریں۔",
"mediaEmpty": "ابھی تک کوئی ماڈل نہیں۔ وہ کیٹلاگ سے مطابقت پذیر ہوتے ہیں۔",
diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.json
index 0231a801..7ea56283 100644
--- a/client/src/i18n/locales/uz.json
+++ b/client/src/i18n/locales/uz.json
@@ -172,8 +172,10 @@
"fusionTab": "Fusion",
"embeddingsTab": "O'rnatishlar",
"imageTab": "Rasm",
+ "videoTab": "Video",
"audioTab": "Audio",
"imageDesc": "Matnni tasvirga yaratish modellari.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Matndan nutqqa va nutqdan matnga modellar.",
"mediaHint": "orqali yaratish",
"mediaEmpty": "Hozircha modellar yoʻq. Ular katalogdan sinxronlashtiriladi.",
diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.json
index 912909be..4e9c5f40 100644
--- a/client/src/i18n/locales/vi.json
+++ b/client/src/i18n/locales/vi.json
@@ -172,8 +172,10 @@
"fusionTab": "Sự kết hợp",
"embeddingsTab": "Nhúng",
"imageTab": "Hình ảnh",
+ "videoTab": "Video",
"audioTab": "Âm thanh",
"imageDesc": "Các mô hình tạo văn bản thành hình ảnh.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Mô hình chuyển văn bản thành giọng nói và chuyển lời nói thành văn bản.",
"mediaHint": "Tạo thông qua",
"mediaEmpty": "Chưa có mô hình nào. Họ đồng bộ hóa từ danh mục.",
diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.json
index 15d3c5b1..58de7bfd 100644
--- a/client/src/i18n/locales/yo.json
+++ b/client/src/i18n/locales/yo.json
@@ -172,8 +172,10 @@
"fusionTab": "Iparapọ",
"embeddingsTab": "Awọn ifibọ",
"imageTab": "Aworan",
+ "videoTab": "Video",
"audioTab": "Ohun",
"imageDesc": "Awọn awoṣe iran ọrọ-si-image.",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "Ọrọ-si-ọrọ ati awọn awoṣe ọrọ-si-ọrọ.",
"mediaHint": "Ṣe ina nipasẹ",
"mediaEmpty": "Ko si awọn awoṣe sibẹsibẹ. Wọn muṣiṣẹpọ lati katalogi.",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index c35035ee..28f56316 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -172,8 +172,10 @@
"fusionTab": "融合",
"embeddingsTab": "嵌入模型",
"imageTab": "图像",
+ "videoTab": "Video",
"audioTab": "音频",
"imageDesc": "文本生成图像模型。",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "文本转语音与语音转文本模型。",
"mediaHint": "通过以下端点生成",
"mediaEmpty": "暂无模型,将从目录同步。",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index fd681126..1bfb5082 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -172,8 +172,10 @@
"fusionTab": "融合",
"embeddingsTab": "嵌入模型",
"imageTab": "圖像",
+ "videoTab": "Video",
"audioTab": "音訊",
"imageDesc": "文字轉圖像生成模型。",
+ "videoDesc": "Text-to-video generation models.",
"audioDesc": "文字轉語音與語音轉文字模型。",
"mediaHint": "透過以下端點生成",
"mediaEmpty": "尚無模型,將從目錄同步。",
diff --git a/client/src/pages/MediaDetailPage.tsx b/client/src/pages/MediaDetailPage.tsx
index 1efa1484..660d4ec3 100644
--- a/client/src/pages/MediaDetailPage.tsx
+++ b/client/src/pages/MediaDetailPage.tsx
@@ -12,10 +12,10 @@ import type { MediaModel } from '@/components/media-models'
// One generative-media model's page: every provider that serves this logical
// model (failover routes across them), plus a ready-to-run snippet. Mirrors the
-// chat ModelDetailPage for the image, audio (TTS), and transcription (STT)
+// chat ModelDetailPage for image, video, audio (TTS), and transcription (STT)
// modalities. Transcription models list on the Audio tab, so their back link
// points there.
-export default function MediaDetailPage({ modality }: { modality: 'image' | 'audio' | 'transcription' }) {
+export default function MediaDetailPage({ modality }: { modality: 'image' | 'video' | 'audio' | 'transcription' }) {
const { t } = useI18n()
const { id } = useParams<{ id: string }>()
const label = id ? decodeURIComponent(id) : ''
@@ -52,7 +52,15 @@ export default function MediaDetailPage({ modality }: { modality: 'image' | 'aud
"model": "${exampleModel}",
"prompt": "a red cat"
}'`
- : modality === 'transcription'
+ : modality === 'video'
+ ? `curl ${base}/videos/generations \\
+ -H "Authorization: Bearer ${key}" \\
+ -H "Content-Type: application/json" \\
+ -d '{
+ "model": "${exampleModel}",
+ "prompt": "a sunrise over a quiet lake"
+ }' --output video.mp4`
+ : modality === 'transcription'
? `curl ${base}/audio/transcriptions \\
-H "Authorization: Bearer ${key}" \\
diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx
new file mode 100644
index 00000000..e78b0f0f
--- /dev/null
+++ b/client/src/pages/VideoPage.tsx
@@ -0,0 +1,5 @@
+import { MediaModelsView } from '@/components/media-models'
+
+export default function VideoPage() {
+ return <MediaModelsView modality="video" />
+}
diff --git a/docs/api.md b/docs/api.md
index 993fe44e..54628c8b 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -16,7 +16,7 @@ Any OpenAI-compatible client works (Anthropic / Claude clients too — see [Anth
- [Revocable URL tokens](#revocable-url-tokens)
- [Vision / image input](#vision--image-input)
- [Document attachments](#document-attachments)
-- [Images & text-to-speech](#images--text-to-speech)
+- [Images, video & text-to-speech](#images-video--text-to-speech)
- [Fusion (multi-model synthesis)](#fusion-multi-model-synthesis)
- [Response headers](#response-headers)
- [Embeddings](#embeddings)
@@ -239,9 +239,19 @@ Anthropic's `document` content blocks are accepted on `/v1/messages` when their
`url` sources are refused rather than fetched on your behalf; making the proxy retrieve arbitrary URLs would turn it into a request forwarder for whatever a client names.
-## Images & text-to-speech
+## Images, video & text-to-speech
-`POST /v1/images/generations` and `POST /v1/audio/speech` route across the providers that serve media models, including custom OpenAI-compatible media endpoints. Browse and toggle them on the dashboard's **Models → Image / Audio** tabs.
+`POST /v1/images/generations`, `POST /v1/videos/generations`, and `POST /v1/audio/speech` route across the providers that serve media models. Images and speech also accept custom OpenAI-compatible media endpoints; video does not. Browse and toggle them on the dashboard's **Models → Image / Video / Audio** tabs.
+
+Video generation accepts a JSON body with `prompt`, optional `model` (`auto` by default), and provider-dependent `duration`, `aspect_ratio`, `image`, `seed`, and `audio` options. It waits for queued providers to finish and returns the generated video as binary MP4 data:
+
+```bash
+curl http://localhost:3001/v1/videos/generations \
+ -H "Authorization: Bearer freellmapi-your-unified-key" \
+ -H "Content-Type: application/json" \
+ -d '{"model":"auto","prompt":"a sunrise over a quiet lake","duration":6}' \
+ --output video.mp4
+```
## Fusion (multi-model synthesis)
diff --git a/server/src/__tests__/routes/media-usage.test.ts b/server/src/__tests__/routes/media-usage.test.ts
index 769d3693..70021d4b 100644
--- a/server/src/__tests__/routes/media-usage.test.ts
+++ b/server/src/__tests__/routes/media-usage.test.ts
@@ -31,6 +31,7 @@ function seedModels() {
`);
insert.run('cloudflare', 'flux-1-schnell', 'FLUX.1 [schnell]', 'image', 1, 1, 'Shared 10k neurons/day');
insert.run('pollinations', 'turbo', 'Turbo', 'image', 2, 1, '1024x1024 - 40 req/min free');
+ insert.run('pollinations', 'nova-reel', 'Nova Reel', 'video', 1, 1, 'Recurring daily Pollen refill');
insert.run('groq', 'playai-tts', 'PlayAI TTS', 'audio', 1, 1, 'WAV/PCM - 30+ voices');
// Disabled rows stay out of the summary entirely.
insert.run('cloudflare', 'melotts', 'MeloTTS', 'audio', 2, 0, 'Shared 10k neurons/day');
@@ -60,7 +61,7 @@ describe('GET /api/media/usage', () => {
it('rejects a missing or unknown modality', async () => {
expect((await get(app, '/api/media/usage')).status).toBe(400);
- expect((await get(app, '/api/media/usage?modality=video')).status).toBe(400);
+ expect((await get(app, '/api/media/usage?modality=not-real')).status).toBe(400);
});
it('counts this month\'s requests per model and separates today', async () => {
@@ -87,9 +88,11 @@ describe('GET /api/media/usage', () => {
it('scopes to one modality and skips disabled rows', async () => {
const image = await get(app, '/api/media/usage?modality=image');
+ const video = await get(app, '/api/media/usage?modality=video');
const audio = await get(app, '/api/media/usage?modality=audio');
expect(image.body.models.map((m: any) => m.modelId).sort()).toEqual(['flux-1-schnell', 'turbo']);
+ expect(video.body.models.map((m: any) => m.modelId)).toEqual(['nova-reel']);
// MeloTTS is disabled, so only PlayAI is reported.
expect(audio.body.models.map((m: any) => m.modelId)).toEqual(['playai-tts']);
});
diff --git a/server/src/__tests__/routes/video-generations.test.ts b/server/src/__tests__/routes/video-generations.test.ts
new file mode 100644
index 00000000..936f084a
--- /dev/null
+++ b/server/src/__tests__/routes/video-generations.test.ts
@@ -0,0 +1,87 @@
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import type { Express } from 'express';
+import { createApp } from '../../app.js';
+import { initDb, getDb, getUnifiedApiKey } from '../../db/index.js';
+import { encrypt } from '../../lib/crypto.js';
+
+const realFetch = globalThis.fetch;
+
+async function post(app: Express, body: unknown, authenticated = true) {
+ const server = app.listen(0, '127.0.0.1');
+ if (!server.listening) await new Promise<void>(resolve => server.once('listening', resolve));
+ const address = server.address() as { port: number };
+ const response = await realFetch(`http://127.0.0.1:${address.port}/v1/videos/generations`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ ...(authenticated ? { Authorization: `Bearer ${getUnifiedApiKey()}` } : {}),
+ },
+ body: JSON.stringify(body),
+ });
+ const bytes = Buffer.from(await response.arrayBuffer());
+ server.close();
+ return { response, bytes };
+}
+
+describe('POST /v1/videos/generations', () => {
+ let app: Express;
+
+ beforeEach(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ app = createApp();
+ const { encrypted, iv, authTag } = encrypt('sk_pollinations_video_test');
+ getDb().prepare(`
+ INSERT INTO api_keys (platform, label, encrypted_key, iv, auth_tag, status, enabled)
+ VALUES ('pollinations', 'video test', ?, ?, ?, 'healthy', 1)
+ `).run(encrypted, iv, authTag);
+ getDb().prepare(`
+ INSERT INTO media_models
+ (platform, model_id, display_name, modality, priority, enabled, quota_label)
+ VALUES ('pollinations', 'nova-reel', 'Nova Reel', 'video', 0, 1, 'Recurring daily Pollen refill')
+ `).run();
+ });
+
+ afterEach(() => {
+ globalThis.fetch = realFetch;
+ vi.restoreAllMocks();
+ });
+
+ it('requires the unified API key', async () => {
+ const { response } = await post(app, { prompt: 'a sunrise' }, false);
+ expect(response.status).toBe(401);
+ });
+
+ it('returns the completed MP4 and routing headers', async () => {
+ globalThis.fetch = vi.fn(async (input: string | URL | Request) => {
+ if (String(input).startsWith('https://gen.pollinations.ai/video/')) {
+ return new Response(Buffer.from('VIDEO'), {
+ status: 200,
+ headers: { 'content-type': 'video/mp4' },
+ });
+ }
+ return realFetch(input);
+ }) as any;
+
+ const { response, bytes } = await post(app, {
+ model: 'nova-reel',
+ prompt: 'a sunrise',
+ duration: 6,
+ });
+
+ expect(response.status).toBe(200);
+ expect(response.headers.get('content-type')).toContain('video/mp4');
+ expect(response.headers.get('x-provider')).toBe('pollinations');
+ expect(response.headers.get('x-model')).toBe('nova-reel');
+ expect(bytes.toString()).toBe('VIDEO');
+ });
+
+ it('validates provider-independent request options before routing', async () => {
+ const { response, bytes } = await post(app, {
+ prompt: 'a sunrise',
+ duration: 121,
+ });
+ expect(response.status).toBe(400);
+ expect(JSON.parse(bytes.toString()).error.type).toBe('invalid_request_error');
+ });
+});
diff --git a/server/src/__tests__/services/catalog-sync.test.ts b/server/src/__tests__/services/catalog-sync.test.ts
index c9b7829f..7780e7b4 100644
--- a/server/src/__tests__/services/catalog-sync.test.ts
+++ b/server/src/__tests__/services/catalog-sync.test.ts
@@ -503,6 +503,107 @@ describe('applyCatalog: transcriptionModels', () => {
});
});
+// Video models use a dedicated optional top-level registry. That shape is the
+// backward-compatibility boundary: clients released before video support ignore
+// it, instead of misclassifying an unknown models[].modality as chat.
+describe('applyCatalog: videoModels', () => {
+ type CatalogVideo = NonNullable<AnyCatalog['videoModels']>[number];
+
+ beforeAll(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ });
+
+ function videoRoster(): CatalogVideo[] {
+ return [
+ {
+ platform: 'pollinations',
+ modelId: 'nova-reel',
+ displayName: 'Nova Reel',
+ priority: 0,
+ enabled: true,
+ quotaLabel: 'Recurring daily Pollen refill',
+ },
+ {
+ platform: 'huggingface',
+ modelId: 'Lightricks/LTX-Video-0.9.5',
+ displayName: 'LTX-Video 0.9.5',
+ priority: 1,
+ enabled: true,
+ quotaLabel: '$0.10 shared monthly credits',
+ providerModelId: 'fal-ai/ltx-video-v095',
+ },
+ ];
+ }
+
+ function videoCatalog(entries?: CatalogVideo[]): AnyCatalog {
+ const catalog = catalogOf(existingAsCatalogModels());
+ if (entries) catalog.videoModels = entries;
+ return catalog;
+ }
+
+ function videoRows(): Array<{ platform: string; model_id: string; enabled: number; priority: number; meta_json: string | null }> {
+ return getDb().prepare(`
+ SELECT platform, model_id, enabled, priority, meta_json
+ FROM media_models
+ WHERE modality = 'video'
+ ORDER BY priority, id
+ `).all() as any;
+ }
+
+ it('lands the video roster and provider-native metadata in media_models', () => {
+ const counts = applyCatalog(getDb(), videoCatalog(videoRoster()));
+ expect(counts.inserted).toBeGreaterThanOrEqual(2);
+ expect(videoRows().map(r => `${r.platform}:${r.model_id}`)).toEqual([
+ 'pollinations:nova-reel',
+ 'huggingface:Lightricks/LTX-Video-0.9.5',
+ ]);
+ expect(videoRows()[0].meta_json).toBeNull();
+ expect(JSON.parse(videoRows()[1].meta_json!)).toEqual({ providerModelId: 'fal-ai/ltx-video-v095' });
+ });
+
+ it('retains video rows when an older catalog omits the optional registry', () => {
+ applyCatalog(getDb(), videoCatalog(undefined));
+ expect(videoRows()).toHaveLength(2);
+ });
+
+ it('prunes only video rows when the registry drops a model', () => {
+ const counts = applyCatalog(
+ getDb(),
+ videoCatalog(videoRoster().filter(m => m.platform !== 'pollinations')),
+ );
+ expect(counts.removed).toBe(1);
+ expect(videoRows().map(r => r.model_id)).toEqual(['Lightricks/LTX-Video-0.9.5']);
+ });
+
+ it('skips a video entry without a runtime adapter', () => {
+ const roster = videoRoster();
+ roster.push({
+ platform: 'cloudflare',
+ modelId: 'future-video',
+ displayName: 'Future Video',
+ priority: 9,
+ enabled: true,
+ });
+ const counts = applyCatalog(getDb(), videoCatalog(roster));
+ expect(counts.skippedUnknownPlatform).toBeGreaterThanOrEqual(1);
+ expect(videoRows().map(r => r.model_id)).not.toContain('future-video');
+ });
+
+ it('keeps a user-deleted video model tombstoned', () => {
+ recordCatalogModelTombstone(getDb(), 'media', 'pollinations', 'nova-reel');
+ applyCatalog(getDb(), videoCatalog(videoRoster()));
+ expect(videoRows().map(r => r.model_id)).not.toContain('nova-reel');
+ });
+
+ it('rejects malformed video metadata before applying the cached catalog', () => {
+ const catalog = videoCatalog(videoRoster());
+ (catalog.videoModels![0] as any).providerModelId = 42;
+ setSetting('catalog_applied_json', JSON.stringify(catalog));
+ expect(reapplyCachedCatalog().reapplied).toBe(false);
+ });
+});
+
// Generative media rows (image/audio) carry adapter metadata in meta_json the
// same way transcription rows do — the flavour a platform's endpoint expects.
// Cloudflare hosts both JSON-body image models and the FLUX.2 family, whose
diff --git a/server/src/__tests__/services/media.test.ts b/server/src/__tests__/services/media.test.ts
index cff2f09d..fa744d13 100644
--- a/server/src/__tests__/services/media.test.ts
+++ b/server/src/__tests__/services/media.test.ts
@@ -1,7 +1,7 @@
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { initDb, getDb } from '../../db/index.js';
import { encrypt } from '../../lib/crypto.js';
-import { runImageGeneration, runSpeech, MediaError } from '../../services/media.js';
+import { runImageGeneration, runVideoGeneration, runSpeech, MediaError } from '../../services/media.js';
const realFetch = globalThis.fetch;
@@ -25,7 +25,7 @@ function addCustomKey(baseUrl: string, raw = 'custom-media-key'): number {
function addMedia(
platform: string,
modelId: string,
- modality: 'image' | 'audio',
+ modality: 'image' | 'video' | 'audio',
priority = 1,
keyId: number | null = null,
metaJson: string | null = null,
@@ -221,6 +221,189 @@ describe('media service', () => {
});
});
+ describe('video generation', () => {
+ it('Pollinations: sends the authenticated nova-reel request and returns MP4 bytes', async () => {
+ addMedia('pollinations', 'nova-reel', 'video');
+ addKey('pollinations', 'sk_pollinations_test');
+ const fetchMock = vi.fn(async () =>
+ new Response(Buffer.from('MP4DATA'), { status: 200, headers: { 'content-type': 'video/mp4' } }));
+ globalThis.fetch = fetchMock as any;
+
+ const result = await runVideoGeneration('nova-reel', {
+ prompt: 'sunrise over a lake',
+ duration: 12,
+ aspectRatio: '16:9',
+ seed: 7,
+ });
+
+ expect(result.platform).toBe('pollinations');
+ expect(result.video.toString()).toBe('MP4DATA');
+ expect(result.contentType).toBe('video/mp4');
+ const url = new URL(String(fetchMock.mock.calls[0][0]));
+ expect(url.pathname).toBe('/video/sunrise%20over%20a%20lake');
+ expect(url.searchParams.get('model')).toBe('nova-reel');
+ expect(url.searchParams.get('duration')).toBe('12');
+ expect(url.searchParams.get('aspectRatio')).toBe('16:9');
+ expect((fetchMock.mock.calls[0][1] as RequestInit).headers).toMatchObject({
+ Authorization: 'Bearer sk_pollinations_test',
+ });
+ });
+
+ it('Pollinations: omits duration entirely when the caller did not ask for one', async () => {
+ // Allowed lengths differ per model (nova-reel 6-120 by 6, veo 4/6/8,
+ // minimax-h3 exactly 5), so guessing one would 400 on most of the
+ // roster. No duration means the provider uses the model's own default.
+ addMedia('pollinations', 'nova-reel', 'video');
+ addKey('pollinations', 'sk_pollinations_test');
+ const fetchMock = vi.fn(async () =>
+ new Response(Buffer.from('MP4DATA'), { status: 200, headers: { 'content-type': 'video/mp4' } }));
+ globalThis.fetch = fetchMock as any;
+
+ await runVideoGeneration('nova-reel', { prompt: 'sunrise over a lake' });
+
+ const url = new URL(String(fetchMock.mock.calls[0][0]));
+ expect(url.searchParams.has('duration')).toBe(false);
+ expect(url.searchParams.get('model')).toBe('nova-reel');
+ });
+
+ it('Pollinations: rejects unsupported nova-reel durations before calling upstream', async () => {
+ addMedia('pollinations', 'nova-reel', 'video');
+ addKey('pollinations');
+ const fetchMock = vi.fn();
+ globalThis.fetch = fetchMock as any;
+
+ await expect(runVideoGeneration('nova-reel', {
+ prompt: 'x',
+ duration: 7,
+ })).rejects.toMatchObject({ status: 400 });
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+
+ it('Hugging Face: submits and resolves the fal.ai queue without leaking the token to the media URL', async () => {
+ addMedia(
+ 'huggingface',
+ 'Lightricks/LTX-Video-0.9.5',
+ 'video',
+ 1,
+ null,
+ JSON.stringify({ providerModelId: 'fal-ai/ltx-video-v095' }),
+ );
+ addKey('huggingface', 'hf_test_token');
+ // The submit is answered with a job that is still queued, so the poll
+ // loop actually runs: an unmatched URL is a hard failure rather than
+ // falling through to a canned COMPLETED reply.
+ const submitUrl = 'https://router.huggingface.co/fal-ai/fal-ai/ltx-video-v095?_subdomain=queue';
+ const jobUrl = 'https://router.huggingface.co/fal-ai/fal-ai/ltx-video-v095/requests/job-1?_subdomain=queue';
+ const statusUrl = 'https://router.huggingface.co/fal-ai/fal-ai/ltx-video-v095/requests/job-1/status?_subdomain=queue';
+ const fetchMock = vi.fn(async (input: string | URL | Request) => {
+ const url = String(input);
+ if (url === submitUrl) {
+ return jsonResponse({
+ request_id: 'job-1',
+ status: 'IN_QUEUE',
+ response_url: 'https://queue.fal.run/fal-ai/ltx-video-v095/requests/job-1',
+ });
+ }
+ if (url === statusUrl) return jsonResponse({ status: 'COMPLETED' });
+ if (url === jobUrl) {
+ return jsonResponse({ video: { url: 'https://cdn.example.test/video.mp4', content_type: 'video/mp4' } });
+ }
+ if (url === 'https://cdn.example.test/video.mp4') {
+ return new Response(Buffer.from('HFVIDEO'), { status: 200, headers: { 'content-type': 'video/mp4' } });
+ }
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ globalThis.fetch = fetchMock as any;
+
+ const result = await runVideoGeneration('Lightricks/LTX-Video-0.9.5', {
+ prompt: 'paper boats on a stream',
+ seed: 42,
+ });
+
+ expect(result.video.toString()).toBe('HFVIDEO');
+ expect(fetchMock.mock.calls.map(c => String(c[0]))).toEqual([
+ submitUrl,
+ statusUrl,
+ jobUrl,
+ 'https://cdn.example.test/video.mp4',
+ ]);
+ expect(JSON.parse(String((fetchMock.mock.calls[0][1] as RequestInit).body))).toEqual({
+ prompt: 'paper boats on a stream',
+ seed: 42,
+ });
+ // The status and result reads are authenticated; the CDN download is not,
+ // so the HF token never reaches a host named by an upstream response.
+ expect((fetchMock.mock.calls[1][1] as RequestInit).headers).toMatchObject({
+ Authorization: 'Bearer hf_test_token',
+ });
+ expect((fetchMock.mock.calls[3][1] as RequestInit).headers).toBeUndefined();
+ });
+
+ it('stops the chain when the API caller hangs up instead of paying for a second provider', async () => {
+ addMedia('pollinations', 'nova-reel', 'video', 1);
+ addMedia('pollinations', 'wan-fast', 'video', 2);
+ addKey('pollinations', 'sk_pollinations_test');
+ const controller = new AbortController();
+ const fetchMock = vi.fn(async () => {
+ controller.abort();
+ throw new Error('socket hang up');
+ });
+ globalThis.fetch = fetchMock as any;
+
+ await expect(runVideoGeneration('auto', { prompt: 'x' }, controller.signal))
+ .rejects.toMatchObject({ status: 499 });
+ // The second catalogued provider is never attempted.
+ expect(fetchMock).toHaveBeenCalledTimes(1);
+ });
+
+ it('reports an upstream key rejection as an upstream failure, not a caller auth error', async () => {
+ // A 401 from the provider means the OPERATOR's key was refused. Passing
+ // it to the caller would tell an OpenAI SDK that its own gateway key is
+ // bad; a caller-attributable 400 does travel through.
+ addMedia('pollinations', 'nova-reel', 'video');
+ addKey('pollinations', 'sk_pollinations_test');
+ globalThis.fetch = vi.fn(async () => new Response('nope', { status: 401 })) as any;
+ await expect(runVideoGeneration('nova-reel', { prompt: 'x' }))
+ .rejects.toMatchObject({ status: 502 });
+
+ globalThis.fetch = vi.fn(async () => new Response('bad prompt', { status: 400 })) as any;
+ await expect(runVideoGeneration('nova-reel', { prompt: 'x' }))
+ .rejects.toMatchObject({ status: 400 });
+ });
+
+ it('Hugging Face: refuses a result URL that points at a blocked address class', async () => {
+ // The result URL is the one URL in this adapter that comes out of an
+ // upstream JSON body, so it goes through the same guard custom-provider
+ // base URLs do (#440) instead of being fetched and streamed back.
+ addMedia(
+ 'huggingface',
+ 'Lightricks/LTX-Video-0.9.5',
+ 'video',
+ 1,
+ null,
+ JSON.stringify({ providerModelId: 'fal-ai/ltx-video-v095' }),
+ );
+ addKey('huggingface', 'hf_test_token');
+ const fetchMock = vi.fn(async (input: string | URL | Request) => {
+ const url = String(input);
+ if (url.includes('requests/job-1?_subdomain=queue')) {
+ return jsonResponse({ video: { url: 'http://169.254.169.254/latest/meta-data/' } });
+ }
+ return jsonResponse({
+ request_id: 'job-1',
+ status: 'COMPLETED',
+ response_url: 'https://queue.fal.run/fal-ai/ltx-video-v095/requests/job-1',
+ });
+ });
+ globalThis.fetch = fetchMock as any;
+
+ await expect(runVideoGeneration('Lightricks/LTX-Video-0.9.5', { prompt: 'x' }))
+ .rejects.toThrow(/unusable video URL/);
+ // Submit + result read only; the metadata address was never contacted.
+ expect(fetchMock).toHaveBeenCalledTimes(2);
+ });
+ });
+
describe('text-to-speech', () => {
it('Cloudflare MeloTTS: base64 audio → audio/mpeg bytes', async () => {
addMedia('cloudflare', '@cf/myshell-ai/melotts', 'audio');
diff --git a/server/src/docs/openapi.ts b/server/src/docs/openapi.ts
index 19b92c33..30e0a4af 100644
--- a/server/src/docs/openapi.ts
+++ b/server/src/docs/openapi.ts
@@ -171,6 +171,37 @@ export const openapiSpec = {
},
},
},
+ '/v1/videos/generations': {
+ post: {
+ tags: ['Media'],
+ operationId: 'createVideo',
+ summary: 'Generate video',
+ description:
+ 'Text-to-video generation routed through the dedicated video catalog. Omit `model` (or set ' +
+ '`auto`) to fail over across configured providers. The completed video is returned as MP4 bytes; ' +
+ 'provider-specific options that are unsupported by the selected model are ignored.',
+ requestBody: {
+ required: true,
+ content: {
+ 'application/json': {
+ schema: { $ref: '#/components/schemas/VideoRequest' },
+ },
+ },
+ },
+ responses: {
+ '200': {
+ description: 'The generated video.',
+ content: {
+ 'video/mp4': { schema: { type: 'string', format: 'binary' } },
+ },
+ },
+ '400': { $ref: '#/components/responses/BadRequest' },
+ '401': { $ref: '#/components/responses/Unauthorized' },
+ '429': { $ref: '#/components/responses/RateLimited' },
+ '502': { $ref: '#/components/responses/UpstreamError' },
+ },
+ },
+ },
'/v1/audio/speech': {
post: {
tags: ['Media'],
@@ -873,6 +904,24 @@ export const openapiSpec = {
provider: { type: 'string' },
},
},
+ VideoRequest: {
+ type: 'object',
+ required: ['prompt'],
+ properties: {
+ model: { type: 'string', default: 'auto' },
+ prompt: { type: 'string', minLength: 1 },
+ duration: {
+ type: 'integer',
+ minimum: 1,
+ maximum: 120,
+ description: 'Requested duration in seconds. Supported values are model-specific; nova-reel accepts multiples of 6.',
+ },
+ aspect_ratio: { type: 'string', enum: ['16:9', '9:16'] },
+ image: { type: 'string', format: 'uri', description: 'Optional starting-frame image URL.' },
+ seed: { type: 'integer', minimum: -1, maximum: 2147483647 },
+ audio: { type: 'boolean', description: 'Request generated audio when the selected model supports it.' },
+ },
+ },
SpeechRequest: {
type: 'object',
required: ['input'],
diff --git a/server/src/lib/proxy.ts b/server/src/lib/proxy.ts
index b8684b96..93813019 100644
--- a/server/src/lib/proxy.ts
+++ b/server/src/lib/proxy.ts
@@ -332,7 +332,7 @@ async function resolveDispatcher(): Promise<{ dispatcher: unknown; isSocks: bool
* written to `requests.request_type` so the abort message and the row
* column agree on terminology.
*/
-export type ProxyRequestType = 'chat' | 'embedding' | 'image' | 'audio' | 'transcription' | 'unknown';
+export type ProxyRequestType = 'chat' | 'embedding' | 'image' | 'video' | 'audio' | 'transcription' | 'unknown';
/**
* Build an AbortError DOMException whose `message` carries a compact triage
diff --git a/server/src/routes/media.ts b/server/src/routes/media.ts
index c8c05f81..65b62359 100644
--- a/server/src/routes/media.ts
+++ b/server/src/routes/media.ts
@@ -9,7 +9,7 @@ import { listAllMediaModels } from '../services/media.js';
export const mediaRouter = Router();
-// Generative-media models (image + audio/TTS) for the dashboard Image/Audio tabs.
+// Generative-media models for the dashboard Image/Video/Audio tabs.
// Mirrors the embeddings tab: a flat list with an enable toggle per row. keyCount
// surfaces whether the row's platform has a usable key configured.
mediaRouter.get('/', (_req: Request, res: Response) => {
@@ -53,9 +53,9 @@ mediaRouter.get('/', (_req: Request, res: Response) => {
// logMedia), so the Audio tab's STT section can show the same per-model
// counts instead of dead-ending on a 400.
mediaRouter.get('/usage', (req: Request, res: Response) => {
- const parsed = z.enum(['image', 'audio', 'transcription']).safeParse(req.query.modality);
+ const parsed = z.enum(['image', 'video', 'audio', 'transcription']).safeParse(req.query.modality);
if (!parsed.success) {
- res.status(400).json({ error: { message: 'modality must be image, audio or transcription' } });
+ res.status(400).json({ error: { message: 'modality must be image, video, audio or transcription' } });
return;
}
const modality = parsed.data;
diff --git a/server/src/routes/proxy.ts b/server/src/routes/proxy.ts
index 7215aff5..7ee36a53 100644
--- a/server/src/routes/proxy.ts
+++ b/server/src/routes/proxy.ts
@@ -6,7 +6,7 @@ import type { ChatMessage, ChatToolCall, ModelListRow, TokenUsage } from '@freel
import { routeRequest, resolveRoutingChain, resolveModelGroupCandidates, resolveStickyPreference, recordRateLimitHit, recordSuccess, hasEnabledVisionModel, hasEnabledToolsModel, hasOtherUsableKey, routingReserveTokens, type RouteResult, type ResolvedChain, type ChainRow } from '../services/router.js';
import { recordRequest, recordTokens, setCooldown, getCooldownDurationForLimit, PAYMENT_REQUIRED_COOLDOWN_MS, MODEL_FORBIDDEN_COOLDOWN_MS, learnLimitFromError } from '../services/ratelimit.js';
import { runEmbeddings, EmbeddingsError } from '../services/embeddings.js';
-import { runImageGeneration, runSpeech, runTranscription, MediaError, MAX_TRANSCRIPTION_BYTES } from '../services/media.js';
+import { runImageGeneration, runVideoGeneration, runSpeech, runTranscription, MediaError, MAX_TRANSCRIPTION_BYTES } from '../services/media.js';
import multer from 'multer';
import { getDb } from '../db/index.js';
import { resolveAuth, prependSystemPrompt, type ResolvedAuth } from '../lib/system-prompt.js';
@@ -629,6 +629,65 @@ proxyRouter.post('/images/generations', async (req: Request, res: Response) => {
}
});
+// Text-to-video generation. Providers may use a synchronous binary response
+// (Pollinations) or an asynchronous queue internally (Hugging Face/fal.ai), but
+// this gateway presents one bounded request and returns the completed MP4.
+const VideoBody = z.object({
+ model: z.string().optional(),
+ prompt: z.string().min(1),
+ duration: z.number().int().min(1).max(120).optional(),
+ aspect_ratio: z.enum(['16:9', '9:16']).optional(),
+ image: z.string().url().optional(),
+ seed: z.number().int().min(-1).max(2_147_483_647).optional(),
+ audio: z.boolean().optional(),
+});
+
+proxyRouter.post('/videos/generations', async (req: Request, res: Response) => {
+ if (!requireInferenceAuth(req, res)) return;
+ const parsed = VideoBody.safeParse(req.body);
+ if (!parsed.success) {
+ res.status(400).json({
+ error: {
+ message: 'Invalid request: `prompt` is required and video options must use supported values',
+ type: 'invalid_request_error',
+ },
+ });
+ return;
+ }
+ // A video job runs for minutes, so a caller that hangs up must actually stop
+ // the work: without this the gateway would keep polling the provider and then
+ // fail over to a second one, both charged to the operator, for a response
+ // nobody is waiting for. 'close' also fires on normal completion, which
+ // writableEnded distinguishes.
+ const clientAbort = new AbortController();
+ res.on('close', () => {
+ if (!res.writableEnded) clientAbort.abort();
+ });
+ try {
+ const result = await runVideoGeneration(parsed.data.model, {
+ prompt: parsed.data.prompt,
+ duration: parsed.data.duration,
+ aspectRatio: parsed.data.aspect_ratio,
+ image: parsed.data.image,
+ seed: parsed.data.seed,
+ audio: parsed.data.audio,
+ }, clientAbort.signal);
+ res.setHeader('Content-Type', result.contentType);
+ res.setHeader('Cache-Control', 'no-store');
+ res.setHeader('X-Provider', safeHeaderValue(result.platform));
+ res.setHeader('X-Model', safeHeaderValue(result.modelId));
+ res.send(result.video);
+ } catch (err: any) {
+ // Nothing to report to a socket that is already gone.
+ if (clientAbort.signal.aborted || res.writableEnded) return;
+ const status = err instanceof MediaError ? err.status : 502;
+ const httpStatus = status >= 400 && status < 600 ? status : 502;
+ res.status(httpStatus).json({
+ error: { message: `video generation error: ${err?.message ?? 'unknown'}`, type: mediaErrorType(status) },
+ });
+ }
+});
+
// OpenAI-compatible text-to-speech. Returns raw audio bytes (OpenAI's /audio/speech
// shape). Same media-catalog routing as images.
const SpeechBody = z.object({
diff --git a/server/src/services/catalog-sync.ts b/server/src/services/catalog-sync.ts
index 3025d7d8..eb1e20e9 100644
--- a/server/src/services/catalog-sync.ts
+++ b/server/src/services/catalog-sync.ts
@@ -2,7 +2,7 @@ import crypto from 'crypto';
import type { Db } from '../db/types.js';
import { getDb, getSetting, setSetting } from '../db/index.js';
import { hasProvider } from '../providers/index.js';
-import { MEDIA_PLATFORMS, TRANSCRIPTION_PLATFORMS } from './media.js';
+import { MEDIA_PLATFORMS, TRANSCRIPTION_PLATFORMS, VIDEO_PLATFORMS } from './media.js';
import { EMBEDDING_PLATFORMS } from './embeddings.js';
import type { Platform } from '@freellmapi/shared/types.js';
import type { Scheduler } from '../lib/scheduler.js';
@@ -145,6 +145,20 @@ interface CatalogTranscriptionModel {
quotaLabel?: string;
}
+interface CatalogVideoModel {
+ platform: string;
+ modelId: string;
+ displayName: string;
+ /** Failover order within the video chain, lower first. */
+ priority: number;
+ enabled: boolean;
+ /** Short display note, mirrored into media_models.quota_label. */
+ quotaLabel?: string;
+ /** Provider-native deployment id when it differs from the public model id
+ * (for example Hugging Face's fal.ai mapping). */
+ providerModelId?: string;
+}
+
interface Catalog {
version: string;
generatedAt: string;
@@ -159,6 +173,9 @@ interface Catalog {
* modality would ingest unknown-modality `models` entries as CHAT models,
* while an unknown optional key is simply ignored by their isCatalog. */
transcriptionModels?: CatalogTranscriptionModel[];
+ /** Text-to-video registry. Kept out of `models` so pre-video binaries ignore
+ * it rather than routing unknown-modality rows through chat. */
+ videoModels?: CatalogVideoModel[];
quirks: CatalogQuirk[];
}
@@ -206,6 +223,18 @@ function isCatalog(value: unknown): value is Catalog {
(m.maxBytes === undefined || m.maxBytes === null || typeof m.maxBytes === 'number') &&
(m.requestStyle === undefined || m.requestStyle === null || typeof m.requestStyle === 'string'),
))) &&
+ (c.videoModels === undefined ||
+ (Array.isArray(c.videoModels) &&
+ c.videoModels.every(
+ (m) =>
+ typeof m?.platform === 'string' &&
+ typeof m?.modelId === 'string' &&
+ typeof m?.displayName === 'string' &&
+ typeof m?.priority === 'number' &&
+ typeof m?.enabled === 'boolean' &&
+ (m.quotaLabel === undefined || typeof m.quotaLabel === 'string') &&
+ (m.providerModelId === undefined || typeof m.providerModelId === 'string'),
+ ))) &&
c.models.every(
(m) =>
typeof m?.platform === 'string' &&
@@ -313,6 +342,7 @@ export function applyCatalog(db: Db, catalog: Catalog): NonNullable<SyncResult['
const inMediaCatalog = new Set<string>();
const inEmbeddingCatalog = new Set<string>();
const inTranscriptionCatalog = new Set<string>();
+ const inVideoCatalog = new Set<string>();
for (const m of catalog.models) {
// Media modalities are gated on MEDIA_PLATFORMS (decoupled from the chat
@@ -397,6 +427,39 @@ export function applyCatalog(db: Db, catalog: Catalog): NonNullable<SyncResult['
}
}
+ // Video models use their own optional full snapshot. Older catalogs omit
+ // the key and leave existing video rows untouched; older binaries ignore
+ // the key entirely, which is why these rows must not live in models[].
+ if (catalog.videoModels) {
+ for (const m of catalog.videoModels) {
+ if (!VIDEO_PLATFORMS.has(m.platform)) {
+ counts.skippedUnknownPlatform++;
+ continue;
+ }
+ if (isCatalogModelTombstoned(db, 'media', m.platform, m.modelId)) continue;
+ inVideoCatalog.add(`${m.platform}:${m.modelId}`);
+ const meta = typeof m.providerModelId === 'string'
+ ? JSON.stringify({ providerModelId: m.providerModelId })
+ : null;
+ const fields = {
+ displayName: m.displayName,
+ modality: 'video',
+ priority: m.priority,
+ quotaLabel: m.quotaLabel ?? '',
+ metaJson: meta,
+ };
+ const row = selectMedia.get(m.platform, m.modelId) as { id: number; enabled: number } | undefined;
+ if (row) {
+ const enabled = m.enabled ? row.enabled : 0;
+ updateMedia.run({ ...fields, id: row.id, enabled });
+ counts.updated++;
+ } else {
+ insertMedia.run({ ...fields, platform: m.platform, modelId: m.modelId, enabled: m.enabled ? 1 : 0 });
+ counts.inserted++;
+ }
+ }
+ }
+
// Embeddings are their own full snapshot. Older catalogs omit this field;
// in that case retain the app's bundled embedding baseline untouched.
if (catalog.embeddings) {
@@ -510,11 +573,14 @@ export function applyCatalog(db: Db, catalog: Catalog): NonNullable<SyncResult['
}
// Remove media models the catalog no longer lists (own table, no
- // fallback_config). Scoped to the generative modalities: transcription
- // rows are maintained by the `transcriptionModels` snapshot below, and
- // must survive here even when its key is absent from an older catalog.
+ // fallback_config). Deliberately an ALLOWLIST of the two modalities that
+ // `models[]` maintains, not "everything except transcription": video and
+ // transcription rows come from their own optional snapshots below, so a
+ // catalog that omits those keys must leave them alone. Widening this back
+ // to a `!=` filter would silently delete every video row on the first sync
+ // from an older catalog.
const mediaCandidates = db
- .prepare("SELECT id, platform, model_id FROM media_models WHERE modality != 'transcription'")
+ .prepare("SELECT id, platform, model_id FROM media_models WHERE modality IN ('image', 'audio')")
.all() as { id: number; platform: string; model_id: string }[];
const deleteMedia = db.prepare('DELETE FROM media_models WHERE id = ?');
for (const c of mediaCandidates) {
@@ -525,6 +591,21 @@ export function applyCatalog(db: Db, catalog: Catalog): NonNullable<SyncResult['
}
}
+ // Prune video rows only when this catalog actually carries the dedicated
+ // snapshot. An older catalog cannot know whether a video row was retired.
+ if (catalog.videoModels) {
+ const videoCandidates = db
+ .prepare("SELECT id, platform, model_id FROM media_models WHERE modality = 'video'")
+ .all() as { id: number; platform: string; model_id: string }[];
+ for (const c of videoCandidates) {
+ if (!VIDEO_PLATFORMS.has(c.platform)) continue;
+ if (!inVideoCatalog.has(`${c.platform}:${c.model_id}`)) {
+ deleteMedia.run(c.id);
+ counts.removed++;
+ }
+ }
+ }
+
// Prune transcription rows only when the catalog actually carries the
// snapshot (mirrors the embeddings rule), scoped to the modality so
// image/audio rows are never touched by it.
diff --git a/server/src/services/media.ts b/server/src/services/media.ts
index b910203f..dcc4e922 100644
--- a/server/src/services/media.ts
+++ b/server/src/services/media.ts
@@ -1,4 +1,4 @@
-// Generative-media routing (image generation + audio/TTS).
+// Generative-media routing (image, video, and audio/TTS).
//
// Self-contained, exactly like embeddings: media models live in their OWN
// `media_models` table so they can NEVER enter the chat router's candidate pool
@@ -11,12 +11,18 @@ import { getDb } from '../db/index.js';
import { getClientContext } from '../lib/client-context.js';
import { decrypt } from '../lib/crypto.js';
import { proxyFetch } from '../lib/proxy.js';
+import { assessProviderUrl } from '../lib/url-guard.js';
import { isOnCooldown, setCooldown } from './ratelimit.js';
/** Platforms with a media adapter below. catalog-sync gates media rows on this
* (decoupled from the chat provider registry — e.g. SiliconFlow is media-only). */
export const MEDIA_PLATFORMS = new Set(['nvidia', 'pollinations', 'cloudflare', 'siliconflow', 'google']);
+/** Video uses a dedicated optional catalog registry so binaries that predate
+ * this modality ignore the rows instead of accidentally ingesting them as
+ * chat models. Keep its adapter allowlist separate for the same reason. */
+export const VIDEO_PLATFORMS = new Set(['pollinations', 'huggingface']);
+
/** Platforms whose free media path needs no API key (anonymous). */
const KEYLESS_CAPABLE = new Set(['pollinations']);
@@ -30,7 +36,7 @@ export const TRANSCRIPTION_PLATFORMS = new Set(['groq', 'cloudflare']);
// catalog-sync), never via migrations. Their per-model adapter metadata
// (native subtitle formats, upload ceiling, request flavor) rides in the
// meta_json column — see TranscriptionMeta below.
-export type MediaModality = 'image' | 'audio' | 'transcription';
+export type MediaModality = 'image' | 'video' | 'audio' | 'transcription';
export interface MediaModelRow {
id: number;
@@ -67,8 +73,22 @@ export interface SpeechResult {
audio: Buffer;
contentType: string;
}
+export interface VideoResult {
+ platform: string;
+ modelId: string;
+ video: Buffer;
+ contentType: string;
+}
export interface ImageParams { prompt: string; n?: number; size?: string }
export interface SpeechParams { input: string; voice?: string; format?: string }
+export interface VideoParams {
+ prompt: string;
+ duration?: number;
+ aspectRatio?: '16:9' | '9:16';
+ image?: string;
+ seed?: number;
+ audio?: boolean;
+}
// OpenAI clients commonly send one of these voice names even when the user did
// not choose a voice explicitly. Native TTS providers use unrelated voice
@@ -162,6 +182,17 @@ function geminiVoice(requested?: string): string {
// Media generations are slower than chat — a cold FLUX/SDXL run can take 30-60s.
const FETCH_TIMEOUT_MS = 60_000;
+// Video providers submit long-running jobs and can legitimately need several
+// minutes before the MP4 is ready. This is still bounded end-to-end.
+const VIDEO_FETCH_TIMEOUT_MS = 5 * 60_000;
+
+/** Bail out of a long-running media job whose API caller has hung up. Video is
+ * the only surface here that can poll for minutes, so without this a client
+ * that disconnects after two seconds still costs a full generation — and a
+ * second one, when the chain fails over to the next provider. */
+function throwIfClientGone(signal?: AbortSignal): void {
+ if (signal?.aborted) throw new MediaError('client closed the request', 499);
+}
export function listMediaModels(modality: MediaModality): MediaModelRow[] {
return getDb()
@@ -220,13 +251,20 @@ async function mediaFetch(
platform: string,
modality: MediaModality,
init: RequestInit,
+ timeoutMs = FETCH_TIMEOUT_MS,
+ /** The caller's own cancellation (a disconnected API client), folded in on
+ * top of the per-request timeout so a departed client drops the upstream
+ * request instead of leaving it to run out the clock. */
+ clientSignal?: AbortSignal,
): Promise<Response> {
+ const timeoutSignal = AbortSignal.timeout(timeoutMs);
+ const signal = clientSignal ? AbortSignal.any([timeoutSignal, clientSignal]) : timeoutSignal;
const r = await proxyFetch(
url,
- { ...init, signal: AbortSignal.timeout(FETCH_TIMEOUT_MS) },
+ { ...init, signal },
platform,
modality,
- FETCH_TIMEOUT_MS,
+ timeoutMs,
);
if (!r.ok) {
const body = await r.text().catch(() => '');
@@ -264,6 +302,22 @@ function mediaRequestStyle(row: MediaModelRow): string | null {
}
}
+interface VideoMeta {
+ /** Provider-native deployment id. Hugging Face model ids are mapped to fal
+ * queue ids in the catalog so runtime calls need no mutable discovery step. */
+ providerModelId?: string;
+}
+
+function videoMeta(row: MediaModelRow): VideoMeta {
+ if (!row.meta_json) return {};
+ try {
+ const parsed = JSON.parse(row.meta_json) as VideoMeta;
+ return parsed && typeof parsed === 'object' ? parsed : {};
+ } catch {
+ return {};
+ }
+}
+
function contentTypeFor(fmt: string): string {
switch (fmt) {
case 'wav': return 'audio/wav';
@@ -417,6 +471,138 @@ async function callImageProvider(
}
}
+async function callHuggingFaceVideo(
+ row: MediaModelRow,
+ key: string | null,
+ p: VideoParams,
+ clientSignal?: AbortSignal,
+): Promise<{ video: Buffer; contentType: string }> {
+ if (!key) throw new MediaError('huggingface key required', 401);
+ const providerModelId = videoMeta(row).providerModelId;
+ if (!providerModelId) {
+ throw new MediaError(`huggingface video model '${row.model_id}' is missing providerModelId metadata`, 500);
+ }
+
+ const deadline = Date.now() + VIDEO_FETCH_TIMEOUT_MS;
+ const remaining = () => Math.max(1, deadline - Date.now());
+ const query = '?_subdomain=queue';
+ const queueUrl = `https://router.huggingface.co/fal-ai/${providerModelId}${query}`;
+ const submitted = await mediaFetch(queueUrl, 'huggingface', 'video', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${key}` },
+ body: JSON.stringify({
+ prompt: p.prompt,
+ ...(p.seed !== undefined ? { seed: p.seed } : {}),
+ }),
+ }, remaining(), clientSignal);
+ const queue = (await submitted.json()) as {
+ request_id?: string;
+ status?: string;
+ response_url?: string;
+ };
+ if (!queue.request_id || !queue.response_url) {
+ throw new MediaError('huggingface returned no video job id', 502);
+ }
+
+ // Hugging Face's fal router returns a fal queue response URL. Only reuse its
+ // path; all polling stays on router.huggingface.co so the HF token is never
+ // sent to an arbitrary host supplied in an upstream JSON body.
+ let responsePath: string;
+ try {
+ responsePath = new URL(queue.response_url, 'https://queue.fal.run').pathname;
+ } catch {
+ throw new MediaError('huggingface returned an invalid video job URL', 502);
+ }
+ const routedJobUrl = `https://router.huggingface.co/fal-ai${responsePath}`;
+ let status = queue.status ?? 'IN_QUEUE';
+ while (status !== 'COMPLETED') {
+ if (status === 'FAILED' || status === 'CANCELLED') {
+ throw new MediaError(`huggingface video job ${status.toLowerCase()}`, 502);
+ }
+ if (remaining() <= 1) throw new MediaError('huggingface video generation timed out', 504);
+ throwIfClientGone(clientSignal);
+ await new Promise(resolve => setTimeout(resolve, 500));
+ const polled = await mediaFetch(`${routedJobUrl}/status${query}`, 'huggingface', 'video', {
+ method: 'GET',
+ headers: { Authorization: `Bearer ${key}` },
+ }, remaining(), clientSignal);
+ const state = (await polled.json()) as { status?: string; error?: string };
+ if (!state.status) throw new MediaError('huggingface returned an invalid video job status', 502);
+ status = state.status;
+ }
+
+ const completed = await mediaFetch(`${routedJobUrl}${query}`, 'huggingface', 'video', {
+ method: 'GET',
+ headers: { Authorization: `Bearer ${key}` },
+ }, remaining(), clientSignal);
+ const result = (await completed.json()) as { video?: { url?: string; content_type?: string } };
+ const videoUrl = result.video?.url;
+ if (!videoUrl) throw new MediaError('huggingface returned no video URL', 502);
+ // Every other URL this adapter contacts is built from constants; this one
+ // comes out of an upstream JSON body, which is exactly the shape #440's
+ // guard exists for. Refuse anything that is not plain http(s) on a routable
+ // address before spending a request on it — a result URL pointing at cloud
+ // metadata or a link-local address would otherwise be fetched and streamed
+ // straight back to the caller.
+ const verdict = await assessProviderUrl(videoUrl);
+ if (!verdict.allowed) {
+ throw new MediaError(`huggingface returned an unusable video URL: ${verdict.reason}`, 502);
+ }
+ const downloaded = await mediaFetch(videoUrl, 'huggingface', 'video', { method: 'GET' }, remaining(), clientSignal);
+ const video = Buffer.from(await downloaded.arrayBuffer());
+ return {
+ video,
+ contentType: downloaded.headers.get('content-type') ?? result.video?.content_type ?? 'video/mp4',
+ };
+}
+
+async function callVideoProvider(
+ row: MediaModelRow,
+ credential: ProviderCredential,
+ p: VideoParams,
+ clientSignal?: AbortSignal,
+): Promise<{ video: Buffer; contentType: string }> {
+ const key = credential.key;
+ switch (row.platform) {
+ case 'pollinations': {
+ if (!key) throw new MediaError('pollinations key required', 401);
+ // Every Pollinations video model advertises its own allowed durations
+ // (nova-reel 6-120 in steps of 6, veo 4/6/8, minimax-h3 exactly 5,
+ // wan 5/10/15, seedance-2.5 exactly 4...). There is no length that is
+ // valid everywhere, so an omitted `duration` is left off the query and
+ // the provider applies the model's own default instead of a guess that
+ // would 400 on most of the roster.
+ const duration = p.duration;
+ if (duration !== undefined && row.model_id === 'nova-reel'
+ && (duration < 6 || duration > 120 || duration % 6 !== 0)) {
+ throw new MediaError('nova-reel duration must be a multiple of 6 between 6 and 120 seconds', 400);
+ }
+ const params = new URLSearchParams({ model: row.model_id });
+ if (duration !== undefined) params.set('duration', String(duration));
+ if (p.aspectRatio) params.set('aspectRatio', p.aspectRatio);
+ if (p.image) params.set('image', p.image);
+ if (p.seed !== undefined) params.set('seed', String(p.seed));
+ if (p.audio !== undefined) params.set('audio', String(p.audio));
+ const r = await mediaFetch(
+ `https://gen.pollinations.ai/video/${encodeURIComponent(p.prompt)}?${params}`,
+ 'pollinations',
+ 'video',
+ { method: 'GET', headers: { Authorization: `Bearer ${key}` } },
+ VIDEO_FETCH_TIMEOUT_MS,
+ clientSignal,
+ );
+ return {
+ video: Buffer.from(await r.arrayBuffer()),
+ contentType: r.headers.get('content-type') ?? 'video/mp4',
+ };
+ }
+ case 'huggingface':
+ return callHuggingFaceVideo(row, key, p, clientSignal);
+ default:
+ throw new MediaError(`no video adapter for platform '${row.platform}'`, 500);
+ }
+}
+
async function callSpeechProvider(
row: MediaModelRow,
credential: ProviderCredential,
@@ -549,9 +735,19 @@ function logMedia(row: Pick<MediaModelRow, 'platform' | 'model_id' | 'modality'>
}
function chainError(modality: MediaModality, lastError: MediaError | null): MediaError {
+ // Only statuses the CALLER can act on are passed through. 400 (bad prompt,
+ // duration the model does not accept) and 413 (upload too large) describe
+ // the caller's own request, and 429 is the long-standing rate-limit signal.
+ // An upstream 401 is deliberately NOT among them: it means the operator's
+ // provider key was rejected, and forwarding it would tell an OpenAI client
+ // its own gateway key is bad — which sends SDKs into a credential error
+ // instead of the retryable upstream failure this actually is.
+ const status = lastError && [400, 413, 429].includes(lastError.status)
+ ? lastError.status
+ : 502;
return new MediaError(
`All ${modality} providers failed${lastError ? ` (last: ${lastError.message.slice(0, 160)})` : ' (no usable keys)'}.`,
- lastError && lastError.status === 429 ? 429 : 502,
+ status,
);
}
@@ -581,6 +777,39 @@ export async function runImageGeneration(model: string | undefined, params: Imag
throw chainError('image', lastError);
}
+/** Generate a video, failing over across catalogued text-to-video providers.
+ * `clientSignal` is the API caller's connection: when it aborts, the in-flight
+ * upstream request is dropped and no further provider is tried. */
+export async function runVideoGeneration(
+ model: string | undefined,
+ params: VideoParams,
+ clientSignal?: AbortSignal,
+): Promise<VideoResult> {
+ const chain = resolveMediaChain(model, 'video');
+ let lastError: MediaError | null = null;
+ for (const row of chain) {
+ throwIfClientGone(clientSignal);
+ const credential = getProviderCredential(row);
+ if (!credential) continue;
+ if (credential.id != null && isOnCooldown(row.platform, row.model_id, credential.id)) continue;
+ const started = Date.now();
+ try {
+ const out = await callVideoProvider(row, credential, params, clientSignal);
+ if (!out.video.length) throw new MediaError('upstream returned no video', 502);
+ logMedia(row, credential.id, 'success', Date.now() - started, null);
+ return { platform: row.platform, modelId: row.model_id, ...out };
+ } catch (err: any) {
+ const e = err instanceof MediaError ? err : new MediaError(String(err?.message ?? err), 502);
+ logMedia(row, credential.id, 'error', Date.now() - started, e.message.slice(0, 300));
+ if (e.status === 429 && credential.id != null) setCooldown(row.platform, row.model_id, credential.id);
+ lastError = e;
+ // A caller that hung up gets no second generation charged to its account.
+ throwIfClientGone(clientSignal);
+ }
+ }
+ throw chainError('video', lastError);
+}
+
// ---------------------------------------------------------------------------
// Speech-to-text (/v1/audio/transcriptions)
//