Before You Start
You’ll need:- Python - we recommend 3.11
- A fal account (sign up is free)
Step 1: Install the CLI
Step 2: Authenticate
Get your API key from the fal dashboard and authenticate:Step 3: Create Your First App
Create a file calledhello_world.py with this simple app:
Step 4: Test Your App Locally
First, run your app locally to test it:- Starts your app as a service
- Provides two URLs for interaction: a direct HTTP proxy and a web playground
- Allows you to test your app without authentication while
fal runis active
Step 5: Deploy Your App (Optional)
Once you’re satisfied, deploy it to create a persistent URL:- Deploys your app as a serverless function
- Makes your app available for requests, with runners managed automatically based on demand
- Returns a unique persistent URL for your deployed app
What Just Happened?
🎉 Congratulations! You’ve successfully:- Created a fal app: Built the simplest possible serverless function
- Tested locally: Ran your app and called it with an HTTP request
- Deployed to the cloud: Made your app accessible via REST API (if you chose to deploy)
Next Steps
Now that you have a working app, you can:- Deploy your first image generator - Build a real AI model with Stable Diffusion XL
- Learn core concepts - Understand models, endpoints, and scaling
- Follow complete tutorials - Build more sophisticated models