replicate

v1.0.2
com.mcparmory/replicate Checked 3 hours ago Published 6 months ago

Run AI models, create deployments, and manage predictions via cloud API

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_account Get Account

Retrieve information about the authenticated account associated with the provided API token, including account type, username, display name, and GitHub URL.

list_collections List Collections

Retrieve a paginated list of model collections available on Replicate, each containing curated groups of related models organized by use case or capability.

get_collection Get Collection

Retrieve a collection of models by its slug, including the collection metadata and all models within it.

ParameterTypeDescription
collection_slug *stringThe unique identifier slug for the collection (e.g., 'super-resolution', 'image-restoration'). Find available collections at replicate.com/collections.

list_deployments List Deployments

Retrieve a paginated list of all deployments associated with your account, sorted by most recent first. Each deployment includes its current release configuration with model, version, and hardware settings.

create_deployment Create Deployment

Create a new deployment to run a specific model version on designated hardware with auto-scaling configuration. The deployment will be immediately available for inference requests.

ParameterTypeDescription
hardware *stringThe hardware SKU to run the model on. Available SKUs can be retrieved from the hardware list endpoint (e.g., gpu-t4, gpu-a40).
max_instances *integerThe maximum number of instances for auto-scaling. Must be between 0 and 20, and should be greater than or equal to min_instances.
min_instances *integerThe minimum number of instances to keep running. Must be between 0 and 5, and should be less than or equal to max_instances.
model *stringThe full model identifier in the format owner/model-name (e.g., stability-ai/sdxl).
name *stringA unique name for this deployment within your organization. Used to identify and manage the deployment.
version *stringThe 64-character version ID of the model to deploy. This specifies the exact model version and weights to use.

get_deployment Get Deployment

Retrieve detailed information about a specific deployment, including its current release configuration, hardware settings, and scaling parameters.

ParameterTypeDescription
deployment_name *stringThe name of the deployment to retrieve.
deployment_owner *stringThe username or organization name that owns the deployment.

update_deployment Update Deployment

Modify an existing deployment's configuration, including hardware SKU, scaling limits, and model version. Each update increments the deployment's release number.

ParameterTypeDescription
deployment_name *stringThe name of the deployment to update.
deployment_owner *stringThe username or organization name that owns the deployment.
hardwarestringThe hardware SKU to run the model on (e.g., gpu-t4). Available options can be retrieved from the hardware list endpoint.
max_instancesintegerThe maximum number of instances for autoscaling, ranging from 0 to 20.
min_instancesintegerThe minimum number of instances to maintain, ranging from 0 to 5.
versionstringThe model version ID to deploy. Use this to update the deployment to a different version of the model.

delete_deployment Delete Deployment

Delete a deployment that has been offline and unused for at least 15 minutes. The operation returns a 204 status code on successful deletion.

ParameterTypeDescription
deployment_name *stringThe name of the deployment to delete.
deployment_owner *stringThe username or organization name that owns the deployment being deleted.

create_deployment_prediction Create Deployment Prediction

Create a prediction by running a model on a deployment with specified inputs. The request can optionally wait synchronously for results (up to 60 seconds) or return immediately with a prediction ID for asynchronous polling.

ParameterTypeDescription
deployment_name *stringThe name of the deployment to run the prediction against.
deployment_owner *stringThe username or organization name that owns the deployment.
input *objectA JSON object containing the model's input parameters. The required fields depend on the specific model running on the deployment. Files should be passed as HTTP URLs (for files >256KB or reusable fil…
Cancel-AfterstringMaximum duration the prediction can run before automatic cancellation, measured from creation time. Specify with optional unit suffix: `s` for seconds, `m` for minutes, `h` for hours (e.g., `5m`, `1h3…
PreferstringSet to `wait` or `wait=n` (where n is 1-60 seconds) to hold the request open and wait for the model to complete. Without this header, the prediction starts asynchronously and returns immediately.
webhookstringAn HTTPS URL that receives a POST webhook notification when the prediction updates or completes. The request body will contain the full prediction object. Replicate retries on network failures, so the…
webhook_events_filterarrayAn array of event types that trigger webhook requests: `start` (immediately), `output` (each new output), `logs` (each log line), or `completed` (terminal state). If omitted, defaults to sending on ou…

list_files List Files

Retrieve a paginated list of all files created by the user or organization associated with the API token, sorted with the most recent file first.

create_file Create File

Upload a file with its content and optional metadata. The file is stored and can be referenced by its returned ID for use in other operations.

ParameterTypeDescription
content *stringBase64-encoded file content for upload. The raw file content to upload. Provide the binary data of the file you want to store.
filenamestringThe name of the file being uploaded. Must be valid UTF-8 and not exceed 255 bytes in length.
metadataobjectOptional custom metadata to associate with the file as a JSON object. Defaults to an empty object if not provided.
typestringThe MIME type of the file content (e.g., application/zip, application/json, image/png). Defaults to application/octet-stream if not specified.

get_file Get File

Retrieve detailed metadata and information about a specific file by its ID.

ParameterTypeDescription
file_id *stringThe unique identifier of the file to retrieve.

delete_file Delete File

Permanently delete a file by its ID. Once deleted, the file resource will no longer be accessible and subsequent requests will return a 404 Not Found error.

ParameterTypeDescription
file_id *stringThe unique identifier of the file to delete. This ID must correspond to an existing file in the system.

get_file_download Get File Download

Download a file using authenticated access credentials. Requires the file ID, owner information, and a cryptographically signed URL that includes an expiration timestamp.

ParameterTypeDescription
expiry *stringUnix timestamp (seconds since epoch) indicating when this download URL expires and becomes invalid.
file_id *stringThe unique identifier of the file to download.
owner *stringThe username of the user or organization that owns and uploaded the file.
signature *stringBase64-encoded HMAC-SHA256 signature authenticating the download request. Generated by hashing the string '{owner} {id} {expiry}' with your Files API signing secret.

list_available_hardware List Available Hardware

Retrieve a list of all available hardware accelerators and compute resources that can be used for running models on Replicate.

list_models List Models

Retrieve a paginated list of publicly available models, optionally sorted by creation date or latest version update.

ParameterTypeDescription
sort_bystringField to sort results by: either model creation date or the date of the model's latest version. Defaults to sorting by latest version creation date.
sort_directionstringSort direction for results: ascending (oldest first) or descending (newest first). Defaults to descending.

create_model Create Model

Create a new model in your account. Each account is limited to 1,000 models; for iterative improvements, create new versions of an existing model instead.

ParameterTypeDescription
hardware *stringThe hardware SKU required to run this model. Valid values can be retrieved from the hardware.list endpoint (e.g., 'cpu', 'gpu-t4').
name *stringThe model's name, which must be unique within your user or organization account. Use lowercase alphanumeric characters and hyphens.
owner *stringThe username or organization name that will own this model. Must match the account associated with your API token.
visibility *stringControls model visibility: 'public' allows anyone to view and run the model, while 'private' restricts access to account members only.
cover_image_urlstringA URL pointing to an image file to use as the model's cover image on the Replicate platform.
descriptionstringA brief description explaining what the model does and its primary use case.
github_urlstringA URL to the model's source code repository on GitHub.
license_urlstringA URL to the license governing the model's use and distribution.
paper_urlstringA URL to the academic paper or research publication describing the model's methodology.

search_models Search Models

Search for public models on Replicate using a text query. Returns a paginated list of models matching your search criteria.

ParameterTypeDescription
body *stringThe search query string to find matching models. Can include model names, descriptions, or keywords.

get_model Get Model

Retrieve detailed metadata for a specific model, including its latest version, input/output schemas, and example prediction. Returns comprehensive information about the model's configuration, visibility, and usage statistics.

ParameterTypeDescription
model_name *stringThe unique identifier of the model within the owner's namespace.
model_owner *stringThe username or organization name that owns the model.

update_model_metadata Update Model Metadata

Update metadata properties for an existing model, including description, documentation, and resource links. Only specified properties are updated; omitted properties remain unchanged.

ParameterTypeDescription
model_name *stringThe name of the model to update.
model_owner *stringThe username or organization name that owns the model.
descriptionstringA brief description of the model's purpose and functionality.
github_urlstringA URL pointing to the model's source code repository on GitHub.
license_urlstringA URL pointing to the model's license document or license page.
paper_urlstringA URL pointing to the research paper or academic publication associated with the model.
readmestringThe README content in Markdown format, typically including usage instructions, examples, and documentation.
weights_urlstringA URL pointing to the pre-trained model weights or model artifacts, such as on Hugging Face or similar hosting platforms.

delete_model Delete Model

Permanently delete a private model you own. The model must have no versions associated with it—delete all versions before attempting to delete the model itself.

ParameterTypeDescription
model_name *stringThe name of the model to delete. The model must be private and have no versions remaining.
model_owner *stringThe username or organization name that owns the model. You can only delete models you own.

list_model_examples List Model Examples

Retrieve all example predictions that were saved by the model author to demonstrate the model's capabilities. Use this to browse illustrative examples; for just the default example, use the get_model operation instead.

ParameterTypeDescription
model_name *stringThe name of the model.
model_owner *stringThe username or organization name that owns the model.

create_prediction_for_official_model Create Prediction for Official Model

Create a prediction by running an official model. The request can optionally wait synchronously for up to 60 seconds for the model to complete, or return immediately with a starting status for asynchronous polling.

ParameterTypeDescription
input *objectThe model's input parameters as a JSON object. Structure depends on the specific model being run. Files should be passed as HTTP URLs (for files >256KB or reusable files) or data URLs (for files ≤25…
model_name *stringThe name of the official model to run.
model_owner *stringThe username or organization name that owns the official model.
Cancel-AfterstringMaximum duration the prediction can run before automatic cancellation, measured from creation time. Specify as a number with optional unit suffix: `s` for seconds, `m` for minutes, `h` for hours (e.g.…
PreferstringEnable synchronous mode by setting to `wait` or `wait=n` where n is the number of seconds (1-60) to wait for the model to finish. If omitted, the request returns immediately.
webhookstringAn HTTPS URL that receives a POST webhook notification when the prediction updates or completes. The request body matches the prediction's full state. Replicate retries on network failures, so the end…
webhook_events_filterarrayFilter which events trigger webhook requests: `start` (immediately), `output` (each generation), `logs` (each log line), or `completed` (terminal state). Output and logs events are throttled to at mos…

get_model_readme Get Model Readme

Retrieve the README documentation for a specific model. Returns the README content as plain text in Markdown format.

ParameterTypeDescription
model_name *stringThe name of the model to retrieve documentation for.
model_owner *stringThe username or organization name that owns the model.

list_model_versions List Model Versions

Retrieve all versions of a model owned by a specific user or organization, sorted with the most recent version first. Returns paginated results including version metadata and OpenAPI schemas.

ParameterTypeDescription
model_name *stringThe name of the model. Combined with the model owner, this uniquely identifies which model's versions to retrieve.
model_owner *stringThe username or organization name that owns the model. This identifies the model's owner in the Replicate registry.

get_model_version Get Model Version

Retrieve detailed metadata and schema information for a specific version of a model, including its OpenAPI schema that describes the model's inputs and outputs.

ParameterTypeDescription
model_name *stringThe name of the model to retrieve version information for.
model_owner *stringThe username or organization name that owns the model.
version_id *stringThe unique identifier of the specific model version to retrieve.

delete_model_version Delete Model Version

Permanently delete a specific model version and all associated predictions and output files. Deletion is asynchronous and may take several minutes to complete.

ParameterTypeDescription
model_name *stringThe name of the model containing the version to delete.
model_owner *stringThe username or organization name that owns the model. You must be the owner to delete versions.
version_id *stringThe unique identifier of the model version to delete. The version cannot be deleted if it's in use by deployments, fine-tuning jobs, other model versions, or has predictions run by other users.

create_training Create Training

Start a new training job for a model version. The training will create a new version of the model at the specified destination when complete. Since training can take several minutes or longer, use webhooks or polling to track completion.

ParameterTypeDescription
destination *stringThe target model location in format `owner/name`. Must be an existing model owned by the requesting user or organization.
input *objectAn object containing input parameters for the model's training function. Structure depends on the specific model's training requirements.
model_name *stringThe name of the model to train.
model_owner *stringThe username or organization name that owns the model being trained.
version_id *stringThe unique identifier of the model version to use as the base for training.
webhookstringAn HTTPS URL that will receive a POST request when the training completes. The request body will contain the final training status. Replicate will retry on network failures, so the endpoint should be…
webhook_events_filterarrayAn array of event types that trigger webhook requests. Valid events are `start` (immediately when training begins), `output` (when training generates outputs), `logs` (when log output is generated), a…

list_predictions List Predictions

Retrieve a paginated list of all predictions created by your user or organization, including those from both API and web sources. Results are sorted with the most recent prediction first, returning up to 100 records per page.

ParameterTypeDescription
created_afterstringFilter to include only predictions created at or after this date-time. Specify in ISO 8601 format (e.g., 2025-01-01T00:00:00Z).
created_beforestringFilter to include only predictions created before this date-time. Specify in ISO 8601 format (e.g., 2025-02-01T00:00:00Z).
sourcestringFilter predictions by creation source. Use 'web' to show only web-created predictions (limited to the last 14 days). Omit this parameter to include predictions from both API and web sources.

create_prediction Create Prediction

Submit a prediction request to run a model with specified inputs. The request can optionally wait synchronously for results (up to 60 seconds) or return immediately with a prediction ID for asynchronous polling.

ParameterTypeDescription
input *objectRequired JSON object containing the model's input parameters. Structure depends on the specific model version being run. Files should be passed as HTTP URLs (for files >256KB or reusable files) or dat…
version *stringRequired identifier for the model or version to execute. Accepts three formats: `owner/model` for official models, `owner/model:version_id` for specific versions, or just the 64-character `version_id`…
Cancel-AfterstringSet a maximum runtime duration for the prediction before automatic cancellation. Accepts durations with optional unit suffixes: seconds (s), minutes (m), or hours (h). Combine units for precision (e.g…
PreferstringEnable synchronous mode by setting to `wait` or `wait=n` where n is 1-60 seconds. When set, the request will block and wait for the model to complete within the specified timeout before returning resu…
webhookstringHTTPS URL for receiving webhook notifications when the prediction updates or completes. Replicate will POST the prediction state to this URL and may retry on network failures, so the endpoint should b…
webhook_events_filterarrayArray of event types that trigger webhook requests: `start` (immediately), `output` (each generation), `logs` (log output), or `completed` (terminal state). Omit to receive all events. Output and logs…

get_prediction Get Prediction

Retrieve the current state and results of a prediction, including its status, output, logs, and performance metrics.

ParameterTypeDescription
prediction_id *stringThe unique identifier of the prediction to retrieve. This ID is returned when a prediction is created and can be used to poll for results or access the prediction details.

cancel_prediction Cancel Prediction

Cancel an in-progress prediction. This stops the model execution and prevents further processing of the prediction.

ParameterTypeDescription
prediction_id *stringThe unique identifier of the prediction to cancel. This must be a valid prediction ID that is currently in a running or queued state.

search_models_collections_and_docs Search Models, Collections, and Docs

Search across public models, collections, and documentation using a text query. Results include detailed metadata such as AI-generated descriptions, tags, and relevance scores to help identify the most suitable resources.

ParameterTypeDescription
query *stringThe text query to search for models, collections, and docs. Use keywords or phrases relevant to your search intent (e.g., 'nano banana').
limitintegerMaximum number of results to return in the response. Must be between 1 and 50; defaults to 20 if not specified.

list_trainings List Trainings

Retrieve a paginated list of all trainings created by your user account or organization. Results include trainings from both API and web sources, sorted by most recent first, with 100 records per page.

get_training Get Training

Retrieve the current state and results of a training job, including status, metrics, logs, and output artifacts.

ParameterTypeDescription
training_id *stringThe unique identifier of the training job to retrieve.

cancel_training Cancel Training

Cancel an active or scheduled training session. Once cancelled, the training will no longer be available and participants will be notified of the cancellation.

ParameterTypeDescription
training_id *stringThe unique identifier of the training session to cancel.

get_default_webhook_secret Get Default Webhook Secret

Retrieve the signing secret for the default webhook endpoint. Use this secret to verify that incoming webhook requests are authentically from Replicate.