• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
turbo1912

turbo1912

fal_sdxl

Public
Like
fal_sdxl
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

fal/sdxl

This val is an example usage sdxl with fal.ai's javascript client.

https://www.fal.ai/models/stable-diffusion-xl

The client offers a way for you to subscribe to queue updates. This is useful if you want to get notified when a function is done running, or if you want to get the logs as they are being generated.

Create val
import fal from "npm:@fal-ai/serverless-client"; const result = await fal.subscribe(FUNCTION_ID, { input: { seed: 176400, }, pollInterval: 5000, logs: true, onQueueUpdate: (update) => { console.log(update.status); if (update.status === "IN_PROGRESS") { update.logs.map((log) => log.message).forEach(console.log); } }, }); console.log(result.url);

The onQueueUpdate callback will be called every time the queue status changes. The update object contains the queue status data as documented on the status types section.

Code
README.mdmain.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.