Skip to main content
Glama

Run Any Replicate Model

replicate_run_model

Run any Replicate catalog model by owner/name to handle tasks not covered by dedicated tools, including embeddings, segmentation, inpainting, 3D generation, or speech recognition.

Instructions

Generic escape hatch: run ANY model in the Replicate catalog by its "owner/name" identifier. This tool gives Claude access to the entire Replicate model catalog — anything not covered by the curated specialised tools (image, video, audio, speech, chat, vision, upscale, remove-bg) can be reached from here.

DISPLAY REQUIREMENT — if the result includes image URLs, paste ONE of the embed blocks the tool prints (iframe / / markdown — try in order) verbatim in your reply so the image renders inline in the chat.

Use this for any category WITHOUT a curated specialised tool, including but not limited to:

  • Embeddings (sentence-transformers, BGE, Jina)

  • Segmentation (SAM, Segment Anything)

  • Depth estimation (MiDaS, ZoeDepth, Marigold)

  • Inpainting / outpainting (LaMa, Stable Diffusion Inpaint, controlnet-inpaint)

  • ControlNet variants (canny, depth, openpose, normal-map)

  • Face / pose / hand detection (insightface, mediapipe, etc.)

  • 3D generation (TripoSR, Wonder3D, InstantMesh)

  • Audio-to-text / speech recognition (whisper, Distil-Whisper)

  • Audio separation / stem splitting (Demucs, MDX)

  • Style transfer, colourisation, deblurring, denoising

  • Code completion / instruction-tuned code models (CodeLlama, DeepSeek-Coder)

  • Music continuation / source separation

  • ANY newly released model not yet in the curated registries

Workflow:

  1. (Optional) Call replicate_search_models to discover models by keyword (e.g. "image segmentation", "speech to text").

  2. (Recommended) Call replicate_get_model_schema with "owner/name" to inspect required inputs.

  3. Call this tool with the model id and an input object matching that schema.

Args:

  • model (string): "owner/name" (latest official version) or "owner/name:version_hash" (pinned).

  • input (object): Model-specific input parameters.

  • download (boolean, default true): Download outputs locally.

  • timeout_ms: Default 300000.

Returns: PredictionResult.

Examples:

  • Upscale an image: model="nightmareai/real-esrgan", input={"image": "https://example.com/in.png", "scale": 4}

  • Remove background: model="lucataco/remove-bg", input={"image": ""}

  • Run an LLM (output is text, not a file, so local_paths will be empty): model="meta/meta-llama-3-70b-instruct", input={"prompt": "Explain quantum entanglement in two sentences."}

Input Schema

NameRequiredDescriptionDefault
inputYesModel input parameters as a JSON object. Use replicate_get_model_schema first if unsure what a model accepts.
modelYesReplicate model identifier. Either "owner/name" (uses latest official version) or "owner/name:version_hash" (pins a specific version). Examples: "black-forest-labs/flux-schnell", "meta/meta-llama-3-70b-instruct".
downloadNoWhether to download the generated files locally. Default true. When false, only Replicate URLs are returned (URLs expire after ~24h).
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.1
    • addedInput schema / properties / input / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv3.2.3

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: discloses that download=true writes files locally while false returns Replicate URLs that expire in ~24h, that timeout expiry returns a prediction ID for polling via replicate_get_prediction, that text-output models leave local_paths empty, and imposes a display requirement for inline image rendering. The only gap against a perfect score is that it doesn't discuss cost implications or failure/error behavior, which matter given the openWorld, non-idempotent profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Strongly front-loaded: the escape-hatch framing comes first, then the display rule, then usage, then workflow, then args and examples. The 14-item category list is the one over-long element and could be compressed for an escape-hatch tool, but each bullet does real routing work against a large sibling set.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by naming the return type (PredictionResult) and explaining local_paths/download semantics and the polling path on timeout. For an open-world escape hatch with a free-form nested input object, this covers everything an agent needs to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already documents all four parameters, so the baseline is 3. The description still earns credit by adding concrete model identifier examples including the owner/name vs owner/name:version_hash pinning distinction, plus three worked input-object examples that show how model-specific inputs are shaped — meaning the schema cannot convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opening line names the verb and resource precisely ("run ANY model in the Replicate catalog by its owner/name identifier") and explicitly frames it as the "generic escape hatch" relative to the curated specialised tools. An agent can immediately tell this apart from siblings like replicate_generate_image or replicate_segment without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States when to use it (any category without a curated special tool, with an enumerated list of examples) and names the two prerequisite alternatives — replicate_search_models for discovery and replicate_get_model_schema for schema inspection — in a numbered workflow. The exclusions are explicit rather than implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.