{"info":{"contact":{"email":"hello@pixo.tools","name":"Pixo","url":"https://www.pixo.tools/en/agent-api"},"description":"Pay-per-call image and PDF processing for AI agents over HTTP and native MCP. Payment: x402 (USDC on Base + Solana). See /v1/discovery for per-endpoint prices and payment details.","termsOfService":"https://www.pixo.tools/en/terms-of-use","title":"Pixo Agent API","version":"0.1.0","x-guidance":"Pixo Agent API is a pay-per-call file API for AI agents: compress, convert, resize, crop, rotate, flip, and OCR images; compress, merge, split, recompose, protect, unlock, render, and extract text/Markdown/tables/JSON from PDFs. There is no account and no API key — payment is the only identity. To invoke any paid HTTP endpoint: (1) POST the file as multipart/form-data with a `file` field (PDF merge uses repeated `file` fields) and no payment header; (2) the server replies 402 and its `Payment-Required` header carries the exact price in USDC atomic units on each supported chain; (3) sign a USDC payment and retry the identical request with a `Payment-Signature` header — a standard x402 v2 client library (x402-fetch or the x402 SDKs) does this automatically; (4) the server verifies, processes in memory, settles on-chain, and returns the result. Base payments settle through Coinbase CDP and Solana payments through PayAI. Work that fails or times out is never charged. Pricing: image endpoints are flat per call; PDF endpoints are priced per page and the exact amount is computed from the uploaded document, so the quote is calculated from the submitted bytes and recomputed on the paid retry. Privacy: files are processed in memory and deleted the moment the response is sent, never stored or logged; the four document-AI endpoints (image/ocr, pdf/ocr, pdf/tables, pdf/structured) are the disclosed exception and forward content to Google Gemini. Native MCP is available at /mcp over stateless Streamable HTTP: files use base64 JSON arguments, unpaid tool calls return PaymentRequired in structuredContent, and signed x402 PaymentPayload values are supplied under params._meta['x402/payment']. Free, unauthenticated discovery endpoints: GET /v1/health, GET /openapi.json and GET /v1/openapi.json, GET /v1/discovery."},"openapi":"3.0.3","paths":{"/v1/image/compress":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"colors":{"description":"PNG only, default 256","maximum":256,"minimum":2,"type":"integer"},"file":{"description":"JPEG, PNG, or WebP","format":"binary","type":"string"},"format":{"description":"Target format; defaults to the input format","enum":["jpeg","png","webp"],"type":"string"},"quality":{"description":"JPEG/WebP only, default 90","maximum":100,"minimum":1,"type":"integer"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The compressed image"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Compress or convert an image","x-payment-info":{"price":{"amount":"0.005","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/image/crop":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"colors":{"description":"PNG only, default 256","maximum":256,"minimum":2,"type":"integer"},"file":{"format":"binary","type":"string"},"format":{"enum":["jpeg","png","webp"],"type":"string"},"height":{"type":"integer"},"quality":{"description":"JPEG/WebP only, default 90","maximum":100,"minimum":1,"type":"integer"},"width":{"type":"integer"},"x":{"default":0,"type":"integer"},"y":{"default":0,"type":"integer"}},"required":["file","width","height"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The cropped image"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Crop an image to an exact rectangle","x-payment-info":{"price":{"amount":"0.005","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/image/flip":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"colors":{"description":"PNG only, default 256","maximum":256,"minimum":2,"type":"integer"},"direction":{"enum":["horizontal","vertical"],"type":"string"},"file":{"format":"binary","type":"string"},"format":{"enum":["jpeg","png","webp"],"type":"string"},"quality":{"description":"JPEG/WebP only, default 90","maximum":100,"minimum":1,"type":"integer"}},"required":["file","direction"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The flipped image"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Mirror an image horizontally or vertically","x-payment-info":{"price":{"amount":"0.005","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/image/ocr":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"JPEG, PNG, or WebP (GIF is not accepted for OCR)","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON: { text: <recognized text> }"},"402":{"description":"Payment required (x402)"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"503":{"description":"Not enabled on this deployment (no Gemini API key)"}},"summary":"Extract text from an image via Google Gemini (content leaves the server)","x-payment-info":{"price":{"amount":"0.02","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/image/resize":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"colors":{"description":"PNG only, default 256","maximum":256,"minimum":2,"type":"integer"},"file":{"format":"binary","type":"string"},"fit":{"default":"contain","enum":["contain","cover","fill"],"type":"string"},"format":{"description":"Target format; defaults to the input format","enum":["jpeg","png","webp"],"type":"string"},"height":{"type":"integer"},"quality":{"description":"JPEG/WebP only, default 90","maximum":100,"minimum":1,"type":"integer"},"width":{"type":"integer"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The resized image"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Resize an image; optionally convert format/quality in the same call","x-payment-info":{"price":{"amount":"0.005","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/image/rotate":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"angle":{"enum":[90,180,270],"type":"integer"},"colors":{"description":"PNG only, default 256","maximum":256,"minimum":2,"type":"integer"},"file":{"format":"binary","type":"string"},"format":{"enum":["jpeg","png","webp"],"type":"string"},"quality":{"description":"JPEG/WebP only, default 90","maximum":100,"minimum":1,"type":"integer"}},"required":["file","angle"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The rotated image"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Rotate an image clockwise by 90, 180, or 270 degrees","x-payment-info":{"price":{"amount":"0.005","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/pdf/compress":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"level":{"default":"balanced","enum":["lossless","balanced","max"],"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The compressed PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Compress a PDF","x-payment-info":{"price":{"currency":"USD","min":"0.005","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/extract":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON: { text, pageCount, likelyScanned } — likelyScanned=true means there is no text layer; use /v1/pdf/ocr instead"},"402":{"description":"Payment required (x402)"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"503":{"description":"Not enabled on this deployment (no Gemini API key)"}},"summary":"Extract plain text from a PDF (private, in-process)","x-payment-info":{"price":{"currency":"USD","min":"0.01","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/from-markdown":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"UTF-8 Markdown, max 1 MB","format":"binary","type":"string"},"title":{"description":"Optional PDF document title (metadata)","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The typeset PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Convert Markdown to a typeset PDF (in-process, embedded fonts); flat-priced","x-payment-info":{"price":{"amount":"0.01","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}},"/v1/pdf/images":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"A ZIP of one PNG per embedded image (422 if the PDF has none)"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Extract embedded raster images from a PDF as a ZIP of PNGs (private, in-process)","x-payment-info":{"price":{"currency":"USD","min":"0.01","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/markdown":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"text/markdown":{"schema":{"type":"string"}}},"description":"The document as Markdown"},"402":{"description":"Payment required (x402)"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"}},"summary":"Convert a PDF to Markdown (private, in-process)","x-payment-info":{"price":{"currency":"USD","min":"0.02","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/merge":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"items":{"format":"binary","type":"string"},"maxItems":20,"minItems":2,"type":"array"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The merged PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Merge 2-20 PDFs in the order provided","x-payment-info":{"price":{"currency":"USD","min":"0.005","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/merge-compress":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"items":{"format":"binary","type":"string"},"maxItems":20,"minItems":2,"type":"array"},"level":{"default":"balanced","enum":["lossless","balanced","max"],"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The merged and compressed PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Merge 2-20 PDFs and compress the result in one call (bundle rate)","x-payment-info":{"price":{"currency":"USD","min":"0.008","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/ocr":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"PDF up to 30 pages","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON: { text: <recognized text> }"},"402":{"description":"Payment required (x402)"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"503":{"description":"Not enabled on this deployment (no Gemini API key)"}},"summary":"OCR a scanned PDF via Google Gemini (content leaves the server)","x-max-pages":30,"x-payment-info":{"price":{"currency":"USD","max":"0.9","min":"0.03","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/pages":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"pages":{"description":"qpdf page range, e.g. \"1,3-5,z\" (z = last page); at least one of pages/rotate is required","type":"string"},"rotate":{"description":"Clockwise rotation applied to the output pages","enum":[90,180,270],"type":"integer"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The recomposed PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Select/reorder/delete PDF pages and/or rotate them","x-payment-info":{"price":{"currency":"USD","min":"0.005","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/protect":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"password":{"description":"1-256 chars; used as both user and owner password","type":"string"}},"required":["file","password"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The encrypted PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Password-protect a PDF (AES-256)","x-payment-info":{"price":{"currency":"USD","min":"0.005","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/render":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"dpi":{"default":150,"description":"Render resolution","maximum":300,"minimum":36,"type":"integer"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"A ZIP of one PNG per page (page-NNNN.png, page order)"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Rasterize PDF pages to PNG images, returned as a ZIP","x-max-pages":50,"x-payment-info":{"price":{"currency":"USD","max":"0.5","min":"0.01","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/split":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"ranges":{"description":"Comma-separated qpdf-syntax ranges, e.g. \"1-3,4-6,7-z\"","type":"string"}},"required":["file","ranges"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"A ZIP of one PDF per range"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Split a PDF into page ranges, returned as a ZIP","x-payment-info":{"price":{"currency":"USD","min":"0.005","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/structured":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"PDF up to 30 pages","format":"binary","type":"string"},"schema":{"description":"A JSON Schema (as a string, max 16 KB) describing the object to extract","type":"string"}},"required":["file","schema"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON: { data: <object matching your schema> }"},"402":{"description":"Payment required (x402)"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"503":{"description":"Not enabled on this deployment (no Gemini API key)"}},"summary":"Extract schema-shaped JSON from a PDF (Google Gemini — content leaves the server)","x-max-pages":30,"x-payment-info":{"price":{"currency":"USD","max":"1.2","min":"0.04","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/tables":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"PDF up to 30 pages","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"JSON: { tables: [{ page, title, headers, rows }] }"},"402":{"description":"Payment required (x402)"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"503":{"description":"Not enabled on this deployment (no Gemini API key)"}},"summary":"Extract tables from a PDF as JSON (Google Gemini — content leaves the server)","x-max-pages":30,"x-payment-info":{"price":{"currency":"USD","max":"0.9","min":"0.03","mode":"dynamic"},"protocols":[{"x402":{}}]}}},"/v1/pdf/unlock":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"password":{"type":"string"}},"required":["file","password"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"The decrypted PDF"},"402":{"description":"Payment required (x402) — response body carries the accepted chains, payTo, and exact USDC amount"},"413":{"description":"Payload too large"},"422":{"description":"Unsupported or corrupt input"},"501":{"description":"Not yet implemented (e.g. GIF)"}},"summary":"Remove a PDF's password (requires the current password); flat-priced","x-payment-info":{"price":{"amount":"0.02","currency":"USD","mode":"fixed"},"protocols":[{"x402":{}}]}}}},"x-mcp":{"fileEncoding":"standard base64 in file.data; merge tools use files[]","maxDecodedInputBytes":73400320,"paymentRequestMetaKey":"x402/payment","paymentResponseMetaKey":"x402/payment-response","protocolVersion":"2025-11-25","stateless":true,"toolCount":21,"transport":"streamable-http","url":"https://api.pixo.tools/mcp"},"x-x402-status":"enabled"}