Skip to main content

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: