页面简介
Call 1,000+ image, video, audio, and multimodal models through one API. Install the Python or JavaScript client, set FAL_KEY, and run your first model.
正文摘录
Model APIs gives you instant access to state-of-the-art AI models for image, video, audio, and multimodal generation. Every model is already optimized and production-ready, so you can authenticate and start generating immediately. Each model runs on fal’s infrastructure with automatic scaling, queue-based reliability, and pay-per-use billing. You call them the same way whether you use the Python or JavaScript client or raw HTTP. If you need to deploy your own model instead, see Serverless. For an overview of how Model APIs and Serverless work together, see the fal inference platform. Quick Example Generate an image in three lines of code. Install the client, set your API key, and call a model. PythonJavaScriptcURLimport fal_client result = fal_client.subscribe("fal-ai/nano-banana-2", arguments={ "prompt": "a futuristic cityscape at sunset" }) print(result["images"][0]["url"]) The response includes a CDN URL for the generated image, along with metadata like dimensions and seed. Every model follows the same pattern: send inputs as JSON, receive outputs as JSON with media URLs. How It Works Every model on fal is exposed as an HTTP endpoint, documented in the Inference API reference. You can call it directly, or go through the queue for automatic retries, status tracking, and scaling. There are several calling patterns depending on your use case. Direct (run) sends a synchronous HTTP request to fal.run and returns the result directly. This is the simplest approach for quick scripts and prototyping. Subscribe uses the queue under the hood but handles polling automatically, so it feels synchronous. This is what the Quick Example above uses. Asynchronous (submit) gives you full control over the queue. Submit a request and return immediately, then poll for status or receive results via webhook. This is the recommended approach for production workloads with parallel processing. Streaming delivers output progressively as the model generates it. This is useful for LLMs that produce tokens incrementally, or for showing generation progress in a UI. realtime() uses WebSockets for persistent connections, bypassing the queue entirely for sub-100ms latency. Only available for models with an explicit real-time endpoint. What You Can Generate The model gallery has 1,000+ models spanning several categories. Here are some popular starting points. Image Generation and Editing Nano Banana 2Google’s fast image generation and editing modelNano Banana ProState-of-the-art image generation with realism and typographyFlux 2 FlexEnhanced typography and text rendering from BFLRecraft V4 ProProfessional design and marketing visualsNano Banana 2 EditIntelligent image editing with Google’s latest modelFLUX Kontext ProTargeted edits and complex scene transformations Video Generation Kling 3.0 ProCinematic image-to-video with fluid motionKling O3Start and end frame animation with scene guidanceLTX-2 19BVideo with audio from images using LTX-2FLUX 3 MaxText-to-video with optional audio, post-trained by fal with Black Forest LabsMiniMax H3 MaxVideo with synchronized audio, post-trained by fal from MiniMax H3 Audio and Speech Chatterbox TTSNatural text-to-speech from Resemble AIMiniMax Speech-02 HDHigh-quality multi-voice text-to-speechDia TTSMulti-speaker dialogue with voice cloningBeatoven MusicRoyalty-free instrumental music generationBeatoven SFXProfessional sound effect generationElevenLabs MusicHigh quality, realistic music generation Explore All ModelsBrowse 1,000+ models across image, video, audio, 3D, and more Every model page on fal.ai includes a Playground for testing, full API documentation with input/output schemas, pricing, and ready-to-copy code examples. Next Steps PlaygroundTest and compare models interactively before integratingInferenceLearn the different ways to call modelsClient SetupInstall and configure the fal client for Python, JavaScript, and moreExamplesStep-by-step tutorials for image, video, and audio generationWas this page helpful?YesNo⌘I