Community图像github.com

ComposioHQ/Replicate-Automation

通过Composio MCP集成自动化Replicate AI模型操作——运行推理、上传文件、检查模型架构、列出版本以及管理预测历史。

Replicate-Automation 是什么?

此技能通过Composio MCP集成,提供对Replicate AI平台的自动化访问,使开发者能够无缝执行模型推理、文件管理和数据检索等核心工作流。它支持同步和异步预测执行,允许通过`wait_for`参数等待快速模型完成,或通过webhook和`REPLICATE_PREDICTIONS_LIST`工具处理长时间运行的任务。用户还可以检查任何公共模型的输入/输出模式(使用`REPLICATE_MODELS_GET`),上传base64编码的文件作为模型输入(`REPLICATE_CREATE_FILE`),检索模型文档和版本列表,并跟踪预测历史。该技能与Claude Code、Cursor、Codex等主流AI代理平台兼容,通过一个MCP服务器端点进行集成。其核心价值在于消除手动API交互,将Replicate集成到AI驱动的开发工作流中,同时通过明确的陷阱指南(如模型特有的输入键和文件编码要求)帮助用户避免常见错误。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/replicate-automation

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Replicate自动化

自动化您的Replicate AI模型工作流——在任何公共模型(图像生成、大语言模型、音频、视频)上运行推理,上传输入文件,检查模型架构和文档,列出模型版本,并跟踪预测历史。

工具包文档: composio.dev/toolkits/replicate


设置

  1. 将Composio MCP服务器添加到您的客户端:https://rube.app/mcp
  2. 按提示连接您的Replicate账户(API令牌认证)
  3. 开始使用以下工作流

核心工作流

1. 获取模型详情与架构

使用REPLICATE_MODELS_GET在运行推理前检查模型的输入/输出架构。

工具:REPLICATE_MODELS_GET
输入:
  - model_owner: 字符串(必需)——例如 "meta"、"black-forest-labs"、"stability-ai"
  - model_name: 字符串(必需)——例如 "meta-llama-3-8b-instruct"、"flux-1.1-pro"

重要: 每个模型都有独特的输入键和类型。在构建预测输入之前,始终从该响应中检查 openapi_schema。

2. 运行推理

使用REPLICATE_MODELS_PREDICTIONS_CREATE在任何模型上运行推理,可选择同步等待和webhook。

工具:REPLICATE_MODELS_PREDICTIONS_CREATE
输入:
  - model_owner: 字符串(必需)——例如 "meta"、"black-forest-labs"
  - model_name: 字符串(必需)——例如 "flux-1.1-pro"、"sdxl"
  - input: 对象(必需)——模型特定的输入,例如 { "prompt": "A sunset over mountains" }
  - wait_for: 整数(1-60秒,可选)——同步等待完成
  - cancel_after: 字符串(可选)——最大执行时间,例如 "300s"、"5m"
  - webhook: 字符串(可选)——用于异步完成通知的HTTPS URL
  - webhook_events_filter: 数组(可选)——["start", "output", "logs", "completed"]

同步与异步: 对于快速模型使用 wait_for(1-60秒)。对于长时间运行的任务,省略它并使用webhooks或通过 REPLICATE_PREDICTIONS_LIST 轮询。

3. 上传模型输入文件

使用REPLICATE_CREATE_FILE上传模型所需的图像、文档或其他二进制输入。

工具:REPLICATE_CREATE_FILE
输入:
  - content: 字符串(必需)——base64编码的文件内容
  - filename: 字符串(必需)——例如 "input.png"、"audio.wav"(最大255字节UTF-8)
  - content_type: 字符串(默认 "application/octet-stream")——MIME类型
  - metadata: 对象(可选)——自定义JSON元数据

4. 读取模型文档

使用REPLICATE_MODELS_README_GET以Markdown格式访问模型的README,获取详细的使用说明。

工具:REPLICATE_MODELS_README_GET
输入:
  - model_owner: 字符串(必需)
  - model_name: 字符串(必需)

5. 列出模型版本

使用REPLICATE_MODELS_VERSIONS_LIST查看模型的所有可用版本,按最新优先排序。

工具:REPLICATE_MODELS_VERSIONS_LIST
输入:
  - model_owner: 字符串(必需)
  - model_name: 字符串(必需)

6. 跟踪预测历史与文件

使用REPLICATE_PREDICTIONS_LIST检索预测历史,使用REPLICATE_FILES_GET/REPLICATE_FILES_LIST管理上传的文件。

工具:REPLICATE_PREDICTIONS_LIST
  - 列出已认证用户的所有预测,支持分页

工具:REPLICATE_FILES_LIST
  - 列出上传的文件,最近优先

工具:REPLICATE_FILES_GET
  - 通过ID获取特定文件的详细信息

已知陷阱

陷阱详情
模型特定的输入键每个模型都有独特的输入键和类型。使用错误的键会导致验证错误。始终先调用 REPLICATE_MODELS_GET 检查 openapi_schema。
文件上传编码REPLICATE_CREATE_FILE 需要base64编码的内容。二进制文件如果按文本(UTF-8)处理将会因解码错误而失败。
公共路径与部署路径公共模型必须通过 REPLICATE_MODELS_PREDICTIONS_CREATE 运行。使用面向部署的路径会导致HTTP 404错误。
同步等待限制wait_for 仅支持1-60秒。长时间运行的任务需要通过webhooks或轮询 REPLICATE_PREDICTIONS_LIST 进行异步处理。
图像模型约束像flux-1.1-pro这样的图像模型有特定约束(例如最大宽度/高度1440px,有效宽高比)。请先检查模型架构。
过时的文件引用大量使用会创建许多上传。定期检查 REPLICATE_FILES_LIST 以避免使用过时的 file_id 引用。

快速参考

工具名称描述
REPLICATE_MODELS_GET获取模型详情、架构和元数据
REPLICATE_MODELS_PREDICTIONS_CREATE在模型上运行推理
REPLICATE_CREATE_FILE上传模型输入文件
REPLICATE_MODELS_README_GET获取模型README文档
REPLICATE_MODELS_VERSIONS_LIST列出模型的所有版本
REPLICATE_PREDICTIONS_LIST列出预测历史(支持分页)
REPLICATE_FILES_LIST列出上传的文件
REPLICATE_FILES_GET通过ID获取文件详情

由 Composio 提供支持

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相关技能