import * as fal from "npm:@fal-ai/serverless-client";
fal.config({
credentials: Deno.env.get("FAL_KEY"),
});
export default async function(req: Request): Promise<Response> {
const { prompt } = await req.json();
const result: any = await fal.run("fal-ai/fast-lightning-sdxl", { input: { prompt } });
return Response.json({ url: result.images[0].url });
}