@tanstack/ai-fal has 5,429 recorded weekly downloads on npm, an increase of 3.7% over the past 30 days, ranking #1494 of 3,247 tracked listings.
About @tanstack/ai-fal
@tanstack/ai-fal
fal.ai adapter for TanStack AI image, video, live, audio, speech, and transcription generation
Installation
npm install @tanstack/ai-fal
# or
pnpm add @tanstack/ai-fal
# or
yarn add @tanstack/ai-fal
Setup
Create an API key at fal.ai and set it as an environment variable:
export FAL_KEY="your-fal-api-key"
Or pass it explicitly to any adapter factory: falImage('fal-ai/flux/dev', { apiKey }).
Usage
Image generation
import { generateImage } from '@tanstack/ai'
import { falImage } from '@tanstack/ai-fal'
const result = await generateImage({
adapter: falImage('fal-ai/flux/dev'),
threadId: 'thread-1',
prompt: 'A futuristic cityscape at sunset',
numberOfImages: 1,
})
console.log(result.images)
Model ids are string literals with full type safety, so size and modelOptions are checked against the model you picked.
Video generation
Video runs as a job: submit, then poll.
import { generateVideo, getVideoJobStatus } from '@tanstack/ai'
import { falVideo } from '@tanstack/ai-fal'
const adapter = falVideo('fal-ai/kling-video/v2.6/pro/text-to-video')
const job = await generateVideo({
adapter,
threadId: 'thread-1',
prompt: 'A timelapse of a flower blooming',
size: '16:9',
duration: '5',
})
const status = await getVideoJobStatus({ adapter, jobId: job.jobId })
console.log(status.status) // "pending" | "processing" | "completed"
Text-to-speech
The adapter fetches the generated audio from fal's CDN and returns it base64-encoded, matching the TTSResult contract.
import { generateSpeech } from '@tanstack/ai'
import { falSpeech } from '@tanstack/ai-fal'
const result = await generateSpeech({
adapter: falSpeech('fal-ai/kokoro/american-english'),
threadId: 'thread-1',
text: 'Hello from fal!',
voice: 'af_heart',
speed: 1.0,
})
console.log(result.format) // e.g. "wav"
Transcription
audio accepts a URL string, Blob, File, or ArrayBuffer.
import { generateTranscription } from '@tanstack/ai'
import { falTranscription } from '@tanstack/ai-fal'
const result = await generateTranscription({
adapter: falTranscription('fal-ai/whisper'),
threadId: 'thread-1',
audio: 'https://example.com/recording.mp3',
language: 'en',
})
console.log(result.text)
Music and sound effects
Unlike TTS, generateAudio() returns a URL in result.audio.url.
import { generateAudio } from '@tanstack/ai'
import { falAudio } from '@tanstack/ai-fal'
const music = await generateAudio({
adapter: falAudio('fal-ai/minimax-music/v2.6'),
threadId: 'thread-1',
prompt: 'City Pop, 80s retro, groovy synth bass, warm female vocal, 104 BPM',
})
console.log(music.audio.url)
Live video
falLiveVideo('minimax/h3-max/director') with generateLiveVideo() starts an H3 Max Director session; the browser then connects through a server proxy that attaches FAL_KEY. See Live Generation for the connect step.
Adapters
| Factory | Activity |
|---|---|
falImage() | generateImage() |
falVideo() | generateVideo() |
falLiveVideo() | generateLiveVideo() |
falSpeech() | generateSpeech() |
falTranscription() | generateTranscription() |
falAudio() | generateAudio() |
Limitations
- No text/chat, tools, or summarization — use a text adapter for
chat()andsummarize()
Documentation
- fal.ai adapter: every option, the popular models per activity, and the full API reference
- Live Generation
License
MIT
Description from the npm listing.
- ai
- ai-sdk
- typescript
- tanstack
- fal
- fal-ai
- adapter
- image-generation
- video-generation
- live-generation
- audio-generation
- text-to-speech
- speech-to-text
- tts
- transcription
- media-generation
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm AI SDKs plugins
All 20 @tanstack/ai-fal alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@tanstack/ai-fal. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.