POST /v1/batch

Image Batch API

Run multiple independent image jobs in one parent request and return grouped outputs.

Key Operations

independent child jobs

grouped async dispatch

aggregate output packaging

Use cases

  • convert one file, filter another, OCR another

  • bulk multi-tool orchestration

  • group download workflows

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/batch"
payload = {
  "jobs": [
    {
      "operation": "convert",
      "request": {
        "input_format": "png",
        "output_format": "jpg",
        "tool_slug": "png-to-jpg"
      }
    },
    {
      "operation": "filter",
      "request": {
        "filters": [
          {
            "intensity": 70,
            "type": "warm_film"
          }
        ],
        "tool_slug": "warm-film-filter"
      }
    },
    {
      "operation": "ocr",
      "request": {
        "operation": "extract_text",
        "options": {
          "language": "eng"
        },
        "tool_slug": "image-to-text"
      }
    }
  ],
  "tool_slug": "batch-mixed-ops"
}
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": "batch",
    "poll_url": "/v1/jobs/job_123",
    "progress": 0,
    "status": "queued",
    "tool_slug": "png-to-jpg"
  }
}

Frequently Asked Questions

How is batch different from pipeline?

Batch runs independent child operations, while pipeline chains operations together.

Can I mix endpoint types in batch?

Yes. Convert, filter, OCR, and other supported operations can coexist in a single batch.

Can batch outputs be zipped?

Use output archive options where supported to package grouped outputs.


Related APIs

convert APIfilter APIocr APIpipeline APIdocument API

ImageHQ

Smart image tools for conversion, compression, and automation.

Tools

Compress ImageResize ImagePNG to JPGFiltersEnhance

© 2026 ImageHQ. All rights reserved.