fal run, deploy it with fal deploy, and call it with the fal client SDK. Once you are comfortable with this loop, the Deploy Your First Image Generator tutorial shows how to apply it to a real Stable Diffusion XL model.
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
Run your app to test it:fal run uses public auth mode so you can test without an API key.
Once you see Application startup complete, test it with curl using the URL from the output:
Step 5: Deploy Your App
Once you are satisfied, deploy to create a persistent URL:Step 6: Call Your Deployed App
Once deployed, you can call your app from any Python or JavaScript application using the fal client SDK.- Python
- JavaScript
your-username/hello-world with the endpoint ID shown after deploying. See Calling Your Endpoints for all calling patterns including async queue, streaming, real-time, and webhooks.