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 分

    請在儲存庫或註冊中心條目中宣告授權條款。