---
title: "ImageOps Image Processing API"
method: POST
path: "/v1/image-transform"
tags: ["documents"]
---

# ImageOps Image Processing API

`POST /v1/image-transform`

## Request

- Base URL: `https://agent.pocket.network`
- URL: `https://agent.pocket.network/v1/image-transform`
- Auth: none required

Inspect, analyze or transform a public HTTPS image: metadata, resize, crop, rotate, convert, compress, color and filter adjustments, masks, composition, text annotation and tile packages. POST /v1/image with image_url, operation and params. Transforms answer a temporary HTTPS URL to the result, kept one hour, never image bytes. Pay per request in USDC; no account, no API key.

## Request body

- object: The body of POST /v1/image. Each operation has its own params schema, with ranges and examples, in https://image.pokt.online/openapi.json. Inputs must be public HTTPS URLs; limits are 50 MB download, 50 MP decoded and 25 MB output, and multi-input operations take up to eight images, 20 MP combined.
  - `image_url` string, required: The public HTTPS image to read.
  - `operation` 'adaptive_threshold' | 'add_background' | 'animation_info' | 'apply_mask' | 'auto_orient' | 'blur' | 'brightness' | 'colorspace' | 'compare' | 'composite' | 'compress' | 'contact_sheet' | 'contrast' | 'convert' | 'convolve' | 'crop' | 'deepzoom' | 'detect_format' | 'difference' | 'dilate' | 'dominant_color' | 'draw_circle' | 'draw_line' | 'draw_rect' | 'draw_text' | 'edge_detect' | 'emboss' | 'entropy' | 'erode' | 'extract_alpha' | 'extract_channel' | 'extract_frame' | 'extract_page' | 'flatten' | 'flip' | 'gamma' | 'grayscale' | 'grid' | 'hist_equalize' | 'histogram' | 'hue' | 'inspect' | 'invert' | 'join' | 'laplacian' | 'local_equalize' | 'median' | 'merge_channels' | 'metadata' | 'morphology' | 'normalize' | 'optimize' | 'overlay' | 'pad' | 'page_info' | 'pdf_to_image' | 'pixel_sample' | 'pyramid' | 'rank_filter' | 'resize' | 'rotate' | 'saturation' | 'sharpen' | 'smartcrop' | 'stats' | 'strip_metadata' | 'threshold' | 'thumbnail' | 'tile' | 'tint' | 'trim' | 'watermark': What to do with the image (default inspect).
  - `params` object: The operation's parameters, e.g. {width, height, fit, format} for resize. Operations that need none take {}.

## Response `200`

The upstream response, served after payment settles.

- object: For POST /v1/image, a JSON object with ok, operation and input (width, height, format, source_bytes). Analyses add their data; transforms add output with width, height, format, bytes, url and expires_in_seconds. A refused request answers ok false with a failure code, e.g. UNSAFE_URL.

## Other responses

- `400`: Malformed request.
- `402`: Payment required. The x402 v2 terms are in the PAYMENT-REQUIRED header and, identically, in this body; sign the chosen option and retry with the PAYMENT-SIGNATURE header. The receipt arrives in PAYMENT-RESPONSE.
- `503`: This service is not currently available to serve.

---

[API](https://skmtc.dev/pocket/apis/pocket-agentic-portal.md) · [All operations](https://skmtc.dev/pocket/apis/pocket-agentic-portal/llms.txt) · [OpenAPI document](https://skmtc.dev/pocket/apis/pocket-agentic-portal/revisions/96d2176db014?raw)
