Image Processing

ai.pictomancer由 pictomancer.ai 发布官方发布者v0.4.0更新于 Oct 27, 2026

Image processing for AI agents: resize, convert, compress, crop, and web-ready AI-generated images.

已验证Streamable HTTP可网页运行媒体与设计AI 与机器学习

概览

AI 生成的概览

远程图像处理 API,让助手缩放、转换、压缩、裁剪、分析图片并去除背景,付费前可先估算费用。

可以做什么
  • 查询格式与价格:列出支持的输出格式及其可配置选项,并在执行前估算某次操作的精确美元价格。
  • 分析图片:从 URL 或 base64 获取图片,返回字节大小、像素尺寸、源格式、各视觉模型的 token 成本以及是否带有 C2PA 信息。
  • 变换图片:按比例或精确尺寸缩放,手动或按注意力区域智能裁剪,在 jpeg、png、webp、tiff、gif、avif 之间转换,并按质量或 SSIM 目标压缩。
  • 为 AI 准备图片:缩放到某视觉模型仍能受益的最大尺寸并报告前后 token 成本,把体积较大的 AI 生成 PNG 转为适合网页的 webp、avif、jpeg 或 png。
  • 抠出主体:用 U2Net 分割模型去除背景,返回透明背景的 png、webp 或 avif。
  • 串联步骤:在一次抓取后按顺序执行最多 10 个缩放、压缩、转换和裁剪操作。
适用场景
适合需要为网页或视觉模型准备、缩小、转换图片,为商品或人像照片去除背景,或在不安装本地图像库的情况下一次调用完成多步图像编辑的场景。
运行要求
需要访问 api.pictomancer.ai 的远程 streamable HTTP 端点;未声明任何软件包、环境变量或请求头。图片以 URL 或 base64 提供。部分操作按美元计费,能发送 X-Max-Cost-USD 请求头的客户端可用于限制花费。
安装前请注意
付费操作会产生真实费用;estimate_cost 免费,X-Max-Cost-USD 请求头可让 API 在超出上限时返回 412 而不是继续扣费。图片会发送给第三方服务,不宜处理机密材料。去背景需运行分割模型,每张图片耗时数秒。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Image Processing,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/ai.pictomancer%2Fimage-processing/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "image-processing": {
      "type": "http",
      "url": "https://api.pictomancer.ai/mcp"
    }
  }
}

工具

11

get_format_info

Get supported formats and options Returns supported output formats and their configurable options. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json

无需输入参数。

estimate_cost

Estimate the price of an operation Returns 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). ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "operation": "Operation", "price_usd": 1.0, "base_usd": 1.0, "surcharges_usd": {}, "size_multiplier": 1.0, "within_free_tier": true, "free_tier_remaining": 1, "currency": "Currency", "network": "Network" } ```

输入参数formatoperation必填operationsinput_bytes必填quality_target

analyze_image

Analyze an image Fetch 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. ### Responses: **200**: Successful Response (Success Response) Content-Type: application/json **Example Response:** ```json { "size_bytes": 1, "c2pa_manifest": true } ```

输入参数source必填

resize_image

Resize an image Scale 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). ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数scalewidthformatheightsource必填autorotdenoisegravityscale_xscale_ysharpendelivery另有 1 个

compress_image

Compress an image Re-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). ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数qstripformatsource必填autorotdenoisesharpendeliveryequalizequality_target

convert_image

Convert image format Convert 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). ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数qstripeffortformat必填source必填autorotdenoisesharpendeliveryequalizelosslessquality_target

crop_image

Crop an image Extract 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). ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数xytrimwidthformatheightsource必填autorotdenoisegravitysharpendelivery另有 2 个

optimize_for_vision

Resize an image for a vision model Resize 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). ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数qformatsource必填deliverymax_tokenstarget_model必填

optimize_generated_image

Optimize an AI-generated image for the web The 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. ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数qstripformatsource必填deliverymax_dimensionquality_target

remove_image_background

Remove the background from an image Cut the subject (person, product, animal, object) out of a photo and return it on a transparent background as png (default), webp or avif. Optional q (1-100) for webp/avif. Runs a segmentation model (U2Net) on CPU: expect a few seconds per image, not milliseconds. Not available in pipeline. ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数qformatsource必填delivery

image_pipeline

Run a multi-step image pipeline Chain 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. ### Responses: **200**: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg **Example Response:** ```json "string" ``` Content-Type: image/png **Example Response:** ```json "string" ``` Content-Type: image/webp **Example Response:** ```json "string" ```

输入参数source必填deliveryoperations必填

版本历史

1
  1. v0.4.0最新Sep 16, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。