{"uid":"cap_xHPEDryUhrYLnqLtnupFQ","slug":"agent-image-compression-api-2ece96ac","name":"Agent Image Compression API","description":"Pay-per-image compression for AI agents (x402 + MPP).","url":"https://agent-image-compress-production.up.railway.app/api/compress","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS URL of the source image to compress."},"format":{"enum":["png","jpeg","webp","avif"],"type":"string","description":"Target output format. Defaults to the input format."},"quality":{"type":"integer","maximum":100,"minimum":1,"description":"Encoder quality 1-100. Defaults to 80."},"maxWidth":{"type":"integer","maximum":20000,"minimum":1,"description":"Max output width in px. Never upscales."},"maxHeight":{"type":"integer","maximum":20000,"minimum":1,"description":"Max output height in px. Never upscales."}}},"responseSchema":{"type":"json","example":{"image":"UklGRk4AAABXRUJQVlA4IEIAAAAwAQCdASo...<base64>","width":1024,"format":"webp","height":768,"inputBytes":102400,"contentType":"image/webp","outputBytes":38211,"percentSaved":62.7}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wpZRW1sdp6QmqFiXnLl_d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses an uploaded image and returns a smaller WebP-format version with metadata about bytes saved, using pay-per-call x402 micropayment protocol.","exampleAgentPrompt":"Can you compress this image for me to reduce its file size — it's a 100KB PNG and I want it as small as possible in WebP format?","exampleUseCases":null,"resultDescription":"Returns a JSON object containing: the compressed image as a base64-encoded WebP string, the output width and height in pixels, the input and output file sizes in bytes, the content type (image/webp), and the percentage of file size saved (e.g. 62.7%).","failureModes":["Invalid or missing image data returns an error response","Unsupported image format may cause processing failure","Payment failure via x402 prevents the request from being fulfilled","Oversized image payload may be rejected","Network timeout on Railway-hosted service during high load"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to compress or convert a single image to WebP format on a pay-per-use basis without a subscription, especially in automated pipelines that use the x402 micropayment protocol. Ideal for agents that need to reduce image file size programmatically and receive back both the compressed image and compression metrics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:32:54.980Z","isFirstParty":false}