# Replicate integration overview

> Run public or private ML models on Replicate from a Persona Workflow: search the catalog, create a prediction, poll for results, and cancel running jobs.

Source: https://help.withpersona.com/articles/6eK8zPtgD27sLB9Tl3U3x8/
Section: Marketplace and 3rd-Party Integrations > AI > Replicate

## Overview

[Replicate](https://replicate.com/) is a cloud platform that lets developers run, fine-tune, and deploy open-source machine learning models with a single API call, without managing GPUs or model serving infrastructure. Persona's Replicate integration enables you to run any public or private ML model directly from your workflows — incorporating AI-powered analysis, scoring, or classification into your identity decisioning pipeline without building custom model infrastructure.

## Benefits

**Incorporate Custom ML Models into Identity Decisions**: Run any open-source ML model — image analysis, NLP classification, risk scoring — directly from a Persona workflow step and use the result to inform downstream identity decisions.

**No GPU Infrastructure Required**: Replicate handles all model serving infrastructure. Your team can focus on building the right decision logic without managing compute resources.

**Access a Broad Model Catalog**: Search Replicate's public model catalog to find the right model for your use case — document classification, face analysis, text extraction, custom risk models, and more.

**Support Asynchronous Model Execution**: Create a prediction and poll for results asynchronously, allowing long-running model inferences to complete without blocking your workflow.

**Cancel and Control Predictions**: Cancel running predictions to avoid unnecessary compute charges if a workflow is terminated early or the result is no longer needed.

## Integration Features

Persona's Replicate integration enables AI model execution within identity workflows. Key capabilities include:

- **Search Models**: Search Replicate's public model catalog by keyword.
- **Get Model**: Retrieve full details of a specific model by owner and name, including the latest version ID.
- **Create Prediction**: Run a model version with specified input parameters and initiate an asynchronous prediction job.
- **Get Prediction**: Poll prediction status and retrieve output when complete.
- **Cancel Prediction**: Cancel a running prediction to stop compute usage.

## Setting up the Replicate integration

## Prerequisites

To set up the Replicate integration, ensure you have:

- A Replicate account
- A Replicate API token (found in **Account Settings > API tokens**)

## Setting up the Replicate credentials

1.  In the Persona Dashboard, navigate to **Integrations > Marketplace** and click on **Replicate**.
2.  Click on **Add Credential** at the top of the page.
3.  Enter a **Nickname for Credential** in the modal, along with your Replicate API token, and click **Continue**.
4.  Once complete, the credential will appear in Persona and can be selected in workflows.

## Using the Replicate integration in a workflow

1.  Create a new workflow, or open an existing workflow you'd like to update.
2.  **Add a new action step > Integrations**.
3.  Select the **Replicate integration** and choose your Replicate credential.
4.  Use Search Models or Get Model to identify the model version ID you want to run.
5.  Add a Create Prediction step, then a Get Prediction step to poll for results.
6.  Map the model output to downstream workflow logic and save and publish the workflow.

## Replicate Operations Overview

Persona supports multiple Replicate API operations for discovering, running, and managing ML model predictions. These actions allow you to incorporate any open-source machine learning model into your identity workflows — enabling custom AI-powered signals without managing model infrastructure.

See below for a comprehensive list of available Workflow Action steps and possible configurations for the Replicate integration:

### Search Models

Search Replicate's public model catalog by keyword, returning model names, owners, descriptions, tags, and run counts.

**Configuration Steps:**

- No required fields.
- Optionally add:
  - Query (keyword search string)
  - Cursor (for pagination)

### Get Model

Retrieve full details of a specific model by owner and name, including the latest version ID needed to run predictions.

**Configuration Steps:**

- Provide values for required fields:
  - Model Owner
  - Model Name

### Create Prediction

Run a model version with specified input parameters, initiating an asynchronous prediction job. Returns a Prediction ID to poll for results.

**Configuration Steps:**

- Provide values for required fields:
  - Version ID (from Get Model)
  - Input (JSON object of model-specific input parameters)
- Optionally add:
  - Webhook URL (to receive results via webhook instead of polling)

### Get Prediction

Retrieve the current status and output of a prediction by ID. Poll this action until status is `succeeded` or `failed`.

**Configuration Steps:**

- Provide values for required fields:
  - Prediction ID (returned from Create Prediction)

### Cancel Prediction

Cancel a running prediction to avoid unnecessary compute charges.

**Configuration Steps:**

- Provide values for required fields:
  - Prediction ID

## FAQs

### How long do predictions take?

Prediction time varies by model and input size. Use the Get Prediction action in a loop or with a delay step to poll for completion. Most models complete within seconds to minutes.

### Can I use private models?

Yes. Private models you own or have been granted access to can be run using Get Model and Create Prediction with the model's owner and name.

### What happens if a prediction fails?

Get Prediction will return a status of `failed` with an error message. Build conditional logic in your workflow to handle failure cases.

## Plans Explained

### Replicate Integration by plan

|                       | Startup Program | Essential Plan | Growth Plan | Enterprise Plan |
| --------------------- | --------------- | -------------- | ----------- | --------------- |
| Replicate Integration | Not Available   | Not Available  | Limited     | Available       |

[Learn more about pricing and plans](https://withpersona.com/pricing?utm_source=product&utm_medium=referral&utm_audience=a&utm_campaign=cm_gen_ds_hc-plan-table).
