The Replicate connector lets your AI agent act in each user's Replicate account. Each user connects their own Replicate access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 33 tools.
- Tools
- 33
- What they doRead · write · destructive
- 19 · 10 · 419 read10 write4 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Replicate connection
In AgentKit > Connections, create a Replicate connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'replicate'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Replicate:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'replicate_get_account',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "replicate"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Replicate:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="replicate_get_account",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Replicate credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolreplicate_get_accountGet the user or organization that owns the API token in use.Read-onlyGet Account
Get the user or organization that owns the API token in use. Returns the account type (user or organization), username, display name, GitHub URL and avatar URL. Use it to confirm which account the connection is authenticated as; the username is the owner value for models and deployments you create.
Inputs
This tool takes no inputs.
replicate_get_collectionGet one collection of models by slug.Read-onlyGet Collection
Get one collection of models by slug. Returns the collection's name, slug, description, full_description and its models array. Use replicate_list_collections to find collection slugs.
Inputs
collection_slugstringrequired- Slug of the collection, such as 'super-resolution' or 'image-restoration'. Get slugs from replicate_list_collections.
replicate_get_deploymentGet one deployment by owner and name.Read-onlyGet Deployment
Get one deployment by owner and name. Returns the deployment's owner, name and current_release (release number, model, version, creator and configuration with hardware, min_instances and max_instances). Use replicate_list_deployments to find deployments.
Inputs
deployment_namestringrequired- Name of the deployment.
deployment_ownerstringrequired- Username or organization that owns the deployment.
replicate_get_fileGet the details of one uploaded file by ID.Read-onlyGet File
Get the details of one uploaded file by ID. Returns the file's id, content_type, size, checksums, metadata, created_at, expires_at and urls. Use replicate_list_files to find file IDs.
Inputs
file_idstringrequired- ID of the file, returned in the 'id' field when it was uploaded.
replicate_get_modelGet one model by owner and name.Read-onlyGet Model
Get one model by owner and name. Returns the model's url, owner, name, description, visibility, run_count, GitHub, paper and license URLs, cover image, default_example and latest_version. Use replicate_list_model_versions for all versions, replicate_get_model_readme for the README, and replicate_search to find a model first.
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
replicate_get_model_readmeGet the README of a model as Markdown text.Read-onlyGet Model README
Get the README of a model as Markdown text. Returns the README content as plain text. Use replicate_get_model for structured metadata such as description, visibility and latest_version.
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
replicate_get_model_versionGet one version of a model by version ID.Read-onlyGet Model Version
Get one version of a model by version ID. Returns the version's id, created_at, cog_version and openapi_schema, whose Input and Output schemas list the fields to pass to a prediction. Use replicate_list_model_versions to find version IDs.
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
version_idstringrequired- 64-character ID of the model version. Get it from replicate_list_model_versions.
replicate_get_predictionGet the current state of a prediction by ID.Read-onlyGet Prediction
Get the current state of a prediction by ID. Returns status (starting, processing, succeeded, failed, canceled or aborted), input, output, logs, error, metrics, timestamps and urls. Use it to poll a prediction started with a create-prediction tool. Use replicate_list_predictions to browse recent predictions.
Inputs
prediction_idstringrequired- ID of the prediction, returned in the 'id' field when it was created.
replicate_get_trainingGet the current state of a training by ID.Read-onlyGet Training
Get the current state of a training by ID. Returns status (starting, processing, succeeded, failed or canceled), input, output (version and weights once finished), logs, error, metrics, timestamps and urls. Use it to poll a training started with replicate_create_training.
Inputs
training_idstringrequired- ID of the training, returned in the 'id' field when it was created.
replicate_list_collectionsList curated collections of models, such as super-resolution or text-to-image.Read-onlyList Collections
List curated collections of models, such as super-resolution or text-to-image. Returns a paginated object with next, previous and a results array of collections (name, slug, description). Use replicate_get_collection to see the models in one collection.
Inputs
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
replicate_list_deploymentsList the deployments in the account, each with its current release configuration.Read-onlyList Deployments
List the deployments in the account, each with its current release configuration. Returns a paginated object with next, previous and a results array of deployments (owner, name, current_release with model, version and hardware settings). Use replicate_get_deployment for one deployment.
Inputs
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
replicate_list_filesList files uploaded to the account, newest first.Read-onlyList Files
List files uploaded to the account, newest first. Returns a paginated object with next, previous and a results array of file objects (id, content_type, size, created_at, expires_at, urls). Use replicate_get_file for one file.
Inputs
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
replicate_list_hardwareList the hardware options available for running models and deployments.Read-onlyList Hardware
List the hardware options available for running models and deployments. Returns an array of objects with the hardware name and sku, for example CPU / cpu and Nvidia T4 GPU / gpu-t4. Use it to find the sku value to pass when creating a model or deployment.
Inputs
This tool takes no inputs.
replicate_list_model_examplesList the example predictions the model's author saved to illustrate what it can do.Read-onlyList Model Examples
List the example predictions the model's author saved to illustrate what it can do. Returns a paginated object with next, previous and a results array of prediction objects (input and output). Use replicate_get_model for just the default example.
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
replicate_list_model_versionsList the versions of a model, newest first.Read-onlyList Model Versions
List the versions of a model, newest first. Returns a paginated object with next, previous and a results array of version objects (id, created_at, cog_version, openapi_schema). Use replicate_get_model_version for one version, whose openapi_schema describes the input and output fields.
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
replicate_list_modelsList public models, sorted by creation date or latest version date.Read-onlyList Models
List public models, sorted by creation date or latest version date. Returns a paginated object with next, previous and a results array of model objects (owner, name, description, visibility, run_count, latest_version). Use replicate_search to find models by text, and replicate_get_model for one model.
Inputs
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
sort_bystring- Field to sort by: 'model_created_at' or 'latest_version_created_at'. Defaults to latest_version_created_at.one of
model_created_atlatest_version_created_at sort_directionstring- Sort direction: 'asc' or 'desc'. Defaults to desc (newest first).one of
ascdesc
replicate_list_predictionsList predictions created by the account that owns the API token, newest first, 100 per page.Read-onlyList Predictions
List predictions created by the account that owns the API token, newest first, 100 per page. Returns a paginated object with next, previous and a results array of prediction objects (id, status, model, version, timestamps, urls). Use replicate_get_prediction for the full detail of one prediction.
Inputs
created_afterstring- Only include predictions created at or after this ISO 8601 date-time, such as 2025-01-01T00:00:00Z.
created_beforestring- Only include predictions created before this ISO 8601 date-time, such as 2025-02-01T00:00:00Z.
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
sourcestring- Filter by how the prediction was created. The only supported value is 'web'; leave empty for predictions from every source.one of
web
replicate_list_trainingsList trainings (fine-tunes) created by the account that owns the API token, newest first, 100 per page.Read-onlyList Trainings
List trainings (fine-tunes) created by the account that owns the API token, newest first, 100 per page. Returns a paginated object with next, previous and a results array of training objects (id, status, model, version, timestamps, urls). Use replicate_get_training for the full detail of one training.
Inputs
cursorstring- Pagination cursor for the next or previous page. Copy the value of the 'cursor' query parameter from the 'next' or 'previous' URL in a previous response; leave empty for the first page.
replicate_searchSearch public models, collections and docs with a text query (beta).Read-onlySearch
Search public models, collections and docs with a text query (beta). Returns query, models (each with model data plus metadata such as generated_description, tags and score), collections and pages (docs). Use it to discover a model by what it does. Use replicate_list_models to browse all models without a query.
Inputs
querystringrequired- Text to search for, such as 'nano banana' or 'image upscaling'.
limitinteger- Maximum number of model results to return, from 1 to 50. Defaults to 20.default
20
replicate_cancel_predictionCancel a prediction that is still starting or processing.WriteCancel Prediction
Cancel a prediction that is still starting or processing. Returns the prediction object with its updated status. Use it to stop a run you no longer need. It has no effect on a prediction that already finished. Prerequisite: the prediction ID from a create-prediction tool or replicate_list_predictions.
Inputs
prediction_idstringrequired- ID of the prediction to cancel.
replicate_cancel_trainingCancel a training that is still starting or processing.WriteCancel Training
Cancel a training that is still starting or processing. Returns the training object with its updated status. Use it to stop a fine-tune you no longer need. Prerequisite: the training ID from replicate_create_training or replicate_list_trainings.
Inputs
training_idstringrequired- ID of the training to cancel.
replicate_create_deploymentCreate a deployment that runs a model version on dedicated hardware with scaling limits.WriteCreate Deployment
Create a deployment that runs a model version on dedicated hardware with scaling limits. Returns the deployment object with owner, name and current_release (model, version and configuration). Use replicate_create_deployment_prediction to run it and replicate_update_deployment to change it. Prerequisite: replicate_list_hardware gives the hardware sku and replicate_list_model_versions the version ID.
Inputs
hardwarestringrequired- SKU of the hardware used to run the model, such as 'cpu' or 'gpu-t4'. Use replicate_list_hardware to see the valid SKUs.
max_instancesintegerrequired- Maximum number of instances to scale up to.
min_instancesintegerrequired- Minimum number of instances to keep running. Use 0 to scale to zero when idle.
modelstringrequired- Full name of the model to deploy, such as 'stability-ai/sdxl'.
namestringrequired- Name of the deployment.
versionstringrequired- 64-character ID of the model version to deploy.
replicate_create_deployment_predictionRun a prediction against one of your deployments, which uses the deployment's configured model version and hardware.WriteCreate Deployment Prediction
Run a prediction against one of your deployments, which uses the deployment's configured model version and hardware. Returns the prediction object with id, status, input, output (once available), logs, error, metrics and urls. Use replicate_create_prediction to run a model version directly. Poll with replicate_get_prediction when the result is not final. Prerequisite: replicate_list_deployments gives the deployment owner and name.
Inputs
deployment_namestringrequired- Name of the deployment.
deployment_ownerstringrequired- Username or organization that owns the deployment.
inputobjectrequired- The model's input as a JSON object. The fields depend on the model; read them from the model's version via replicate_get_model_version (openapi_schema.components.schemas.Input). Example: {"prompt": "An astronaut riding a rainbow unicorn"}.
wait_secondsinteger- How many seconds (1-60) Replicate keeps the request open waiting for the prediction to finish before returning the in-progress prediction. If it does not finish in time, poll with replicate_get_prediction. Defaults to 10.default
10 webhookstring- HTTPS URL that Replicate calls with a POST request containing the prediction object when it has new output or finishes. Leave empty to poll instead.
webhook_events_filterarray- Which events trigger the webhook: any of 'start', 'output', 'logs', 'completed'. Leave empty to receive output and completion events.
replicate_create_modelCreate a new model under your account or organization.WriteCreate Model
Create a new model under your account or organization. Returns the new model object with url, owner, name, description, visibility and links. Use it before pushing a version or as the destination of replicate_create_training. Prerequisite: replicate_list_hardware gives the hardware sku; owner must be the account making the request (see replicate_get_account).
Inputs
hardwarestringrequired- SKU of the hardware used to run the model, such as 'cpu' or 'gpu-t4'. Use replicate_list_hardware to see the valid SKUs.
namestringrequired- Name of the model. It must be unique among the models owned by this account.
ownerstringrequired- Username or organization that will own the model. It must be the account that owns the API token.
visibilitystringrequired- Whether the model is 'public' (anyone can view and run it) or 'private' (only the owner can).one of
publicprivate cover_image_urlstring- URL of an image file to use as the model's cover image.
descriptionstring- Short description of the model.
github_urlstring- URL of the model's source code on GitHub.
license_urlstring- URL of the model's license.
paper_urlstring- URL of the paper describing the model.
replicate_create_model_predictionRun an official model by its owner and name, using the model's latest version.WriteCreate Model Prediction
Run an official model by its owner and name, using the model's latest version. Returns the prediction object with id, status, input, output (once available), logs, error, metrics and urls. Use replicate_create_prediction to run a specific version, and replicate_create_deployment_prediction for a deployment. Poll with replicate_get_prediction when the result is not final. Prerequisite: the model must be an official model; replicate_get_model shows its input schema.
Inputs
inputobjectrequired- The model's input as a JSON object. The fields depend on the model; read them from the model's version via replicate_get_model_version (openapi_schema.components.schemas.Input). Example: {"prompt": "An astronaut riding a rainbow unicorn"}.
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
wait_secondsinteger- How many seconds (1-60) Replicate keeps the request open waiting for the prediction to finish before returning the in-progress prediction. If it does not finish in time, poll with replicate_get_prediction. Defaults to 10.default
10 webhookstring- HTTPS URL that Replicate calls with a POST request containing the prediction object when it has new output or finishes. Leave empty to poll instead.
webhook_events_filterarray- Which events trigger the webhook: any of 'start', 'output', 'logs', 'completed'. Leave empty to receive output and completion events.
replicate_create_predictionRun a model version by creating a prediction from an owner/name:version identifier or a bare version ID.WriteCreate Prediction
Run a model version by creating a prediction from an owner/name:version identifier or a bare version ID. Returns the prediction object with id, status, input, output (once available), logs, error, metrics and urls; the status is starting or processing if the wait elapsed first. Use replicate_create_model_prediction for official models addressed by owner/name, and replicate_create_deployment_prediction for deployments. Poll with replicate_get_prediction when the result is not final. Prerequisite: replicate_get_model_version shows the input fields the version accepts.
Inputs
inputobjectrequired- The model's input as a JSON object. The fields depend on the model; read them from the model's version via replicate_get_model_version (openapi_schema.components.schemas.Input). Example: {"prompt": "An astronaut riding a rainbow unicorn"}.
versionstringrequired- Identifier of the model or version to run. Accepts a bare 64-character version ID, 'owner/name' for an official model, or 'owner/name:version_id'.
wait_secondsinteger- How many seconds (1-60) Replicate keeps the request open waiting for the prediction to finish before returning the in-progress prediction. If it does not finish in time, poll with replicate_get_prediction. Defaults to 10.default
10 webhookstring- HTTPS URL that Replicate calls with a POST request containing the prediction object when it has new output or finishes. Leave empty to poll instead.
webhook_events_filterarray- Which events trigger the webhook: any of 'start', 'output', 'logs', 'completed'. Leave empty to receive output and completion events.
replicate_create_trainingStart a training that fine-tunes a model version and pushes the result to a destination model you own.WriteCreate Training
Start a training that fine-tunes a model version and pushes the result to a destination model you own. Returns the training object with id, status, input, model, version and urls. Use replicate_get_training to poll it and replicate_cancel_training to stop it. Prerequisite: the destination model must already exist (replicate_create_model) and the version must support training.
Inputs
destinationstringrequired- Model to push the trained version to, in the format 'destination_owner/destination_name'. The model must already exist and belong to the account making the request.
inputobjectrequired- Inputs for the trainer's train() function as a JSON object. The fields depend on the trainer; see the Input schema from replicate_get_model_version. Example: {"input_images": "https://example.com/my-input-images.zip"}.
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
version_idstringrequired- 64-character ID of the model version. Get it from replicate_list_model_versions.
webhookstring- HTTPS URL that Replicate calls with a POST request containing the training object when it completes. Leave empty to poll instead.
webhook_events_filterarray- Which events trigger the webhook: any of 'start', 'output', 'logs', 'completed'. Leave empty to receive output and completion events.
replicate_update_deploymentChange the hardware, instance limits or model version of an existing deployment.WriteUpdate Deployment
Change the hardware, instance limits or model version of an existing deployment. Returns the updated deployment object with its new current_release. Use replicate_get_deployment to read the current configuration first. Only the fields you provide are changed.
- Idempotent
Inputs
deployment_namestringrequired- Name of the deployment.
deployment_ownerstringrequired- Username or organization that owns the deployment.
hardwarestring- SKU of the hardware used to run the model, such as 'cpu' or 'gpu-t4'. Use replicate_list_hardware to see the valid SKUs.
max_instancesinteger- New maximum number of instances.
min_instancesinteger- New minimum number of instances.
versionstring- ID of the model version to deploy.
replicate_update_modelUpdate the description, README or links of a model you own.WriteUpdate Model
Update the description, README or links of a model you own. Returns the updated model object. Use replicate_get_model to read the current values first. Only the fields you provide are changed.
- Idempotent
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
descriptionstring- New description of the model.
github_urlstring- New URL of the model's source code on GitHub.
license_urlstring- New URL of the model's license.
paper_urlstring- New URL of the model's paper.
readmestring- New README content for the model, in Markdown.
weights_urlstring- New URL of the model's weights.
replicate_delete_deploymentPermanently delete a deployment.DestructiveDelete Deployment
Permanently delete a deployment. Returns an empty response (HTTP 204) on success. Use it only for deployments that have been offline and unused for at least 15 minutes, which Replicate requires before deleting.
- Idempotent
Inputs
deployment_namestringrequired- Name of the deployment.
deployment_ownerstringrequired- Username or organization that owns the deployment.
replicate_delete_fileDelete an uploaded file by ID.DestructiveDelete File
Delete an uploaded file by ID. Returns an empty response (HTTP 204) on success. Use it to remove files you no longer need; the file can no longer be used as model input afterwards.
- Idempotent
Inputs
file_idstringrequired- ID of the file, returned in the 'id' field when it was uploaded.
replicate_delete_modelPermanently delete a private model you own.DestructiveDelete Model
Permanently delete a private model you own. Returns an empty response (HTTP 204) on success. Use it only for models you no longer need; Replicate only deletes private models that have no versions, so remove versions first with replicate_delete_model_version. Prerequisite: replicate_list_model_versions shows the versions to remove.
- Idempotent
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
replicate_delete_model_versionDelete one version of a private model you own, together with all its predictions and output files.DestructiveDelete Model Version
Delete one version of a private model you own, together with all its predictions and output files. Replicate processes the deletion asynchronously, which can take a few minutes. Returns an empty response (HTTP 202) once the request is accepted. Use it to retire an old version; Replicate refuses if others ran predictions with it, a training uses it as base, or a deployment references it. Prerequisite: replicate_list_model_versions shows the version IDs.
- Idempotent
Inputs
model_namestringrequired- Name of the model within the owner's account, such as 'flux-schnell' or 'hello-world'.
model_ownerstringrequired- Username or organization that owns the model, such as 'black-forest-labs' or 'replicate'.
version_idstringrequired- 64-character ID of the model version. Get it from replicate_list_model_versions.
No tools match.