{"name":"ai.pictomancer/image-processing","slug":"pictomancer-image-processing","title":null,"description":"Image processing for AI agents: resize, convert, compress, crop, and web-ready AI-generated images.","url":"https://mcp.market/server/pictomancer-image-processing","rating":null,"grade":"C","score":57,"certified":false,"status":"active","category":"media","tags":["media"],"presence":{"score":5,"stars":null,"forks":null,"downloads_week":null,"last_push_at":null,"license":null},"uptime":{"percent":100,"checks":20,"ok":20,"last_checked_at":"2026-09-24T05:21:01.645Z","last_ok_at":"2026-09-24T05:21:01.645Z","latency_ms":64},"claimed":false,"transport":"remote","callable_via_gateway":true,"default_price_micros":0,"repository":"https://gitlab.com/pictomancer.ai/pig-gateway","website":null,"version":"0.4.0","remotes":[{"type":"streamable-http","url":"https://api.pictomancer.ai/mcp"}],"packages":[],"tools":[{"name":"analyze_image","description":"Analyze an image\n\nFetch an image from a URL or base64 and return its metadata: size in bytes, pixel dimensions, source format, and what it costs every supported vision model in tokens. Always free. Dimensions are omitted if the image header cannot be read. Also reports whether the input carries a C2PA (Content Credentials) manifest and in which container; the manifest is not validated.\n\n### Responses:\n\n**200**: Successful Response (Success Response)\nContent-Type: application/json\n\n**Example Response:**\n```json\n{\n  \"size_bytes\": 1,\n  \"c2pa_manifest\": true\n}\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."}},"required":["source"],"title":"analyze_imageArguments"}},{"name":"compress_image","description":"Compress an image\n\nRe-encode an image with quality/format options to reduce file size. Supports jpeg, png, webp, tiff, gif. Instead of a q number you can set quality_target (0-1]: the smallest file with SSIM at or above the target, searched on the worker (jpeg, webp, avif; flat surcharge; outcome reported in X-Pictomancer-Quality-* headers). If the output is not smaller than the input, the request is free (X-Pig-Billed: 0) and does not consume free-tier quota. Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"q":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"q","description":"Quality (1-100). Lower = smaller file. Typical values: 60-80 for web, 85-95 for print. Maps to libvips Q parameter.","type":"integer"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"format","description":"Output format: jpeg, png, webp, tiff, gif, or avif. If omitted, the original format is preserved.","type":"string"},"strip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"strip","description":"Strip metadata (EXIF, ICC profile, etc.) from the output. Reduces file size slightly.","type":"boolean"},"quality_target":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"quality_target","description":"Target SSIM (0-1]: the worker searches for the smallest file that still scores at least this. Alternative to q; mutually exclusive with it. Requires an explicit format among jpeg, webp, avif. Carries a flat surcharge for the extra encodes.","type":"number"},"autorot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"autorot","description":"Apply EXIF orientation before compressing. Opt-in; default false, which preserves current byte-for-byte behavior.","type":"boolean"},"denoise":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"denoise","description":"Median denoise before compressing: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.","type":"integer"},"equalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"equalize","description":"Auto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before compressing. Opt-in.","type":"boolean"},"sharpen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"sharpen","description":"Unsharp-mask sharpen after compressing (libvips defaults). Opt-in.","type":"boolean"}},"required":["source"],"title":"compress_imageArguments"}},{"name":"convert_image","description":"Convert image format\n\nConvert an image to a different format (jpeg, png, webp, tiff, gif, avif). Optionally set quality, strip metadata, enable lossless mode (webp, avif), or tune encoder effort (avif). Instead of a q number you can set quality_target (0-1]: the smallest file with SSIM at or above the target, searched on the worker (jpeg, webp, avif; flat surcharge; outcome reported in X-Pictomancer-Quality-* headers). Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"format":{"type":"string","title":"format","description":"Target format: jpeg, png, webp, tiff, gif, or avif."},"q":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"q","description":"Quality (1-100). Maps to libvips Q parameter.","type":"integer"},"strip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"strip","description":"Strip metadata (EXIF, ICC profile, etc.) from the output.","type":"boolean"},"lossless":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"lossless","description":"Enable lossless encoding. Only applies to webp and avif.","type":"boolean"},"effort":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"effort","description":"AV1 encoder CPU effort (0-9). Higher = smaller file, slower. Only applies to avif.","type":"integer"},"quality_target":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"quality_target","description":"Target SSIM (0-1]: the worker searches for the smallest file that still scores at least this. Alternative to q; mutually exclusive with it and with lossless. Only for jpeg, webp, avif. Carries a flat surcharge for the extra encodes.","type":"number"},"autorot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"autorot","description":"Apply EXIF orientation before converting. Opt-in; default false, which preserves current byte-for-byte behavior.","type":"boolean"},"denoise":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"denoise","description":"Median denoise before converting: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.","type":"integer"},"equalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"equalize","description":"Auto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before converting. Opt-in.","type":"boolean"},"sharpen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"sharpen","description":"Unsharp-mask sharpen after converting (libvips defaults). Opt-in.","type":"boolean"}},"required":["source","format"],"title":"convert_imageArguments"}},{"name":"crop_image","description":"Crop an image\n\nExtract a rectangular region from an image, in one of three mutually exclusive modes. Manual: give the top-left corner (x, y) and dimensions (width, height) in pixels. Smart crop: give 'gravity' (attention, entropy, centre) plus width and height; the window is picked automatically, clamped to the source if the target is larger. Trim: set 'trim: true' (optional 'threshold') to remove a uniform background border via content detection; the applied rect is reported in X-Pictomancer-Trim-* headers. Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"x":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"x","description":"Left edge of the crop rectangle in pixels. Manual mode only.","type":"integer"},"y":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"y","description":"Top edge of the crop rectangle in pixels. Manual mode only.","type":"integer"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"width","description":"Width of the crop rectangle in pixels. Required in manual and gravity modes.","type":"integer"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"height","description":"Height of the crop rectangle in pixels. Required in manual and gravity modes.","type":"integer"},"gravity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"gravity","description":"Smart-crop mode: picks the window automatically. One of ('attention', 'entropy', 'centre'). Requires width and height; mutually exclusive with x/y and trim. A target larger than the source clamps to the source size.","type":"string"},"trim":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"trim","description":"Trim mode: removes a uniform background border via content detection. Mutually exclusive with x/y/width/height/gravity.","type":"boolean"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"threshold","description":"Trim sensitivity (must be positive; default 10.0). Only valid together with trim: true.","type":"number"},"autorot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"autorot","description":"Apply EXIF orientation before cropping. Opt-in; default false, which preserves current byte-for-byte behavior.","type":"boolean"},"denoise":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"denoise","description":"Median denoise before cropping: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.","type":"integer"},"equalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"equalize","description":"Auto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before cropping. Opt-in.","type":"boolean"},"sharpen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"sharpen","description":"Unsharp-mask sharpen after cropping (libvips defaults). Opt-in.","type":"boolean"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"format","description":"Output format: jpeg, png, webp, tiff, gif, or avif. If omitted, the original format is preserved.","type":"string"}},"required":["source"],"title":"crop_imageArguments"}},{"name":"estimate_cost","description":"Estimate the price of an operation\n\nReturns the exact USD price this API would charge for an operation on an input of the given size, without fetching or processing anything. Free. Use it before paying: send X-Max-Cost-USD on the real request to have the API refuse (412) instead of charging more than you allowed. The list price is returned even when the request could end up free (free tier, or a compress that does not shrink the file).\n\n### Responses:\n\n**200**: Successful Response (Success Response)\nContent-Type: application/json\n\n**Example Response:**\n```json\n{\n  \"operation\": \"Operation\",\n  \"price_usd\": 1.0,\n  \"base_usd\": 1.0,\n  \"surcharges_usd\": {},\n  \"size_multiplier\": 1.0,\n  \"within_free_tier\": true,\n  \"free_tier_remaining\": 1,\n  \"currency\": \"Currency\",\n  \"network\": \"Network\"\n}\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"operation":{"type":"string","title":"operation","description":"Operation to price. One of resize, compress, convert, crop, optimize_for_vision, optimize_generated, pipeline. analyze is always free."},"input_bytes":{"type":"integer","minimum":1,"title":"input_bytes","description":"Size of the input image in bytes. Get it from analyze_image (free) if you do not know it."},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"format","description":"Requested output format; only avif changes the price.","type":"string"},"quality_target":{"type":"boolean","title":"quality_target","description":"Whether the request will use quality_target (SSIM search surcharge).","default":false},"operations":{"anyOf":[{"items":{"properties":{"type":{"type":"string","title":"Type","description":"Operation type: resize, compress, convert, or crop."},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format","description":"Requested output format for this operation; only avif changes the price."}},"type":"object","required":["type"],"title":"EstimateOperation"},"type":"array"},{"type":"null"}],"title":"operations","description":"For pipeline only: the ordered operations, each {type, format?}. Volume discount applies at 3+ operations.","type":"array"}},"required":["operation","input_bytes"],"title":"estimate_costArguments"}},{"name":"get_format_info","description":"Get supported formats and options\n\nReturns supported output formats and their configurable options.\n\n### Responses:\n\n**200**: Successful Response (Success Response)\nContent-Type: application/json","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"title":"get_format_infoArguments"}},{"name":"image_pipeline","description":"Run a multi-step image pipeline\n\nChain multiple operations (resize, compress, convert, crop) in sequence. The image is fetched once, then each operation is applied to the output of the previous one. Max 10 operations per pipeline.\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"operations":{"items":{"properties":{"type":{"type":"string","title":"Type","description":"Operation type: resize, compress, convert, or crop."},"params":{"additionalProperties":{"type":"string"},"type":"object","title":"Params","description":"Operation parameters as key-value string pairs. E.g. {\"scale\": \"0.5\"} for resize, {\"format\": \"webp\"} for convert.","default":{}}},"type":"object","required":["type"],"title":"PipelineOperation"},"type":"array","title":"operations","description":"Ordered list of operations to apply sequentially. Each operation receives the output of the previous one. Max 10."}},"required":["source","operations"],"title":"image_pipelineArguments"}},{"name":"optimize_for_vision","description":"Resize an image for a vision model\n\nResize an image to the largest size a given vision model still benefits from, and report what it costs that model in tokens before and after. Every provider downscales oversized input before counting tokens, so this alone saves bytes and upload latency rather than tokens. Pass max_tokens to trade resolution for tokens: that lever is continuous on Claude, unavailable on OpenAI (cost follows the aspect ratio alone), and on Gemini reaches only a flat 258. An image already within budget is returned untouched and free (X-Pig-Billed: 0).\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"target_model":{"type":"string","title":"target_model","description":"Vision model the image is being prepared for, e.g. claude-opus-5, gpt-4o, gemini-2.5-pro. Unknown ids are rejected rather than guessed: the wrong limits would silently resize to the wrong size."},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"max_tokens","description":"Optional cap on what the image may cost the target model. Without it the image is resized to the model's own ceiling, which saves bytes and upload latency but no tokens, because every provider already downscales oversized input before counting. Set a budget to trade resolution for tokens. The response reports the cost actually achieved: on OpenAI it cannot be lowered by resizing at all, and on Gemini only down to a flat 258.","type":"integer"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"format","description":"Output format: jpeg, png, webp, tiff, gif, or avif. If omitted, the original format is preserved.","type":"string"},"q":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"q","description":"Quality (1-100). Maps to libvips Q parameter.","type":"integer"}},"required":["source","target_model"],"title":"optimize_for_visionArguments"}},{"name":"optimize_generated_image","description":"Optimize an AI-generated image for the web\n\nThe step after image generation. gpt-image, DALL-E, Flux, Midjourney and Stable Diffusion hand back 2-8 MB PNGs; this returns the same picture as a web-ready webp (default), avif, jpeg or png, metadata stripped, transparency kept on webp/avif/png. Optional max_dimension caps the longest side (never upscales); optional q or quality_target (smallest file with SSIM >= target, flat surcharge) control quality. Same price as convert. If the result is not smaller than the input it is still returned but free (X-Pig-Billed: 0). X-Pictomancer-Bytes-Before/-After/-Saved-Percent report the saving. The input's C2PA manifest, if any, is reported in X-Pictomancer-C2PA-Input but is not carried over: re-encoding invalidates it.\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"format":{"type":"string","title":"format","description":"Output format: webp (default), avif, jpeg or png. webp, avif and png keep transparency; jpeg flattens it.","default":"webp"},"q":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"q","description":"Quality (1-100). Maps to libvips Q parameter. Omit to use the encoder default; or set quality_target instead.","type":"integer"},"quality_target":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"quality_target","description":"Target SSIM (0-1]: the worker searches for the smallest file that still scores at least this. Alternative to q; mutually exclusive with it. Carries a flat surcharge for the extra encodes.","type":"number"},"max_dimension":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"max_dimension","description":"Cap on the longest side in pixels. Larger images are scaled down to fit, aspect ratio preserved; smaller images are never upscaled.","type":"integer"},"strip":{"type":"boolean","title":"strip","description":"Strip metadata. Defaults to true: generated images carry no EXIF worth keeping. Metadata includes any C2PA manifest, which would be invalid after re-encoding anyway.","default":true}},"required":["source"],"title":"optimize_generated_imageArguments"}},{"name":"resize_image","description":"Resize an image\n\nScale an image by a factor, or fill an exact box. Use 'scale' for uniform scaling, or 'scale_x'/'scale_y' for independent axes (float factors, e.g. 0.5 = half size). Alternatively set 'width'+'height' for fill mode: resize and smart-crop to those exact dimensions in one call (optional 'gravity', default attention). The two modes are mutually exclusive. Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).\n\n### Responses:\n\n**200**: Processed image binary (Success Response)\nContent-Type: application/json\nContent-Type: image/jpeg\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/png\n\n**Example Response:**\n```json\n\"string\"\n```\nContent-Type: image/webp\n\n**Example Response:**\n```json\n\"string\"\n```","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"delivery":{"oneOf":[{"properties":{"mode":{"type":"string","const":"inline","title":"Mode","default":"inline"}},"additionalProperties":false,"type":"object","title":"InlineDelivery"},{"properties":{"mode":{"type":"string","const":"put_url","title":"Mode"},"put_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Put Url","description":"Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer."}},"additionalProperties":false,"type":"object","required":["mode","put_url"],"title":"PutUrlDelivery"},{"properties":{"mode":{"type":"string","const":"callback_url","title":"Mode"},"callback_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Callback Url","description":"Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare)."}},"additionalProperties":false,"type":"object","required":["mode","callback_url"],"title":"CallbackDelivery"}],"title":"delivery","discriminator":{"propertyName":"mode","mapping":{"callback_url":"#/components/schemas/CallbackDelivery","inline":"#/components/schemas/InlineDelivery","put_url":"#/components/schemas/PutUrlDelivery"}},"type":"string"},"source":{"type":"string","title":"source","description":"Image source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...)."},"scale_x":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"scale_x","description":"Horizontal scale factor (e.g. 0.5 = half width). If only scale_x is given, scale_y defaults to the same value.","type":"number"},"scale_y":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"scale_y","description":"Vertical scale factor (e.g. 0.75 = 75% height). Optional; defaults to scale_x if omitted.","type":"number"},"scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"scale","description":"Uniform scale factor applied to both axes (e.g. 0.5 = half size). Use this for simple scaling; use scale_x/scale_y for independent axes.","type":"number"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"format","description":"Output format: jpeg, png, webp, tiff, gif, or avif. If omitted, the original format is preserved.","type":"string"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"width","description":"Target width in pixels for fill mode: resize and smart-crop to these exact dimensions in one call. Requires height. Mutually exclusive with scale/scale_x/scale_y. Upscaling is allowed.","type":"integer"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"height","description":"Target height in pixels for fill mode. Requires width.","type":"integer"},"gravity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"gravity","description":"Fill-mode smart-crop strategy: one of ('attention', 'entropy', 'centre'). Only valid together with width and height; defaults to attention.","type":"string"},"autorot":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"autorot","description":"Apply EXIF orientation before resizing. Opt-in; default false, which preserves current byte-for-byte behavior.","type":"boolean"},"denoise":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"denoise","description":"Median denoise before resizing: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.","type":"integer"},"equalize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"equalize","description":"Auto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before resizing. Opt-in.","type":"boolean"},"sharpen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"sharpen","description":"Unsharp-mask sharpen after resizing (libvips defaults). Opt-in.","type":"boolean"}},"required":["source"],"title":"resize_imageArguments"}}],"scan":{"score":57,"grade":"C","scanned_at":"2026-09-23T04:55:28.078Z","report":{"scannerVersion":"0.1.9","scannedAt":"2026-09-23T04:55:27.998Z","components":{"code":{"score":-1,"max":25,"notes":["remote-only server, no package to scan"]},"reliability":{"score":20,"max":20,"notes":["remote reachable in 1938ms"]},"poisoning":{"score":15,"max":15,"notes":["10 tool descriptions checked"]},"auth":{"score":3,"max":15,"notes":["open endpoint exposes 1 write-action tools with no auth"]},"maintenance":{"score":3,"max":15,"notes":["repository not readable: unknown"]},"identity":{"score":2,"max":10,"notes":["no repository or website to verify"]}},"findings":[{"id":"auth.open-write","severity":"high","component":"auth","title":"Write-action tools reachable without authentication"}],"inputs":{"probes":[{"url":"https://api.pictomancer.ai/mcp","reachable":true,"authRequired":false,"latencyMs":1938,"serverInfo":{"name":"Pictomancer.ai","version":"Agent-to-agent image processing: resize, convert, compress, crop, pipeline, and one-call optimization of AI-generated images for the web. Sub-50ms latency, USDC micropayments via x402."}}],"packages":[],"repo":{"found":false},"icon":{"url":"https://pictomancer.ai/apple-icon.png","source":"site","width":512,"height":512},"presence":{"stars":null,"forks":null,"downloadsWeek":null,"license":null,"lastPushAt":null,"score":5}}}},"grade_history":[],"reviews":[]}