Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrates Replicate AI models with Inngest background jobs, S3 result storage, and user credit tracking.
Use this skill ↓36% 91%+55 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 8 of 22 without it.
Provide the Inngest createFunction definition header for the AI worker, specifying its concurrency limit and subscribed event.
Listens for event app/ai.generate
3 of 3 safety checks passed
This skill provides a production-ready pattern for integrating Replicate AI models. It handles long-running predictions using Inngest background jobs, stores results in S3, manages user credits, and updates database state.
/api/app/ai-images).status: "processing".status: "completed".failed.replicate package installed (npm install replicate).REPLICATE_API_TOKEN in .env.src/app/api/app/generate/route.ts
import withAuthRequired from "@/lib/auth/withAuthRequired";
import { db } from "@/db";
import { generations } from "@/db/schema";
import { inngest } from "@/lib/inngest/client";
import { checkCredits, deductCredits } from "@/lib/credits"; // Hypothetical helpers
export const POST = withAuthRequired(async (req, { session }) => {
const body = await req.json();
// 1. Check Credits
const hasCredits = await checkCredits(session.user.id, "image_generation", 1);
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.