← Back to blog

How to Use Claude to Resize Images as a Skill (Free API)

Published July 7, 2026 · Updated August 4, 2026 · Eric · 6 min read

Fastest path: open the free browser image resizer. To use Claude as an image-resize skill—or ChatGPT, Codex, Hermes—wire the REST or MCP examples below.

People often ask: how can I use Claude to resize images as a skill? Claude (and other agents) only resize images if they have a tool to call. Dumping a 4K screenshot into chat wastes tokens. The fix: give the agent a free image resize API at POST /api/resize-image on Agent Media Tools.

No API key for basic use. Works from curl, Python, n8n, Claude Desktop MCP, and custom agent skills.

Why Agents Need an Image Resize API

API Contract (what the agent should expect)

PropertyValue
EndpointPOST /api/resize-image
Bodymultipart form: image file + width and/or height
Optionalformat (jpeg|png|webp|avif), quality, fit
ResponseJSON with downloadUrl (not raw binary)
AuthNone for basic free tier

curl Quick Start

💡 Windows: use Git Bash or WSL for these curl examples.

curl -s -X POST https://agentmediatools.com/api/resize-image \
  -F "image=@photo.jpg" \
  -F "width=800" \
  -F "format=webp"

Example JSON response:

{
  "success": true,
  "filename": "a1b2c3.webp",
  "filesize": 48219,
  "downloadUrl": "/downloads/a1b2c3.webp"
}

Download the file:

curl -s -X POST https://agentmediatools.com/api/resize-image \
  -F "image=@photo.jpg" \
  -F "width=800" \
  -F "format=webp" \
  | python3 -c 'import sys,json; print("https://agentmediatools.com"+json.load(sys.stdin)["downloadUrl"])' \
  | xargs -I{} curl -sL {} -o resized.webp

Browser UI: free online image resizer. More curl patterns: resize images with curl.

Python (agent or script)

import requests

with open("photo.jpg", "rb") as f:
    r = requests.post(
        "https://agentmediatools.com/api/resize-image",
        files={"image": f},
        data={"width": "1200", "format": "webp"},
    )
r.raise_for_status()
data = r.json()
download = "https://agentmediatools.com" + data["downloadUrl"]
img = requests.get(download)
with open("output.webp", "wb") as out:
    out.write(img.content)

Claude skill / custom instructions

Paste this into a Claude skill, project instruction, or system prompt so Claude can resize images as a skill:

When the user asks to resize an image, POST multipart form data to https://agentmediatools.com/api/resize-image with fields: image (file), width and/or height (pixels), optional format (jpeg|png|webp|avif). No auth required for basic use. Parse the JSON response and download the file from https://agentmediatools.com{downloadUrl}. Return the final image path or URL to the user.

Tool pages on Agent Media Tools include a Copy Prompt button with a ready-made version—start at /tool/resize-image.

One-shot task prompt

Resize photo.jpg to 800px wide as WebP using the Agent Media Tools
resize API, then save the result and confirm dimensions.

MCP integration (Claude Desktop)

For native tool calling, install the MCP extension or add the SSE server:

{
  "mcpServers": {
    "agent-media-tools": {
      "transport": "sse",
      "url": "https://agentmediatools.com/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Claude then gets resize_image as a first-class tool—no manual curl parsing. Setup guide: Connect Claude via MCP.

Rate limits

FAQ

How can I use Claude to resize images as a skill?

Add the skill/instruction block above, or connect MCP so Claude calls resize_image directly. Either path uses the same free /api/resize-image endpoint.

Is this an “AI resize” that reinterprets the image?

No—this is deterministic resize/re-encode (dimensions and format), not generative AI. For generation see AI image generation.

Where is the browser tool?

Image Resize API & free tool.

Try it now: Resize an image free · Claude skill · API docs · Agent hub · Compress after resize

Related tools


Eric builds AI tools at agentmediatools.com. More: blog · llms.txt