{"uid":"cap_TUJ48jDP62d7tGN8Tcrz3","slug":"2s-image-compress-6e7b175d","name":"2s Image Compress","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/image/compress","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048},"lossy":{"type":"boolean"},"effort":{"type":"integer","maximum":10,"minimum":1},"format":{"enum":["auto","png","jpeg","webp","avif"],"type":"string"},"quality":{"type":"integer","maximum":100,"minimum":1},"imageBase64":{"type":"string","maxLength":4400000}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0024","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.0024/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MajcD0urr09c44yLarWCh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compresses an image (by URL or base64) to reduce file size, with control over format, quality, and compression effort","exampleAgentPrompt":"Compress the image at https://example.com/photo.jpg to webp format with quality 75 using lossy compression at effort level 6.","exampleUseCases":null,"resultDescription":"Returns a JSON object containing the compressed image data (likely as base64 or a URL), format metadata, and size information about the resulting compressed image.","failureModes":["Invalid or unreachable image URL returns an error","base64 payload exceeds 4.4MB limit causing rejection","unsupported image format or corrupt image data","quality or effort values out of allowed range (1-100 and 1-10 respectively)","network timeout fetching remote image URL"],"whenToPreferThis":"Use this endpoint when you need to reduce image file sizes on demand without managing image processing infrastructure, want to convert between formats (PNG, JPEG, WebP, AVIF), or need pay-per-call pricing with no subscription commitment. Ideal for agents that occasionally need image optimization without integrating a full CDN or image pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:10.258Z","isFirstParty":false}