Show & Tell: an internal Retool app that generates on-model photos for a small clothing brand

One of the more useful internal tools I have built this year: a two-screen Retool app that replaces most of a small brand's product photography pipeline. Putting it here because the interesting part was not the UI, it was the job handling.

The screens

  1. Queue β€” a Table component over a Postgres table of garments waiting for a render, with status, SKU, attempts and the last error.
  2. Detail β€” selected row shows the flat product shot on the left, the returned on-model render on the right, plus a "regenerate with a different model" dropdown.

How the render happens

  • A button triggers a REST query (resource with the API base URL and key in Retool's resource settings, so no key in the app).
  • The API returns a job id immediately, so the query stores it in the row and sets status to 'running'.
  • A second query polls the job endpoint every 4 seconds while the row is running. I used a JS query with a loop and a 20-iteration cap rather than a Retool "Run query on interval" toggle, because the interval version kept firing after the app tab lost focus.
  • On success, the image URL is written back and status flips to 'done'. Failures retry twice, then park as 'needs attention' so nothing loops forever.

Things I would tell anyone doing this

  • Never put the generation call in the same query chain as the UI's save button. It makes the app feel frozen on slow renders.
  • Store the source photo in Retool Storage and pass a signed URL. Posting base64 through the resource was slow and made the request log unreadable.
  • Add a per-day counter column. Without it, someone clicked regenerate 40 times on one garment and burned a month of credits in an hour.

The render endpoint is BananaKit (https://bananakit.ai/) β€” person photo plus garment photo, composite back. The polling shape above matches their async job API; if the API you use is synchronous, you will want a Workflow instead of a JS loop.

Happy to share the resource config if it is useful. Curious how others handle long-running jobs in Retool β€” polling in a JS query is fine but it is not exactly elegant.

For long-running jobs, I’d move the poller out of the app entirely. Trigger a Retool Workflow when the job id is stored; the workflow polls with backoff and writes status/image URL back to Postgres. The app screen just queries the row or refreshes on focus, so tab focus and JS timeouts stop mattering. If the render provider supports webhooks, that’s even cleaner: the webhook updates the row, and the workflow only handles retries and β€œneeds attention.” Keep the per-day counter enforced in the database, not only in the UI.