Example tasks
Generate an image from a prompt using Fal.ai and Trigger.dev Realtime
This example task generates an image from a prompt using Fal.ai and shows the progress of the task on the frontend using Trigger.dev Realtime.
Walkthrough
This video walks through the process of creating this task in a Next.js project.
Prerequisites
- An existing project
- A Trigger.dev account with Trigger.dev initialized in your project
- A Fal.ai account
Task code
This task converts an image to a cartoon using fal AI, and uploads the result to Cloudflare R2.
trigger/fal-ai-image-from-prompt-realtime.ts
Testing your task
You can test your task by triggering it from the Trigger.dev dashboard. Here’s an example payload:
Was this page helpful?