Replicate Predictions
Which hosted model should make this image, clip or voice-over? Search Replicate's public models and collections, read a model's versions, run it as a prediction (wait up to 60 seconds or poll), and cancel runs that hang.
Connect this API to an AI agent Browse all specs
What you can do with Replicate Predictions via MCP
Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.
| Method | Path | Operation | Description |
|---|---|---|---|
| GET | /account |
getAccount | Check which Replicate user or organization the token belongs to |
| GET | /search |
searchModels | Search public models, collections and docs by keyword |
| GET | /collections |
listCollections | List curated collections of models (e.g. text-to-image) |
| GET | /collections/{collection_slug} |
getCollection | Get a collection and the models in it |
| GET | /models |
listModels | List public models |
| GET | /models/{model_owner}/{model_name} |
getModel | Get a model's description, run count and latest version |
| GET | /models/{model_owner}/{model_name}/versions |
listModelVersions | List a model's versions, newest first |
| GET | /models/{model_owner}/{model_name}/versions/{version_id} |
getModelVersion | Get one version with the input and output schema |
| POST | /models/{model_owner}/{model_name}/predictions |
runOfficialModel | Run an official model by owner and name (no version id needed) |
| POST | /predictions |
createPrediction | Run a specific model version with the given inputs |
| GET | /predictions |
listPredictions | List predictions you created, newest first |
| GET | /predictions/{prediction_id} |
getPrediction | Get a prediction's status, output, logs and run time |
| POST | /predictions/{prediction_id}/cancel |
cancelPrediction | Cancel a prediction that is still starting or processing |
Authentication
bearerAuth
Bearer token — sent as Authorization: Bearer <token>
Replicate API token, sent as Authorization: Bearer r8_....
How to get a credential
- Sign in at replicate.com and add billing details (most models are pay per use).
- Open Account > API tokens (https://replicate.com/account/api-tokens).
- Click Create token, name it (e.g.
vx-agent) and copy the value (starts withr8_). - Tokens belong to your user or organization; runs are billed to that account.
Permissions used
| Access | Operations |
|---|---|
| Any API token (read) | getAccount, searchModels, listModels, getModel, listModelVersions, getModelVersion, listCollections, getCollection, listPredictions, getPrediction |
| Any API token (spends money) | runOfficialModel, createPrediction, cancelPrediction |
Common errors
| Status | Meaning | Fix |
|---|---|---|
| 401 | Token missing or revoked | Create a new token and update the credential |
| 404 | Model, version or prediction not found or private | Check owner/name spelling; use a version id from listModelVersions |
| 422 | Invalid input for the model | Compare input with the version's openapi_schema from getModelVersion |
| 429 | Rate limited (creating predictions: 600 requests per minute; lower for accounts without billing) | Wait and retry with backoff |
Store the token as a VX Agents credential (bearer token) so it is never pasted into chats or prompts.
Usage guide
Setup
- Credential: a Replicate API token (
r8_...) from Account > API tokens, stored as a VX Agents bearer credential. Runs are billed to the token's account. - Call
getAccountonce to confirm which user or organization will be billed. - If the user always uses the same model, pin
model_ownerandmodel_name(e.g.black-forest-labs/flux-schnell).
Run a model
- Find a model:
searchModels(query=keywords), or browselistCollections→getCollection(e.g.text-to-image). getModelto read the description andlatest_version. Inputs are listed in the version'sopenapi_schema(getModelVersion, orlistModelVersionsfor older ones).- Show the user the model, inputs and that the run costs money; get confirmation.
- Run it:
- official models (marked official on replicate.com):
runOfficialModelwith{"input": {...}}; - any other model:
createPredictionwith{"version": "<version id>", "input": {...}}. Send headerPrefer: wait(orwait=10) to hold the request open up to 60 seconds.
- official models (marked official on replicate.com):
- If the response status is
startingorprocessing, pollgetPredictionevery few seconds untilsucceeded,failedorcanceled. - Read
output(often file URLs) anderror/logson failure.cancelPredictionstops a run that hangs.
Good to know
- Output file URLs expire after one hour: download or store them right away.
- Rate limits: creating predictions 600 requests per minute, other endpoints 3000; accounts with only granted credit and no payment method are limited to 6 per minute.
listPredictionsreturns your own predictions only (cursor pagination vianext).- Prefer
runOfficialModelfor official models; it does not need a version id. - Do not put personal data or secrets in
inputunless the user agrees: inputs are sent to a third-party model.
Source: Replicate HTTP API reference (https://replicate.com/docs/reference/http), checked 2026-10-16.
How to use this spec
- Create a free VX Agents account (sandbox tools included).
- Open the marketplace and connect “Replicate Predictions” to an agent.
- Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.