MVFM

fal/subscribe

Subscribe to a Fal request lifecycle and await the final result

const app = mvfm(prelude, console_, fal_);
const prog = app({}, ($) => {
  const result = $.fal.subscribe("fal-ai/flux/dev", {
    input: { prompt: "A watercolor mountain landscape" },
  });
  return $.console.log(result);
});
await fold(defaults(app, { fal: crystalBallFalInterpreter }), prog);
Ctrl+Enter