What does a prediction give your app before the result is ready?
A prediction is one model run. Depending on how your app asks for it, the request can return while the job is still waiting or processing. Keep a state the reader can understand until the final result is ready, failed or canceled.
Does every model use the same billing unit?
Check the model page. Replicate lists some models by hardware and time and others by input or output, such as generated images or tokens. Review the separate pricing for private models or deployments when you use them. Keep the model version and its expected unit next to your usage notes.
What should you save before an output link expires?
API predictions remove inputs, outputs, files and logs after an hour by default. Replicate documents a different retention rule for predictions run through the website. If your app should keep a generated file, save it to approved storage and decide who can open it. Do not treat the temporary link as the permanent copy.
When should the app say a fictional image is ready?
Draw a fictional illustration request. Write a pending job, a successful job with a temporary file link and a copy your app keeps.
- Separate two completionsMark the time the model finishes and the time your app confirms its saved copy.
- Draw the failed pathIf the copy fails or the link expires first, leave the app’s file status unavailable and offer a next action. Do the rehearsal on paper.