KosmoKrator

ai

Replicate CLI for AI Agents

Use the Replicate CLI from KosmoKrator to call Replicate tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write API key auth

Replicate CLI Setup

Replicate can be configured headlessly with `kosmokrator integrations:configure replicate`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure replicate --set api_key="$REPLICATE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor replicate --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key REPLICATE_API_KEY Secret secret yes API Token
url REPLICATE_URL URL url no API Base URL

Call Replicate Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call replicate.replicate_list_predictions '{}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:replicate replicate_list_predictions '{}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs replicate --json
kosmo integrations:docs replicate.replicate_list_predictions --json
kosmo integrations:schema replicate.replicate_list_predictions --json
kosmo integrations:search "Replicate" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Replicate.

replicate.replicate_list_predictions

Read read

List recent Replicate predictions. Returns prediction IDs, statuses, model versions, and outputs.

Parameters
none

Generic CLI call

kosmo integrations:call replicate.replicate_list_predictions '{}' --json

Provider shortcut

kosmo integrations:replicate replicate_list_predictions '{}' --json

replicate.replicate_get_prediction

Read read

Get detailed information about a specific Replicate prediction by its ID, including status, output, logs, and error details.

Parameters
prediction_id

Generic CLI call

kosmo integrations:call replicate.replicate_get_prediction '{"prediction_id":"example_prediction_id"}' --json

Provider shortcut

kosmo integrations:replicate replicate_get_prediction '{"prediction_id":"example_prediction_id"}' --json

replicate.replicate_create_prediction

Write write

Create a new prediction on Replicate by providing a model version and input. Returns the prediction object with status. Poll get_prediction for results.

Parameters
version, input, webhook, webhook_events

Generic CLI call

kosmo integrations:call replicate.replicate_create_prediction '{"version":"example_version","input":"example_input","webhook":"example_webhook","webhook_events":"example_webhook_events"}' --json

Provider shortcut

kosmo integrations:replicate replicate_create_prediction '{"version":"example_version","input":"example_input","webhook":"example_webhook","webhook_events":"example_webhook_events"}' --json

replicate.replicate_list_models

Read read

List available Replicate models. Returns model names, owners, descriptions, and latest version IDs.

Parameters
none

Generic CLI call

kosmo integrations:call replicate.replicate_list_models '{}' --json

Provider shortcut

kosmo integrations:replicate replicate_list_models '{}' --json

replicate.replicate_get_model

Read read

Get detailed information about a specific Replicate model by owner and name, including description, versions, and input schema.

Parameters
model_owner, model_name

Generic CLI call

kosmo integrations:call replicate.replicate_get_model '{"model_owner":"example_model_owner","model_name":"example_model_name"}' --json

Provider shortcut

kosmo integrations:replicate replicate_get_model '{"model_owner":"example_model_owner","model_name":"example_model_name"}' --json

replicate.replicate_list_collections

Read read

List curated model collections on Replicate. Returns collection names, descriptions, and model slugs.

Parameters
none

Generic CLI call

kosmo integrations:call replicate.replicate_list_collections '{}' --json

Provider shortcut

kosmo integrations:replicate replicate_list_collections '{}' --json

replicate.replicate_get_current_user

Read read

Get the current Replicate user profile and billing information.

Parameters
none

Generic CLI call

kosmo integrations:call replicate.replicate_get_current_user '{}' --json

Provider shortcut

kosmo integrations:replicate replicate_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

replicate.replicate_list_predictions

List recent Replicate predictions. Returns prediction IDs, statuses, model versions, and outputs.

Operation
Read read
Schema command
kosmo integrations:schema replicate.replicate_list_predictions --json
ParameterTypeRequiredDescription
No parameters.

replicate.replicate_get_prediction

Get detailed information about a specific Replicate prediction by its ID, including status, output, logs, and error details.

Operation
Read read
Schema command
kosmo integrations:schema replicate.replicate_get_prediction --json
ParameterTypeRequiredDescription
prediction_id string yes The unique prediction identifier.

replicate.replicate_create_prediction

Create a new prediction on Replicate by providing a model version and input. Returns the prediction object with status. Poll get_prediction for results.

Operation
Write write
Schema command
kosmo integrations:schema replicate.replicate_create_prediction --json
ParameterTypeRequiredDescription
version string yes The model version ID (a hex string).
input object yes An object of model input values (varies by model).
webhook string no A URL to receive POST notifications when the prediction completes.
webhook_events array no List of webhook events to subscribe to (e.g., ["output", "completed"]).

replicate.replicate_list_models

List available Replicate models. Returns model names, owners, descriptions, and latest version IDs.

Operation
Read read
Schema command
kosmo integrations:schema replicate.replicate_list_models --json
ParameterTypeRequiredDescription
No parameters.

replicate.replicate_get_model

Get detailed information about a specific Replicate model by owner and name, including description, versions, and input schema.

Operation
Read read
Schema command
kosmo integrations:schema replicate.replicate_get_model --json
ParameterTypeRequiredDescription
model_owner string yes The model owner (user or organization name).
model_name string yes The model name.

replicate.replicate_list_collections

List curated model collections on Replicate. Returns collection names, descriptions, and model slugs.

Operation
Read read
Schema command
kosmo integrations:schema replicate.replicate_list_collections --json
ParameterTypeRequiredDescription
No parameters.

replicate.replicate_get_current_user

Get the current Replicate user profile and billing information.

Operation
Read read
Schema command
kosmo integrations:schema replicate.replicate_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.