# run-replicate-model

## Description

<mark style="color:purple;">`run-replicate-model`</mark> *adaptor uses* [*<mark style="color:purple;">Replicate HTTP API</mark>*](https://replicate.com/docs/reference/http) *to run an AI model and wait for its output.*

Replicate offers thousands of community-contributed AI models. A list of models can be found on [<mark style="color:purple;">Replicate web</mark>](https://replicate.com/explore)<mark style="color:purple;">site.</mark>

Note that this adaptor can be used to run one model only. If you would like to run a model for each value in a datatable column, consider using the [<mark style="color:purple;">`workflow repeater`</mark>](/data-flo/reference-guide/workflow-repeater.md) adaptor.

## Inputs

**`model`**\
Type: `text`\
Required: Yes\
The URL of the Replicate model to run, e.g.. `stability-ai/stable-diffusion:db21e45d`.

**`input`**\
Type: `dictionary`\
Required: Yes\
The input of the model to run.

**`api token`**\
Type: `text`\
Required: Yes\
Replicate [API token](https://replicate.com/account/api-tokens)

## Outputs

**`outputs`**\
Type: `list`\
The model predictions.

**`status`**\
Type: `text`\
The status of the model run.

**`duration`**\
Type: `text`\
The duration of the model run.

## Examples

### Example 1: ask a question about an [image](https://replicate.delivery/pbxt/IJEPmgAlL2zNBNDoRRKFegTEcxnlRhoQxlNjPHSZEy0pSIKn/gg_bridge.jpeg)

#### Inputs:

`model`: andreasjansson/blip-2:f677695e5e89f8b236e52ecd1d3f01beb44c34606419bcc19345e046d8f786f9

`input`:

* `image` ⇒ <https://replicate.delivery/pbxt/IJEPmgAlL2zNBNDoRRKFegTEcxnlRhoQxlNjPHSZEy0pSIKn/gg_bridge.jpeg>
* `question` ⇒ what body of water does this bridge cross

`api token`: 9d\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* (visit [API Tokens](https://replicate.com/account/api-tokens) page to retrieve the API token)

#### Outputs:

`outputs`: san francisco bay

`status`: succeeded

`duration`: 1751


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/run-replicate-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
