VX Agents

OpenAPI Marketplace · AI & ML

Replicate Predictions

v1.0.0 · 13 endpoints · 0 connections · shared by vx.ai

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.

MethodPathOperationDescription
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

  1. Sign in at replicate.com and add billing details (most models are pay per use).
  2. Open Account > API tokens (https://replicate.com/account/api-tokens).
  3. Click Create token, name it (e.g. vx-agent) and copy the value (starts with r8_).
  4. 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 getAccount once to confirm which user or organization will be billed.
  • If the user always uses the same model, pin model_owner and model_name (e.g. black-forest-labs / flux-schnell).

Run a model

  1. Find a model: searchModels (query= keywords), or browse listCollections → getCollection (e.g. text-to-image).
  2. getModel to read the description and latest_version. Inputs are listed in the version's openapi_schema (getModelVersion, or listModelVersions for older ones).
  3. Show the user the model, inputs and that the run costs money; get confirmation.
  4. Run it:
    • official models (marked official on replicate.com): runOfficialModel with {"input": {...}};
    • any other model: createPrediction with {"version": "<version id>", "input": {...}}. Send header Prefer: wait (or wait=10) to hold the request open up to 60 seconds.
  5. If the response status is starting or processing, poll getPrediction every few seconds until succeeded, failed or canceled.
  6. Read output (often file URLs) and error/logs on failure. cancelPrediction stops 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.
  • listPredictions returns your own predictions only (cursor pagination via next).
  • Prefer runOfficialModel for official models; it does not need a version id.
  • Do not put personal data or secrets in input unless 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

  1. Create a free VX Agents account (sandbox tools included).
  2. Open the marketplace and connect “Replicate Predictions” to an agent.
  3. Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.

Related APIs