Example tasks
Generate an image using DALL·E 3
This example will show you how to generate an image using DALL·E 3 and text using GPT-4o with Trigger.dev.
Overview
This example demonstrates how to use Trigger.dev to make reliable calls to AI APIs, specifically OpenAI’s GPT-4o and DALL-E 3. It showcases automatic retrying with a maximum of 3 attempts, built-in error handling to avoid timeouts, and the ability to trace and monitor API calls.
Task code
trigger/generateContent.ts
Testing your task
To test this task in the dashboard, you can use the following payload:
Was this page helpful?