# imgfactory > 79 deterministic image operations. Pay per call in USDC on Base over x402 (v1 default; v2 optional), or buy a credit pack. No API key, no account. > Base URL: https://imgfactory.dartmate.workers.dev > Adult/NSFW-safe: no moderation, files are not stored, batch up to 100 images. ## How to pay 1. `GET /v1/pricing` for the price list, or POST any endpoint and read the 402 body (`accepts[0]`: payTo, maxAmountRequired, asset, network `base`). 2. Single call: sign an EIP-3009 authorization and resend with `X-PAYMENT` (v1, base64 JSON) — or `PAYMENT-SIGNATURE` when you send `x402-version: 2`. 3. Cheaper for repeated work: `POST /v1/credits/purchase?pack=5|20|50` with the payment header, then call with only `X-WALLET`. 4. Settlement happens only when a result is served; a 422 is refunded automatically. ## Legal / refunds - Terms, refund policy and how 児童ポルノ applicability is handled: https://imgfactory.dartmate.workers.dev/legal - Charge lands only on HTTP 200. 4xx/5xx and partial output are never charged. - Images are processed in memory and not written to disk (batch jobs are deleted after completion). - NSFW-safe: no moderation. Applicability of Japanese child-pornography law is judged by the caller, not guaranteed by this service. ## Input Two ways, same price: - `multipart/form-data` with field `file` - `application/json` with `{"url":"https://…"}` (server fetches it; 20 s, ≤25 MB) or `{"base64":"…"}` / `{"data":"data:image/png;base64,…"}` URL mode means you can pass a CDN link without downloading it first. ## Operations (POST) - POST /v1/convert/to-png (0.005 USDC) - Use when PNG convert: change any image to PNG, png converter, lossless, keep alpha, when an uploader wants PNG. - POST /v1/convert/to-jpg (0.005 USDC) - Use when JPG convert: change any image to JPEG, jpg converter, photo to jpg, when a form only takes JPG. - POST /v1/convert/to-webp (0.005 USDC) - Use when WebP convert: png to webp, jpg to webp, webp converter, smaller web images, alpha kept. - POST /v1/convert/to-avif (0.005 USDC) - Use when AVIF convert: convert to avif, avif encoder, next-gen compression, smallest files. - POST /v1/resize/w256 (0.005 USDC) - Use when Resize image to 256px: shrink, downscale, small avatar, thumbnail size, long edge 256. - POST /v1/resize/w512 (0.005 USDC) - Use when Resize image to 512px: shrink image, downscale, thumbnails, dataset norm, long edge 512. - POST /v1/resize/w768 (0.005 USDC) - Use when Resize image to 768px: downscale image, shrink photo, CDN size, long edge 768. - POST /v1/resize/w1024 (0.005 USDC) - Use when Resize image to 1024px: scale down image, shrink, preview size, long edge 1024. - POST /v1/resize/w1536 (0.005 USDC) - Use when Resize image to 1536px: downscale image, shrink, web hero size, long edge 1536. - POST /v1/resize/w2048 (0.005 USDC) - Use when Resize image to 2048px: downscale image, shrink, print-lite size, long edge 2048. - POST /v1/fit/w512 (0.005 USDC) - Use when Fit image inside 512x512: image size fit, contain without crop, thumbnail generator, banner preview. - POST /v1/pad/w512 (0.005 USDC) - Use when Pad image to square 512x512: pad to square, letterbox image, aspect ratio fix, LoRA bucket prep. - POST /v1/fit/w1024 (0.005 USDC) - Use when Fit image inside 1024x1024: contain, image size fit, no crop, preview. - POST /v1/pad/w1024 (0.005 USDC) - Use when Pad image to square 1024x1024: pad to square, letterbox image, aspect ratio fix, dataset prep. - POST /v1/clean/strip-exif (0.004 USDC) - Use when Strip EXIF: remove exif, remove metadata, strip metadata, gps from photo, exif remover, ship a clean file. - POST /v1/clean/flatten-alpha (0.004 USDC) - Use when Flatten alpha to JPEG: transparent background to white, flatten png, alpha channel removal, opaque on color. - POST /v1/clean/icc-to-srgb (0.004 USDC) - Use when ICC profile fix: icc to srgb, srgb conversion, colors shift after processing, profile mismatch. - POST /v1/clean/trim-border (0.004 USDC) - Use when Trim border: remove border, trim whitespace, remove white border, solid-color frame removal before OCR. - POST /v1/clean/rotate-auto (0.004 USDC) - Use when Rotate photo: auto orient, fix sideways photo, orientation fix, exif orientation, rotate image upright. - POST /v1/clean/dpi-300 (0.004 USDC) - Use when Set 300 DPI metadata: dpi fix, print dpi, 300 dpi tag for printers and uploaders. - POST /v1/analyze/dimensions (0.004 USDC) - Use when Image dimensions: image size, width and height, aspect ratio, resolution check, image info. - POST /v1/analyze/sha256 (0.004 USDC) - Use when Image sha256 hash: file hash, checksum, content address, dedupe key. - POST /v1/analyze/phash (0.004 USDC) - Use when Perceptual hash: phash, image hash, image dedupe, duplicate photos, near-duplicate detection. - POST /v1/analyze/corrupt (0.004 USDC) - Use when Corrupt image check: is the file broken, truncated image, decode test, validate upload. - POST /v1/analyze/mono-ratio (0.004 USDC) - Use when Mono ratio: grayscale share, black and white amount, scan detection. - POST /v1/analyze/blur (0.004 USDC) - Use when Blur detection: blurry photo, image sharpness, focus score, motion blur, is it blurry. - POST /v1/analyze/palette (0.004 USDC) - Use when Color palette: dominant color, dominant colors, color extraction, palette generator, k-means colors. - POST /v1/analyze/exif (0.004 USDC) - Use when EXIF viewer: read exif, camera model, gps from photo, exif dump, metadata viewer, exif strip check. - POST /v1/watermark/text (0.01 USDC) - Use when Watermark text: add text watermark, copyright stamp, overlay text on image. - POST /v1/watermark/tiled (0.01 USDC) - Use when Tiled watermark: repeat watermark, diagonal tiled stamp, preview protection. - POST /v1/watermark/remove-white-border (0.01 USDC) - Use when Remove white border: trim scanner white, border removal, cleanup before OCR. - POST /v1/geometry/crop-center-256 (0.005 USDC) - Use when Crop image center 256x256: center crop, square crop, thumbnail crop. - POST /v1/geometry/crop-center-512 (0.005 USDC) - Use when Crop image center 512x512: center crop, square crop, avatar crop. - POST /v1/geometry/crop-center-1024 (0.005 USDC) - Use when Crop image center 1024x1024: center crop, square crop, preview crop. - POST /v1/geometry/flip-h (0.005 USDC) - Use when Flip image horizontally: mirror image, flip h, left-right mirror. - POST /v1/geometry/flip-v (0.005 USDC) - Use when Flip image vertically: mirror image, flip v, upside down. - POST /v1/geometry/sharpen (0.005 USDC) - Use when Sharpen image: unsharp mask, add detail, sharpen photo, crisp edges. - POST /v1/geometry/posterize (0.005 USDC) - Use when Posterize image: reduce colors, flat art look, 4-level posterize. - POST /v1/geometry/grayscale (0.005 USDC) - Use when Grayscale image: convert to black and white, desaturate, grayscale photo. - POST /v1/nsfw/mosaic-full (0.02 USDC) - Use when Mosaic censor full: pixelate image, mosaic whole image, censor pixelate, NSFW blur all. - POST /v1/nsfw/mosaic-box (0.02 USDC) - Use when Mosaic box censor: mosaic a region, bbox censor, pixelate area, NSFW mosaic box. - POST /v1/nsfw/cover-bar (0.02 USDC) - Use when Cover bar censor: black bar over a region, cover text, bar censor, NSFW cover. - POST /v1/jp/ogp-1200x630 (0.02 USDC) - Use when Japanese OGP image: 1200x630 ogp, x card image, jp social preview, cover crop. - POST /v1/jp/booth-header-1400x1000 (0.02 USDC) - Use when BOOTH header 1400x1000: jp store header, booth shop header, webp cover crop. - POST /v1/jp/square-1200 (0.02 USDC) - Use when Square 1200x1200 webp: jp square post, instagram square, cover crop. - POST /v1/jp/thumb-644x910 (0.02 USDC) - Use when Portrait thumbnail 644x910 jpeg: 同人 一覧 サムネ 縦長, jp listing thumb. - POST /v1/thumbs/contact-sheet (0.005 USDC) - Contact sheet: contact sheet generator, thumbnail grid, filmstrip overview of one image, 3x3 grid. - POST /v1/thumbs/thumbnail (0.005 USDC) - Thumbnail generator: generate thumbnail, make a thumb, small preview jpeg, 256px thumb. - POST /v1/filter/pixelate (0.005 USDC) - Pixelate image: pixelate, pixel art downscale, blocky censor, 8-bit look. - POST /v1/clean/fix-orientation (0.004 USDC) - Fix sideways photo: rotate photo upright, auto orient, orientation fix alias. - POST /v1/resize/resize-image (0.005 USDC) - Resize image: scale an image, downscale to 1024px long edge, image resizer. - POST /v1/clean/remove-metadata (0.004 USDC) - Remove metadata: strip all EXIF and metadata, metadata remover, clean photo. - POST /v1/analyze/image-dimensions (0.004 USDC) - Image dimensions: width height and aspect ratio of an image, image size reader. - POST /v1/analyze/duplicate-photos (0.004 USDC) - Duplicate photos: perceptual hash to find duplicate images, near-duplicate detector, image dedupe. - POST /v1/analyze/dominant-color (0.004 USDC) - Dominant color: extract dominant colors from an image, color palette k-means, hex colors. - POST /v1/convert/image-to-webp (0.005 USDC) - Image to WebP: convert image to webp, png to webp, jpg to webp, smaller web images. - POST /v1/pad/pad-to-square (0.005 USDC) - Pad to square: letterbox an image to a square canvas without cropping. - POST /v1/thumbs/thumbnail-generator (0.005 USDC) - Thumbnail generator: generate a thumbnail, make small preview jpeg. - POST /v1/thumbs/og-image (0.005 USDC) - OG image: open graph image 1200x630, social card image, twitter card preview png. - POST /v1/thumbs/youtube-thumbnail (0.005 USDC) - YouTube thumbnail: 1280x720 thumbnail for youtube, video thumbnail png. - POST /v1/thumbs/avatar (0.005 USDC) - Avatar maker: square avatar crop 400x400, profile picture, round-ready png. - POST /v1/thumbs/wordpress-thumbnail (0.005 USDC) - WordPress thumbnail: 300px post thumbnail png for wordpress media, featured image size. - POST /v1/convert/favicon (0.005 USDC) - Favicon maker: 64x64 png favicon from an image, site icon, apple touch icon base. - POST /v1/convert/screenshot-compress (0.005 USDC) - Compress screenshot: shrink a screenshot to webp, lossless-ish size cut, lighter uploads. - POST /v1/thumbs/product-photo (0.005 USDC) - Product photo thumbnail: square 800x800 catalog image crop for shops, listing photo. - POST /v1/clean/remove-background-white (0.004 USDC) - White background flatten: composite transparent image on white, flatten alpha to white for marketplaces. - POST /v1/convert/heic-to-jpg (0.005 USDC) - HEIC to JPG: convert iPhone HEIC/HEIF photo to jpeg for web upload, heic converter. - POST /v1/clean/crop-box (0.004 USDC) - Crop to box: crop an image to exact pixel box l,t,w,h, manual crop. - POST /v1/clean/rotate90 (0.004 USDC) - Rotate 90 degrees clockwise: rotate image 90, turn photo sideways. - POST /v1/clean/rotate180 (0.004 USDC) - Rotate 180 degrees: flip image upside down, rotate half turn. - POST /v1/clean/rotate270 (0.004 USDC) - Rotate 270 degrees: rotate image 90 counterclockwise, turn photo left. - POST /v1/analyze/qr-scan (0.004 USDC) - QR code scan: decode QR codes and barcodes from an image, read qr, barcode reader. - POST /v1/analyze/main-image (0.004 USDC) - Main image detect: extract og:image and twitter:image main photo URL from a page, page preview image. - POST /v1/convert/image-to-pdf (0.005 USDC) - Image to PDF: turn a jpg or png into a single-page PDF, image to pdf converter. - POST /v1/convert/pdf-to-png (0.005 USDC) - PDF to PNG: render page 1 of a PDF as a png image, pdf page preview, pdf thumbnail. - POST /v1/geometry/rounded-corners (0.005 USDC) - Rounded corners: round the corners of an image, radius r, app icon shape, transparent png. - POST /v1/geometry/add-border (0.005 USDC) - Add border: add a solid frame around an image, white border w px, photo frame. ## Transfer (gasless) - POST /v1/transfer/send?to={0x address}&amount={usdc} - move USDC on Base from the payer wallet to any address via EIP-3009. No ETH needed: the facilitator submits the transaction. 0.01..50 USDC per call. ## Batch - POST /v1/jobs/submit (0.10 USDC base + 0.005/file, 0.50 cap at 100 files, `op_id` + `params`) -> poll /v1/jobs/status -> GET /v1/jobs/download (zip)