Free plan

Image Pipeline

Run several picture steps in a row on one picture
POST
/v1/images/pipeline

About this tool

Runs a chain of picture steps one after another, for example resize, then add a watermark, then change the file type. Each step works on the result of the one before. You write the steps as a list, so it suits people who are comfortable with details. It takes one picture, and an optional logo for a watermark step.
For example, you prepare a product photo for a shop in one go, instead of doing each step by hand.

How to use it

  1. Choose this tool.
  2. Add your picture with Upload or drag and drop.
  3. Add a logo too if one of your steps puts a watermark on the picture.
  4. Write your steps in order in the steps box.
  5. Press Generate and download the result.

What you get back

You get one finished picture after all your steps, ready to download.
GOOD TO KNOW
Per-operation parameter ranges are identical to the same-named fields of /v1/images/transform (enhance.*), /optimize and /watermark. The Studio step schema is verified against this contract by the contract test suite.
TEST IT LIVE

Try Image Pipeline in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/pipeline
Tool ID
images.pipeline
Authentication
API key
Accepts
JPEG, PNG, WEBP, GIF, AVIF, TIFF +15 more
Background jobs
Yes
Usage group
Image
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/images/pipeline" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'images=@photo.jpg' \
  -F 'operations=[{"op":"autoOrient"}]' \
  -F 'output_bundle=zip' \
  -F 'response=url'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.pipeline({
    "images": 'photo.jpg',
    "operations": [
      {
        "op": "autoOrient"
      }
    ],
    "output_bundle": "zip",
    "response": "url"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->pipeline([
    'images' => 'photo.jpg',
    'operations' => [[
            'op' => 'autoOrient',
        ]],
    'output_bundle' => 'zip',
    'response' => 'url',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Run several picture steps in a row on one picture. It can do several jobs from one endpoint: operations[].op, operations-list, items.

Image Pipeline accepts JPEG, PNG, WEBP, GIF, AVIF, TIFF, SVG, SVGZ, BMP, ICO, APNG, PNM and 9 more. You can send several files in one request.

Image Pipeline is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/images/pipeline with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.