Images

Resize or convert an image

image_transform · Changes data · Markdown

A new image from one in the store: resized or cropped, converted to WebP, AVIF, JPEG or PNG and compressed, with GPS data removed.

$0.005 a call

From your agent’s balance. A call that fails costs nothing.

An example

Make the new Tabor photo a 1080 by 1080 square for Instagram.

Your agent callsimage_transform$0.005 a call

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "file_id": "2c4e6a8c-0e2a-4c6e-9a0c-4e6a8c0e2a5c",
  "width": 1080,
  "height": 1080,
  "fit": "cover",
  "format": "jpeg",
  "name": "tabor-square.jpg"
}
What comes back
{
  "file": {
    "file_id": "d97c3603-2f05-4939-a121-0fbdae319fcc",
    "name": "tabor-square.jpeg",
    "content_type": "image/jpeg",
    "size": "7.1 KB",
    "size_bytes": 7222,
    "sha256": "e2560f4cc6a93a7e11984db87560dd635bbf7cefbc4b9bd3374fe82d700b4102",
    "created_at": "2026-10-14T08:00:00+00:00",
    "download_url": "https://cncto.co/d/d97c3603-2f05-4939-a121-0fbdae319fcc?t=eyJmIjoiZDk3YzM2MDMtMmYwNS00OTM5LWExMjEtMGZiZGFlMzE5ZmNjIiwiZXhwIjoxNzkyMTYwNDgzfQ:1xHMKh:WXQuFxfJ6cW11CA5UUuclMinHv6ZEt_qD-edjAJO3vk",
    "link_expires_in_hours": 24
  },
  "width": 1080,
  "height": 1080
}

Use it when

An image is too big, the wrong shape or the wrong format for where it goes.

What it does

A new image from one in the file store: resized (fit inside the box, or cover it and crop the overflow from the center), converted to WebP, AVIF, JPEG or PNG, and compressed. Photos come out turned the right way up with their metadata (GPS included) removed.

What comes back

file: the new image with its file_id, name, size and download link; width and height. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
file_idRequiredstringAn image in the file store. Exactly 36 characters.
widthinteger1 to 8,000.
heightinteger1 to 8,000.
fitstringOne of: inside,cover. Default: inside.
formatstringOne of: webp,avif,jpeg,png. Default: webp.
qualityinteger30 to 100. Default: 82.
namestringUp to 200 characters.
link_hoursinteger1 to 168.

The call

Over MCP, call image_transform on https://api.conecto.chat/mcp/images. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/image_transform \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"2c4e6a8c-0e2a-4c6e-9a0c-4e6a8c0e2a5c","width":1080,"height":1080,"fit":"cover","format":"jpeg","name":"tabor-square.jpg"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No file in the store has that file_id.Find it with files_list.
not_image400The file is not an image that can be read (PNG, JPEG, WebP, AVIF, GIF, BMP or TIFF).Upload the image again in one of those formats.
too_large413The image is over 40 megapixels.Ask for a smaller copy of it.
invalid_input400fit is cover without both width and height.Send both, or fit: inside.
storage_full409The file store has no room for the new image.Delete files with files_delete, or add room with files_add_storage.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md