Daily Replicate usage and reliability digest in Slack
Every weekday at 7:50am, see how many model runs succeeded, which models are failing, and where your processing time actually went.
Every weekday at 7:50am, build me a Replicate usage and reliability digest, post it to Slack, and append the day's numbers to a Google Sheet so we accumulate a history we can chart.
Start by pulling every prediction created in the last 24 hours using the Replicate List Predictions operation. This is a paginated list endpoint: it returns an object shaped { results: [...], next: <url|null>, previous: <url|null> }. Follow the full next URL, which carries an opaque cursor query param, to fetch the next page, and stop when next is null. Keep paging until the whole 24 hour window is covered, then filter the collected predictions to those whose created_at falls inside the window. Do not stop at the first page, because a busy account will have many pages and a partial pull would silently understate every number in the digest.
Group the predictions two ways: by model and by status. Replicate status values are starting, processing, succeeded, failed, and canceled. For each model, count total runs and a breakdown of how many succeeded, failed, were canceled, and are still in flight (starting or processing). Sum total predict time per model from each prediction's metrics.predict_time, and also compute the average predict time per run. Some predictions will have no metrics.predict_time, for example ones that failed before the model started or that are still running, so treat a missing value as zero and never let it break the sum.
Define the failure rate as failed divided by the number of finished runs, where finished means succeeded plus failed plus canceled. Predictions still in starting or processing are excluded from the rate and reported separately as a still running count, so an in flight run is never counted as either a success or a failure. Compute this both overall across the account and per model.
Post the digest to a Slack channel using the Send a Message operation. Lead with the two headline numbers: the overall failure rate for the window (with the raw failed and finished counts in parentheses) and the single model that burned the most total predict time, including its second count and run count. Then explicitly call out every model whose failure rate is above 10 percent, listing each one with its failure rate, its failed and finished counts, and its total predict time. Follow that with a per model table showing run counts, the status breakdown, and total predict time, sorted by predict time descending. If no model is above the threshold, say so in one line rather than omitting the section, and if there were no predictions at all in the window, still post a short message saying zero runs were recorded so a quiet day is never confused with a broken workflow.
Then append one row per model per day to a tracking tab in Google Sheets using the Append Values operation. Each row should carry the date of the window, the model identifier, total runs, succeeded, failed, canceled, still running, the failure rate, total predict time in seconds, and average predict time per run. Append only, never overwrite earlier rows, because the whole point is the accumulating history that lets us chart failure rates and predict time per model over weeks.
Keep every number factual. A Replicate prediction object has no cost field, so report run counts and predict time as the spend proxy and never fabricate dollar estimates, per unit pricing, or projected monthly costs. If a figure cannot be computed from the prediction data, leave it out rather than guessing.
Example output
What does this prompt do?
- Collects every model run from your Replicate account over the last 24 hours, however many pages of history that takes
- Posts a Slack digest that leads with your overall failure rate and the single model that used the most processing time
- Calls out any model failing more than 10 percent of its runs, so a broken model version gets caught the same day instead of next week
- Adds one row per model per day to a Google Sheet, building the usage history you can chart over time
What do I need to use this?
- A Replicate account that runs models regularly, connected with an access token you create in your Replicate account settings
- A Slack workspace and the channel where you want the digest posted
- A Google account and a spreadsheet with a tab set aside for the daily tracking history
How can I customize it?
- Change the timing or the days it runs, for example every morning including weekends, or twice a day if you run models around the clock
- Point the digest at a different Slack channel, or send it as a direct message to whoever owns model quality
- Move the 10 percent failure threshold up or down, and widen the window from 24 hours to a full week for a Monday recap
FAQs
Does this tell me how much I spent on Replicate?
What if I run thousands of predictions a day?
How is the failure rate calculated?
Will it still post if nothing went wrong?
Do I need Slack and Google Sheets, or can I use just one?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Stop finding out about a broken model a week late.
Get a daily read on which models are running, which are failing, and where your processing time is going.