Image optimization for AI agents
Convert, resize and compress one picture or thousands. State a limit per file and TokenKit tunes the quality, and if needed the dimensions, until every file fits.
A whole folder, exactly the size you asked for.
Target file size
State a limit per file and each one is brought under it at the highest quality that fits. The answer says whether every file met the limit.
Batch by folder
Point at a folder; results go to the folder you name. Originals are never replaced.
Formats
JPEG, PNG, HEIC and TIFF out; the common camera and web formats in.
Metadata and backgrounds
Location and camera data are removed by default. The main subject can be cut out as a transparent PNG.
Ask your agent
- “Make web copies of every image in assets/, JPEG, at most 1600 px and under 500 KB each.”
- “Which of these photos still carry a GPS location?”
- “Cut the product out of these five pictures.”
Examples of requests. Your agent chooses what to call; nothing in the request needs to mention TokenKit.
What it covers
Target file sizeBatch by folderFormatsMetadata and backgrounds
Works in the app and through your agent, inside the folders you allow. Originals are never changed.
What we measured
With a size target the image task dropped from a median of 8 turns to 3 between two versions of TokenKit, level with an agent using its own Python script. Benchmarks.
Where it stops
- WebP and AVIF output are not available yet.
- Background removal needs a clear main subject.