POST /v1/pipeline

Image Pipeline API

Chain conversion, transforms, filters, optimization, OCR, metadata, document, and enhancement steps in one async workflow.

Key Operations

chained step execution

cross-operation orchestration

single-job multi-stage output

Use cases

  • resize -> cinematic filter -> compress webp

  • metadata cleanup before OCR

  • document render then transform

Async Job Lifecycle

All ImageHQ processing endpoints are asynchronous. Upon a successful POST, you receive a 202 Acceptedresponse with a job_id. Poll the status endpoint until the state reaches succeeded.

Request Example

import requests

url = "https://api.imagehq.io/v1/pipeline"
payload = {
  "steps": [
    {
      "operation": "transform",
      "request": {
        "operations": [
          {
            "type": "resize",
            "width": 1600
          }
        ]
      }
    },
    {
      "operation": "filter",
      "request": {
        "filters": [
          {
            "intensity": 72,
            "type": "cinematic"
          }
        ]
      }
    },
    {
      "operation": "optimize",
      "request": {
        "input_format": "png",
        "operation": "convert_to_webp"
      }
    }
  ],
  "tool_slug": "pipeline-resize-filter-compress"
}
files = [("files[]", open("image.png", "rb"))]
data = {"request": json.dumps(payload)}

response = requests.post(url, files=files, data=data)
print(response.json())

Successful Response

{
  "completed": {
    "download_url": "/v1/jobs/job_123/download",
    "expires_at": "2026-05-03T00:00:00Z",
    "id": "job_123",
    "inputs": [
      {
        "filename": "input.png",
        "format": "png",
        "mime_type": "image/png",
        "size_bytes": 420122
      }
    ],
    "outputs": [
      {
        "filename": "output.jpg",
        "format": "jpg",
        "id": "0",
        "mime_type": "image/jpeg",
        "size_bytes": 161002
      }
    ],
    "progress": 100,
    "retention_policy": {
      "clamp": true,
      "ttl_hours": 24
    },
    "stages": [
      {
        "name": "queued",
        "progress": 100,
        "status": "succeeded"
      },
      {
        "name": "processing",
        "progress": 100,
        "status": "succeeded"
      }
    ],
    "status": "succeeded",
    "warnings": []
  },
  "queued": {
    "client_reference_id": "example-123",
    "created_at": "2026-05-02T00:00:00Z",
    "current_stage": "queued",
    "expires_at": "2026-05-03T00:00:00Z",
    "id": "job_123",
    "operation": "pipeline",
    "poll_url": "/v1/jobs/job_123",
    "progress": 0,
    "status": "queued",
    "tool_slug": "png-to-jpg"
  }
}

Frequently Asked Questions

How is pipeline different from batch?

Pipeline applies ordered steps on the same job context; batch groups independent jobs.

Can pipeline include OCR and metadata?

Yes. Pipeline supports mixed operation types with nested request payloads.

Do pipeline jobs emit stage progress?

Yes. Job responses expose stage-oriented progress states.


Related APIs

convert APIfilter APIenhance APIbatch APIdocument APIocr API

ImageHQ

Smart image tools for conversion, compression, and automation.

Tools

Compress ImageResize ImagePNG to JPGFiltersEnhance

© 2026 ImageHQ. All rights reserved.