Zapier
Webhooks by Zapier is on Zapier’s paid plans.1
Make the Zap that catches the result
Create a Zap whose trigger is Webhooks by Zapier, Catch Hook, and copy its URL. Add the steps that use the result after it, such as saving the output’s link (under data, object, output in the event) to Google Drive or posting it to Slack. Output links work for 24 hours, so save the file rather than the link.
2
Start the run from your first Zap
In the Zap that has the prompt (a new spreadsheet row, a form answer), add Webhooks by Zapier, Custom Request:Put the Catch Hook URL from the first step in
webhook. To make a retried step safe, add the header Idempotency-Key with something unique to the row, such as its ID: a retry then returns the same run instead of starting a second one.3
Test it
Run the first Zap’s test. The Catch Hook receives a
generation.succeeded event, or generation.failed with the reason (a failed run isn’t charged), usually within a few seconds for an image and a minute or two for a clip.Make
1
Make the scenario that catches the result
Start a scenario with Webhooks, Custom webhook, and copy its address. Turn on Get request headers if you’ll verify signatures. Add the modules that use the result, such as HTTP, Get a file on
data.object.output[].url, then Google Drive or Dropbox.2
Start the run
In the scenario that has the prompt, add HTTP, Make a request:
Store the key in a keychain rather than in the module. Add an
Idempotency-Key header as above.When you don’t need the webhook
Most images finish in seconds. For an image model, sendPrefer: wait=20 as a header and leave out webhook: the answer then holds the finished run, with the file in output[0].url, in the same step. A run still going when the wait ends comes back queued or running; read it again with GET https://api.tryleap.ai/v1/generations/{id}.
Pick the model
Every model takes the same request; onlymodel and input change. Each model’s inputs are public at https://api.tryleap.ai/v1/public/models/{id}, such as google/nano-banana, and Models explains them. Files go in by ID: upload one with an HTTP step first, as Files shows.