@fal.endpoint("/path") that receives input, runs your model or logic, and returns output. The simplest app has a single root endpoint at /, but you can define as many endpoints as you need at different paths, including specialized streaming and real-time endpoints for progressive and bidirectional communication.
This section covers everything involved in building endpoints, from defining input and output schemas to handling files, cancellations, and observability. If you have already set up your application environment and loaded your model, this is where you define how users interact with it. Each page below focuses on a specific aspect of endpoint development. Start with a basic endpoint, then layer on the capabilities you need.
A Basic Endpoint
At minimum, an endpoint is a method on yourfal.App class decorated with @fal.endpoint. It receives typed input and returns typed output. The types you use determine both the API schema and how the Playground renders the input form and output preview.
https://fal.run/your-username/your-app/enhance).