Skip to content

Commit 11f0e6e

Browse files
authored
fix run usage docs (#139)
1 parent fdf5f76 commit 11f0e6e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,6 @@ client.fetch = (url, options) => {
150150
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.
151151

152152
```js
153-
const model = "stability-ai/sdxl:8beff3369e81422112d93b89ca01426147de542cd4684c244b673b105188fe5f";
154-
const input = {
155-
prompt: "a 19th century portrait of a raccoon gentleman wearing a suit",
156-
};
157153
const output = await replicate.run(identifier, options, progress);
158154
```
159155

@@ -172,6 +168,14 @@ Throws `Error` if the prediction failed.
172168

173169
Returns `Promise<object>` which resolves with the output of running the model.
174170

171+
Example:
172+
173+
```js
174+
const model = "stability-ai/sdxl:8beff3369e81422112d93b89ca01426147de542cd4684c244b673b105188fe5f";
175+
const input = { prompt: "a 19th century portrait of a raccoon gentleman wearing a suit" };
176+
const output = await replicate.run(model, { input });
177+
```
178+
175179
### `replicate.models.get`
176180

177181
```js

0 commit comments

Comments
 (0)