Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

models.ts

212 lines6.4 KB

1export const IMAGE_MODELS = [
2 {
3 id: 'fal-ai/nano-banana-pro',
4 name: 'Nano Banana Pro (4k)',
5 description: 'Fast, high-quality image generation',
6 defaultSize: 'landscape_16_9' as const,
7 sizeType: 'standard' as const,
8 provider: 'fal' as const,
9 },
10 {
11 id: 'xai/grok-imagine-image',
12 name: 'Grok Imagine',
13 description: 'xAI highly aesthetic images with prompt enhancement',
14 defaultSize: '16:9' as const,
15 sizeType: 'aspect_ratio' as const,
16 provider: 'fal' as const,
17 },
18 {
19 id: 'grok-imagine-image',
20 name: 'Grok Imagine (xAI Direct)',
21 description: 'xAI Imagine API via the native grokImage adapter',
22 defaultSize: '16:9' as const,
23 sizeType: 'aspect_ratio' as const,
24 provider: 'xai' as const,
25 },
26 {
27 id: 'grok-imagine-image-quality',
28 name: 'Grok Imagine Quality (xAI Direct)',
29 description: 'Higher-quality xAI Imagine images via the native adapter',
30 defaultSize: '16:9' as const,
31 sizeType: 'aspect_ratio' as const,
32 provider: 'xai' as const,
33 },
34 {
35 id: 'fal-ai/flux-2/klein/9b',
36 name: 'FLUX.2 Klein 9B',
37 description: 'Enhanced realism, crisp text generation',
38 defaultSize: 'landscape_16_9' as const,
39 sizeType: 'standard' as const,
40 provider: 'fal' as const,
41 },
42 {
43 id: 'fal-ai/z-image/turbo',
44 name: 'Z-Image Turbo',
45 description: 'Super fast 6B parameter model',
46 defaultSize: 'landscape_16_9' as const,
47 sizeType: 'standard' as const,
48 provider: 'fal' as const,
49 },
50 {
51 id: 'gemini-3.1-flash-image-preview',
52 name: 'NanoBanana 2 (Gemini 3.1 Flash)',
53 description: 'Latest and fastest Gemini native image generation',
54 defaultSize: '16:9_4K' as const,
55 sizeType: 'native' as const,
56 provider: 'gemini' as const,
57 },
58 {
59 id: 'gemini-3-pro-image-preview',
60 name: 'NanoBanana Pro (Gemini 3 Pro)',
61 description: 'Higher quality Gemini native image generation',
62 defaultSize: '16:9_4K' as const,
63 sizeType: 'native' as const,
64 provider: 'gemini' as const,
65 },
66 {
67 id: 'imagen-4.0-ultra-generate-001',
68 name: 'Imagen 4.0 Ultra',
69 description: 'Best quality Imagen image generation',
70 defaultSize: '1024x1024' as const,
71 sizeType: 'standard' as const,
72 provider: 'gemini' as const,
73 },
74 {
75 id: 'imagen-4.0-generate-001',
76 name: 'Imagen 4.0',
77 description: 'High quality Imagen image generation',
78 defaultSize: '1024x1024' as const,
79 sizeType: 'standard' as const,
80 provider: 'gemini' as const,
81 },
82 {
83 id: 'imagen-4.0-fast-generate-001',
84 name: 'Imagen 4.0 Fast',
85 description: 'Fast Imagen image generation',
86 defaultSize: '1024x1024' as const,
87 sizeType: 'standard' as const,
88 provider: 'gemini' as const,
89 },
90 {
91 id: 'dola-seedream-5-0-pro-260628',
92 name: 'Seedream 5.0 Pro',
93 description:
94 'BytePlus Seedream image generation, sized with a 1K/2K/4K token',
95 defaultSize: '2K' as const,
96 sizeType: 'standard' as const,
97 provider: 'byteplus' as const,
98 },
99] as const
100​
101export const VIDEO_MODELS = [
102 {
103 id: 'fal-ai/kling-video/v3/pro/text-to-video',
104 name: 'Kling 3 Pro (Text-to-Video)',
105 description: 'High-quality text-to-video generation',
106 mode: 'text-to-video' as const,
107 provider: 'fal' as const,
108 },
109 {
110 id: 'fal-ai/kling-video/v3/pro/image-to-video',
111 name: 'Kling 3 Pro (Image-to-Video)',
112 description: 'Animate images with Kling',
113 mode: 'image-to-video' as const,
114 provider: 'fal' as const,
115 },
116 {
117 id: 'fal-ai/veo3.1',
118 name: 'Veo 3.1 (Text-to-Video)',
119 description: 'Google Veo text-to-video',
120 mode: 'text-to-video' as const,
121 provider: 'fal' as const,
122 },
123 {
124 id: 'fal-ai/veo3.1/image-to-video',
125 name: 'Veo 3.1 (Image-to-Video)',
126 description: 'Google Veo image-to-video',
127 mode: 'image-to-video' as const,
128 provider: 'fal' as const,
129 },
130 {
131 id: 'xai/grok-imagine-video/text-to-video',
132 name: 'Grok Imagine Video (Text-to-Video)',
133 description: 'xAI video generation from text',
134 mode: 'text-to-video' as const,
135 provider: 'fal' as const,
136 },
137 {
138 id: 'xai/grok-imagine-video/image-to-video',
139 name: 'Grok Imagine Video (Image-to-Video)',
140 description: 'xAI animate images to video',
141 mode: 'image-to-video' as const,
142 provider: 'fal' as const,
143 },
144 {
145 id: 'grok-imagine-video',
146 name: 'Grok Imagine Video 1.0 (Text-to-Video)',
147 description:
148 'xAI Imagine API via the native grokVideo adapter (v1.0 supports text-to-video)',
149 mode: 'text-to-video' as const,
150 provider: 'xai' as const,
151 },
152 {
153 id: 'grok-imagine-video-1.5/image-to-video',
154 name: 'Grok Imagine Video 1.5 (Image-to-Video)',
155 description:
156 'Animate a starting frame via the native grokVideo adapter (1.5 is image-to-video only)',
157 mode: 'image-to-video' as const,
158 provider: 'xai' as const,
159 },
160 {
161 id: 'fal-ai/ltx-2.3/text-to-video/fast',
162 name: 'LTX-2.3 Fast (Text-to-Video)',
163 description: 'Fast text-to-video generation',
164 mode: 'text-to-video' as const,
165 provider: 'fal' as const,
166 },
167 {
168 id: 'fal-ai/ltx-2.3/image-to-video/fast',
169 name: 'LTX-2.3 Fast (Image-to-Video)',
170 description: 'Fast image-to-video animation',
171 mode: 'image-to-video' as const,
172 provider: 'fal' as const,
173 },
174 {
175 id: 'gemini-omni-flash-preview',
176 name: 'Gemini Omni Flash (Text-to-Video)',
177 description:
178 'Google multimodal video generation with conversational editing, via the Interactions API (3-10s, 720p)',
179 mode: 'text-to-video' as const,
180 provider: 'gemini' as const,
181 },
182 {
183 id: 'gemini-omni-flash-preview/image-to-video',
184 name: 'Gemini Omni Flash (Image-to-Video)',
185 description:
186 'Animate an image with Gemini Omni Flash via the Interactions API',
187 mode: 'image-to-video' as const,
188 provider: 'gemini' as const,
189 },
190 {
191 id: 'dreamina-seedance-2-0-260128',
192 name: 'Seedance 2.0 (Text-to-Video)',
193 description:
194 'BytePlus Seedance text-to-video (4-15s, 480p/720p/1080p/4k) via ModelArk',
195 mode: 'text-to-video' as const,
196 provider: 'byteplus' as const,
197 },
198] as const
199​
200export type ImageModel = (typeof IMAGE_MODELS)[number]
201export type VideoModel = (typeof VIDEO_MODELS)[number]
202export type VideoMode = 'text-to-video' | 'image-to-video'
203​
204/**
205 * Gemini Omni Flash task modes (`generation_config.video_config.task`).
206 * Omit to let the model infer the mode from the prompt and attachments.
207 */
208export type OmniTaskMode =
209 | 'text_to_video'
210 | 'image_to_video'
211 | 'reference_to_video'
212 | 'edit'