使用的模型
API示例
关于此流水线的文章
图像编辑器 API
从你自己的代码调用此流水线。一次请求即可发起运行;模型是一个输入字段,而不是独立的接口。
4 个输入
2 必填
1.9 to 5.3 积分
bun add @pipe2-ai/sdk import { createClient } from "@pipe2-ai/sdk";
const client = createClient(process.env.PIPE2_TOKEN!);
const { run_pipeline } = await client.RunPipeline({
pipeline_slug: "image-editor",
input: {
image_url: "https://example.com/product.jpg",
instructions: "Remove the background and place the product on a soft grey studio backdrop",
model: "grok-imagine-image-quality",
},
});pip install pipe2 import asyncio
import os
from pipe2 import Pipe2Client
client = Pipe2Client(token=os.environ["PIPE2_TOKEN"])
run = asyncio.run(client.run_pipeline(
pipeline_slug="image-editor",
input={
"image_url": "https://example.com/product.jpg",
"instructions": "Remove the background and place the product on a soft grey studio backdrop",
"model": "grok-imagine-image-quality",
},
))go get github.com/pipe2-ai/sdk-go client := pipe2.NewClient(os.Getenv("PIPE2_TOKEN"))
input := json.RawMessage(`{
"image_url": "https://example.com/product.jpg",
"instructions": "Remove the background and place the product on a soft grey studio backdrop",
"model": "grok-imagine-image-quality"
}`)
run, err := pipe2.RunPipeline(context.Background(), client, "image-editor", input)
if err != nil {
log.Fatal(err)
}brew install pipe2-ai/tap/pipe2 pipe2 pipelines run \
--pipeline image-editor \
--input-json '{"image_url": "https://example.com/product.jpg", "instructions": "Remove the background and place the product on a soft grey studio backdrop", "model": "grok-imagine-image-quality"}' \
--wait参数
-
image_url必填 -
Public URL of the image to edit.
string -
instructions必填 -
What to change, in plain language — the edit is applied to the whole image.
string -
aspect_ratio -
Output aspect ratio. Leave unset to keep the source image's ratio.
1:116:99:164:33:4默认1:1
显示全部 4 个输入
-
model -
Image engine to use. Leave unset and Pipe2 picks one that supports your edit.
grok-imagine-image-qualitygrok-imagine-imagegemini-3-1-flash-imagegemini-3-pro-image默认grok-imagine-image-quality
在 AI 智能体中使用
将任意 MCP 客户端指向 pipe2,你的智能体就能获得这些工具。它会找到这条流水线,读取上方相同的 schema,然后运行它。
- list_pipelines
- get_pipeline_schema
- run_pipeline
- get_pipeline_run_status
- request_upload
https://mcp.pipe2.ai/mcp {
"mcpServers": {
"pipe2ai": {
"url": "https://mcp.pipe2.ai/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}图像编辑器: AI 驱动的图像编辑
描述你想改变的内容,AI 即可编辑你的图像。移除对象、更换背景、改变风格、添加元素,或彻底改变观感,全部只需一条文本提示。
你可以做什么
- 移除对象: 无缝擦除不需要的元素
- 更换背景: 用所描述的场景替换任意背景
- 风格迁移: 转换为绘画、素描、电影感或任意风格
- 添加元素: 向场景中插入对象、人物或特效
- 调色: 用文字调整氛围、色调和光线
选择模型
- Grok Imagine:以最低成本进行快速的自然语言编辑
- Grok Imagine Quality:更高的保真度和细节保留
- Gemini 3.1 Flash Image:强大的指令遵循能力,支持多参考细节
- Gemini 3 Pro Image:面向精准文字和复杂排版的高级层级
常见问题
我可以做哪些类型的编辑?
几乎任何编辑:移除对象、更换背景、改变风格、添加元素、调整光线和色彩,或彻底重新构想整幅图像。
编辑会保留原始构图吗?
会,AI 以你的图像为基础,只修改你所描述的部分,除非你要求改动,否则会保留结构和构图。
支持哪些宽高比?
1:1(方形)、16:9(横向)、9:16(纵向)、4:3(经典)、3:4(竖高)。
需要多少积分?
每次编辑 1.9 to 5.3 积分,取决于你选择的质量级别。
我可以将它与其他流水线串联吗?
可以,输出图像可送入 image-motion 生成视频、送入 text-card 制作叠加文字,或作为 video-generator 的起始帧。
探索更多流水线
查看全部 → from 9.5
视频生成器 →
根据文本提示、图像或参考片段生成 AI 视频。电影感镜头、产品揭晓、生活方式广告,配以同步音频和自然运动。
Veo 3.1 Seedance 2.0
0.2-6.4
图像生成器 →
根据文本或参考照片生成 AI 图像。产品图、角色美术、带可读文字的海报、照片级人像,数秒即得高分辨率成品。
Nano Banana 2 Nano Banana Pro GPT Image 2
0.7-1.3
音频生成器 →
将文本转换为自然语音,提供数十种音色、70+ 种语言,并可自定义语气、口音和节奏的风格指令。
Gemini 2.5 TTS
2.5-45.1
音乐生成器 →
生成原创背景音乐,匹配你描述的任意情绪、风格和时长。免版税,数秒即得。
Eleven Music v1 Lyria 3 Pro