← All tools
Multi-op image pipeline
Imagecompositeimage.pipeline
in: imageout: image
Chain multiple image operations in one step.
Pricing
- Price
- 0.125 cr / request
Prices in credits (1 credit = $0.01).
Multi-op Image Pipeline
Chain up to 10 image operations in a single request, executing them sequentially on the same image.
When to use
- Reduce round-trips — combine resize + flatten + convert_format in one API call instead of three.
- Atomic image transforms — all operations run as a single Sharp pipeline; the image is never written to intermediate storage.
- Complex workflows — build reusable transform recipes (e.g. "thumbnail preset") that apply several ops at once.
Inputs & outputs
| Input modality | Image file (URL) |
| Output modality | Image file (GCS URL) |
| Max operations | 10 |
| Max input size | 50 MB |
| Supported formats | JPEG, PNG, WebP, TIFF, AVIF |
Parameters
| Param | Required | Description |
|---|---|---|
operations | yes | Array of 1–10 operation objects. Each object has a single key matching a Sharp op name: resize, extract, rotate, png, jpeg, webp, composite, extend, flatten, or ensureAlpha. |
Examples
Resize then convert to JPEG quality 80
{
"type": "image.pipeline",
"input": { "image_url": "gs://infery-prod-media/uploads/raw.png" },
"params": {
"operations": [
{ "resize": { "width": 800, "height": 600, "fit": "cover" } },
{ "jpeg": { "quality": 80 } }
]
}
}
Rotate, add padding, flatten, save as PNG
{
"type": "image.pipeline",
"input": { "image_url": "gs://infery-prod-media/photos/sideways.jpg" },
"params": {
"operations": [
{ "rotate": { "angle": 90 } },
{ "extend": { "top": 20, "right": 20, "bottom": 20, "left": 20, "background": "#ffffff" } },
{ "flatten": { "background": "#ffffff" } },
{ "png": {} }
]
}
}
Pricing
Billed per megapixel of output image, once per pipeline execution (not per operation). See pricing dashboard for current rates.
Related capabilities
image.resize— standalone resize opimage.convert_format— standalone format conversionimage.composite— standalone compositing
Examples
Resize → JPEG quality 80
{
"operations": [
{
"resize": {
"width": 800
}
},
{
"jpeg": {
"quality": 80
}
}
]
}