Replicate Tools

Configuration File: replicate_tools.json Tool Type: Local Tools Count: 2

This page contains all tools defined in the replicate_tools.json configuration file.

Available Tools

Replicate_get_prediction (Type: ReplicateTool)

Fetch the current state of a previously created Replicate prediction by its id (GET /v1/predictio…

Replicate_get_prediction tool specification

Tool Information:

  • Name: Replicate_get_prediction

  • Type: ReplicateTool

  • Description: Fetch the current state of a previously created Replicate prediction by its id (GET /v1/predictions/{id}). Use this to retrieve the output of a prediction that was still running (status=’processing’) when Replicate_run_prediction returned, or to re-check a long-running job. Returns {id, status, output, error, logs, poll_url}; status is one of starting/processing/succeeded/failed/canceled. REQUIRES env var REPLICATE_API_TOKEN (read from environment only). The prediction_id comes from the ‘id’ field of a prior Replicate_run_prediction call.

Parameters:

  • operation (unknown) (required) Operation selector (fixed).

  • prediction_id (string) (required) The prediction id returned in the ‘id’ field of a prior Replicate_run_prediction call, e.g. ‘gm3qorzdhgbfurvjtvhg6dckhu’.

Example Usage:

query = {
    "name": "Replicate_get_prediction",
    "arguments": {
        "operation": "example_value",
        "prediction_id": "example_value"
    }
}
result = tu.run(query)

Replicate_run_prediction (Type: ReplicateTool)

Run a prediction on any model hosted on Replicate (https://replicate.com), the platform serving t…

Replicate_run_prediction tool specification

Tool Information:

  • Name: Replicate_run_prediction

  • Type: ReplicateTool

  • Description: Run a prediction on any model hosted on Replicate (https://replicate.com), the platform serving thousands of community ML models (image generation, protein structure, language, embeddings, audio, etc.). Specify the model by ‘model’ (owner/name, runs the latest version) OR by ‘version’ (a 64-char version hash, pins an exact version) — not both — plus ‘input’, an object of the model’s inputs (see the model page for its schema). Replicate is asynchronous: this tool creates the prediction (POST /v1/predictions or POST /v1/models/{owner}/{name}/predictions), then polls urls.get until status is succeeded/failed/canceled (bounded to ~22s). If still running, it returns status=’processing’ with the prediction id so you can fetch it later with Replicate_get_prediction. Returns {id, status, output, error, logs, poll_url}. REQUIRES env var REPLICATE_API_TOKEN (read from environment only). Example: model=’replicate/hello-world’, input={‘text’:’Claude’} returns output ‘hello Claude’.

Parameters:

  • operation (unknown) (required) Operation selector (fixed).

  • model ([‘string’, ‘null’]) (optional) Model in ‘owner/name’ form, e.g. ‘replicate/hello-world’. Runs the model’s latest/default version. Provide either ‘model’ or ‘version’, not both.

  • version ([‘string’, ‘null’]) (optional) A specific 64-char hex version hash from the model’s API page. Pins an exact version. Provide either ‘model’ or ‘version’, not both.

  • input (object) (required) Object of the model’s inputs, e.g. {‘text’: ‘hello’} for replicate/hello-world or {‘prompt’: ‘a cat’} for an image model. See the model page on replicate.com for its exact input schema.

Example Usage:

query = {
    "name": "Replicate_run_prediction",
    "arguments": {
        "operation": "example_value",
        "input": "example_value"
    }
}
result = tu.run(query)