> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Run predictions and manage models with Replicate

> Let Guild agents run predictions, manage deployments, search models, and handle training jobs on Replicate with server-side credentials and policy controls.

Integrations · Replicate

A Guild agent runs predictions, manages deployments, and starts or cancels training jobs on Replicate on your team's behalf. Guild injects the Replicate API key server-side so agent code never sees it, and credential policies let you restrict exactly which operations each agent can perform.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Replicate.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Replicate to your first agent.

## What the Replicate integration exposes

The tools cover predictions, deployments, models, files, training jobs, collections, hardware, and account information. Agents can create, retrieve, update, and delete resources, search public models and collections, and cancel running predictions or training jobs. Tools follow the replicate\_ prefix and ship in the `guildai~replicate` package.

## How it works

**1. Connect your Replicate credential**

In Guild, go to Access & setup > Credentials, click Connect, select replicate, and paste your API key into the API Key field. Guild sends the key as a bearer token in the Authorization header on every request.

**2. Import and wire the tools**

Import ReplicateTools from `@guildai-services/guildai~replicate` and spread it into your agent's tools object. All tools are available immediately once the credential is connected.

**3. Narrow tools with pick**

Use pick() from the Agent SDK to include only the tools your agent needs. Tools are named with the replicate\_ prefix, so you can target groups by pattern in your credential policies too.

## Why Replicate access needs governing

Replicate tools can create and delete models and deployments, cancel running predictions, and remove files along with all associated output. Credential policies let you write ALLOW and DENY rules that Guild's credential proxy enforces before any request leaves Guild. You can restrict an agent to read-only operations like replicate\_predictions\_get and replicate\_models\_list, block destructive operations with replicate\_models\_versions\_delete or replicate\_files\_delete, or scope rules to a specific agent or workspace so different agents get different levels of access on the same connected credential.

Guild stores the Replicate API key server-side and injects it at request time, so agent code never sees it. The proxy enforces policies before the credential is added, and a matching DENY rule always wins over any ALLOW rule. Credentials can be scoped to an account, a workspace, a single member, or one agent, giving you fine control without duplicating keys.

## About the Replicate integration

Agents can browse and search public models, create and manage deployments, and run or cancel predictions and training jobs on Replicate. They can also upload and delete files, update model properties, and retrieve account and hardware information. The integration is `guildai~replicate`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as a bearer token in the `Authorization` header

### Setup

**1. Connect Replicate**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **replicate**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { ReplicateTools } from "@guildai-services/guildai~replicate"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Replicate.",
  tools: { ...ReplicateTools },
})
```

### Selecting specific tools

Tools are named with the `replicate_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~replicate`:

> [accordion] All 34 tools
>
> | Tool | What it does |
> | - | - |
> | `replicate_account_get` | Returns information about the user or organization associated with the provided API token. |
> | `replicate_collections_get` | Example cURL request. |
> | `replicate_collections_list` | Example cURL request. |
> | `replicate_deployments_create` | Create a new deployment. |
> | `replicate_deployments_delete` | Delete a deployment |
> | `replicate_deployments_get` | Get information about a deployment by name including the current release. |
> | `replicate_deployments_list` | Get a list of deployments associated with the current account, including the latest release configuration for each deployment. |
> | `replicate_deployments_predictions_create` | Create a prediction for the deployment and inputs you provide. |
> | `replicate_deployments_update` | Update properties of an existing deployment, including hardware, min/max instances, and the deployment's underlying model version. |
> | `replicate_files_create` | Create a file by uploading its content and optional metadata. |
> | `replicate_files_delete` | Delete a file. |
> | `replicate_files_get` | Get the details of a file. |
> | `replicate_files_list` | Get a paginated list of all files created by the user or organization associated with the provided API token. |
> | `replicate_hardware_list` | Example cURL request. |
> | `replicate_models_create` | Create a model. |
> | `replicate_models_delete` | Delete a model |
> | `replicate_models_examples_list` | List example predictions made using the model. |
> | `replicate_models_get` | Example cURL request. |
> | `replicate_models_list` | Get a paginated list of public models. |
> | `replicate_models_predictions_create` | Create a prediction using an official model. |
> | `replicate_models_update` | Update select properties of an existing model. |
> | `replicate_models_versions_delete` | Delete a model version and all associated predictions, including all output files. |
> | `replicate_models_versions_get` | Example cURL request. |
> | `replicate_models_versions_list` | Example cURL request. |
> | `replicate_predictions_cancel` | Cancel a prediction that is currently running. |
> | `replicate_predictions_create` | Create a prediction for the model version and inputs you provide. |
> | `replicate_predictions_get` | Get the current state of a prediction. |
> | `replicate_predictions_list` | Get a paginated list of all predictions created by the user or organization associated with the provided API token. |
> | `replicate_search` | Search for public models, collections, and docs using a text query. |
> | `replicate_trainings_cancel` | Cancel a training |
> | `replicate_trainings_create` | Start a new training of the model version you specify. |
> | `replicate_trainings_get` | Get the current state of a training. |
> | `replicate_trainings_list` | Get a paginated list of all trainings created by the user or organization associated with the provided API token. |
> | `replicate_webhooks_default_secret_get` | Get the signing secret for the default webhook endpoint. |

## Frequently asked questions

> [accordion] Can an agent cancel a prediction that is already running?
>
> Yes. The replicate\_predictions\_cancel tool cancels a prediction that is currently running.

> [accordion] Does the integration support webhook events from Replicate?
>
> No. The catalog entry for `guildai~replicate` lists no webhook events, so agents cannot receive event-driven triggers from Replicate through Guild.

> [accordion] How do I stop an agent from deleting model versions?
>
> Add a DENY rule for replicate\_models\_versions\_delete in the credential policy. Guild's proxy enforces the rule before the request reaches Replicate, and a DENY always overrides any ALLOW rule.

> [accordion] Can I give one agent a different Replicate account than the rest of the workspace?
>
> Yes. Connect a credential scoped to that agent using the Dedicated to this agent option on the installed agent's page. Guild resolves agent-dedicated credentials before workspace or account credentials.

## Put a governed agent on Replicate this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Replicate.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Replicate to your first agent.

## Related

**Also runs on Guild:** [AWS Bedrock](https://docs.guild.ai/integrations/aws-bedrock.md) · [fal.ai](https://docs.guild.ai/integrations/fal.md) · [Fireworks AI](https://docs.guild.ai/integrations/fireworks.md) · [OpenRouter](https://docs.guild.ai/integrations/openrouter.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
