You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run a model and await the result. Unlike [`replicate.prediction.create`](#replicatepredictionscreate), this method returns only the prediction output rather than the entire prediction object.
|`identifier`| string |**Required**. The model version identifier in the format `{owner}/{name}:{version}`, for example `stability-ai/sdxl:8beff3369e81422112d93b89ca01426147de542cd4684c244b673b105188fe5f`|
163
+
|`options.input`| object |**Required**. An object with the model inputs. |
164
+
|`options.wait`| object | Options for waiting for the prediction to finish |
165
+
|`options.wait.interval`| number | Polling interval in milliseconds. Defaults to 500 |
166
+
|`options.webhook`| string | An HTTPS URL for receiving a webhook when the prediction has new output |
167
+
|`options.webhook_events_filter`| string[]| An array of events which should trigger [webhooks](https://replicate.com/docs/webhooks). Allowable values are `start`, `output`, `logs`, and `completed`|
168
+
|`options.signal`| object | An [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) to cancel the prediction |
169
+
|`progress`| function | Callback function that receives the prediction object as it's updated. The function is called when the prediction is created, each time its updated while polling for completion, and when it's completed. |
170
+
171
+
Throws `Error` if the prediction failed.
172
+
173
+
Returns `Promise<object>` which resolves with the output of running the model.
0 commit comments