跳到正文
Skillpedia
智能体77k · #2375

Replicate Automation

它能做什么

这个工具让你可以使用 Replicate 上的 AI 模型来生成图片、文本、音频和视频。你可以运行这些模型、了解它们的工作方式、向它们发送文件,并查看已经生成的内容记录。

适用场景

  • ✓根据文字描述生成图片。
  • ✓用语言模型生成文本。
  • ✓在使用某个 AI 模型之前,先查看它的详细信息。

技能链接

https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/replicate-automation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/replicate-automation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“使用模型 'stability-ai/stable-diffusion-xl-base-1.0',以提示词“一只可爱的猫咪趴在沙发上睡觉”生成一张猫的图片。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要先连接你的 Replicate 账户,然后就可以让 AI 运行指定的模型、上传模型所需的文件,或查看模型的相关信息。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Replicate Automation

Automate your Replicate AI model workflows -- run predictions on any public model (image generation, LLMs, audio, video), upload input files, inspect model schemas and documentation, list model versions, and track prediction history.

Toolkit docs: composio.dev/toolkits/replicate


Setup

  1. Add the Composio MCP server to your client: https://rube.app/mcp
  2. Connect your Replicate account when prompted (API token authentication)
  3. Start using the workflows below

Core Workflows

1. Get Model Details and Schema

Use REPLICATE_MODELS_GET to inspect a model's input/output schema before running predictions.

Tool: REPLICATE_MODELS_GET
Inputs:
  - model_owner: string (required) -- e.g., "meta", "black-forest-labs", "stability-ai"
  - model_name: string (required) -- e.g., "meta-llama-3-8b-instruct", "flux-1.1-pro"

Important: Each model has unique input keys and types. Always check the openapi_schema from this response before constructing prediction inputs.

2. Run a Prediction

Use REPLICATE_MODELS_PREDICTIONS_CREATE to run inference on any model with optional synchronous waiting and webhooks.

Tool: REPLICATE_MODELS_PREDICTIONS_CREATE
Inputs:
  - model_owner: string (required) -- e.g., "meta", "black-forest-labs"
  - model_name: string (required) -- e.g., "flux-1.1-pro", "sdxl"
  - input: object (required) -- model-specific inputs, e.g., { "prompt": "A sunset over mountains" }
  - wait_for: integer (1-60 seconds, optional) -- synchronous wait for completion
  - cancel_after: string (optional) -- max execution time, e.g., "300s", "5m"
  - webhook: string (optional) -- HTTPS URL for async completion notifications
  - webhook_events_filter: array (optional) -- ["start", "output", "logs", "completed"]

Sync vs Async: Use wait_for (1-60s) for fast models. For long-running jobs, omit it and use webhooks or poll via REPLICATE_PREDICTIONS_LIST.

3. Upload Files for Model Input

Use REPLICATE_CREATE_FILE to upload images, documents, or other binary inputs that models need.

Tool: REPLICATE_CREATE_FILE
Inputs:
  - content: string (required) -- base64-encoded file content
  - filename: string (required) -- e.g., "input.png", "audio.wav" (max 255 bytes UTF-8)
  - content_type: string (default "application/octet-stream") -- MIME type
  - metadata: object (optional) -- custom JSON metadata

4. Read Model Documentation

Use REPLICATE_MODELS_README_GET to access a model's README in Markdown format for detailed usage instructions.

Tool: REPLICATE_MODELS_README_GET
Inputs:
  - model_owner: string (required)
  - model_name: string (required)

5. List Model Versions

Use REPLICATE_MODELS_VERSIONS_LIST to see all available versions of a model, sorted newest first.

Tool: REPLICATE_MODELS_VERSIONS_LIST
Inputs:
  - model_owner: string (required)
  - model_name: string (required)

6. Track Prediction History and Files

Use REPLICATE_PREDICTIONS_LIST to retrieve prediction history, and REPLICATE_FILES_GET/REPLICATE_FILES_LIST to manage uploaded files.

Tool: REPLICATE_PREDICTIONS_LIST
  - Lists all predictions for the authenticated user with pagination

Tool: REPLICATE_FILES_LIST
  - Lists uploaded files, most recent first

Tool: REPLICATE_FILES_GET
  - Get details of a specific file by ID

Known Pitfalls

Pitfall Detail
Model-specific input keys Each model has unique input keys and types. Using the wrong key causes validation errors. Always call REPLICATE_MODELS_GET first to check the openapi_schema.
File upload encoding REPLICATE_CREATE_FILE requires base64-encoded content. Binary files treated as text (UTF-8) will fail with decode errors.
Public vs deployment paths Public models must be run via REPLICATE_MODELS_PREDICTIONS_CREATE. Using deployment-oriented paths causes HTTP 404 failures.
Sync wait limits wait_for supports 1-60 seconds only. Long-running jobs need async handling via webhooks or polling REPLICATE_PREDICTIONS_LIST.
Image model constraints Image models like flux-1.1-pro have specific constraints (e.g., max width/height 1440px, valid aspect ratios). Check the model schema first.
Stale file references Heavy usage creates many uploads. Routinely check REPLICATE_FILES_LIST to avoid using stale file_id references.

Quick Reference

…

常见问题

怎样连接我的 Replicate 账户?

你需要先添加一个特殊的服务器(Composio MCP),然后在提示时输入你的 API 令牌,连接 Replicate 账户。

什么是“Schema”?

Schema 就像 AI 模型的“规则说明”。它告诉你模型运行需要哪些信息(比如生成图片需要的文字描述),以及它会返回什么结果。

可以运行耗时较长的模型吗?

可以。你可以使用 Webhook 在结果生成后收到通知,也可以查看任务历史记录了解进度。

详情

作者的原始描述

Automate Replicate AI model operations -- run predictions, upload files, inspect model schemas, list versions, and manage prediction history via the Composio MCP integration.

repo: ComposioHQ/awesome-claude-skills

热度

GitHub 星标
77k
排名
#2375
许可证
—
更新时间
2026/9/18

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能