SuperAPI AI 工具集

replicate-cli

智能体与模型

查看项目

更新于 10-16 06:52

技能介绍

用途:Replicate CLI 用于在终端与 Replicate AI 模型平台交互,运行预测、管理模型、创建部署和微调模型。

认证:设置 export REPLICATE_API_TOKEN=<token>,或执行 replicate auth login 交互登录,用 replicate account current 验证。

主要能力: 运行预测:replicate run <owner/model> input_key=value,支持 --stream 流式输出、--no-wait 不等待、--web 浏览器查看、--json、--save、--output-directory。文件上传用 @ 前缀,如 image=@photo.jpg;可用 {{.output}} 串联预测。 模型操作:replicate model schema/list/show/create,创建时可指定 --hardware、--private/--public、--description 等。 微调:replicate train <base-model> --destination <owner/new-model> input_key=value,另有 training list/show。 部署:replicate deployments create/update/list/show/schema,可设 --model、--hardware、--min-instances、--max-instances。 硬件:replicate hardware list。 脚手架:replicate scaffold <prediction-id-or-url> --template=<node|python>。

别名:run=prediction create,stream=prediction create --stream,train=training create;子命令短别名 m/p/t/d/hw/a。

适用场景:图像生成与放大流水线、文本生成、批量处理、长任务监控、自动化脚本。

限制与建议:运行前先用 model schema 查看必填输入;文本模型加 --stream;自动化用 --json;调试用 --web。认证失败检查 token,模型名格式为 owner/model-name,文件需 @ 前缀。

更多资源:https://replicate.com/docs、https://github.com/replicate/cli。