Browser Agent Tool
Browser image compression for Browser agents
This page is not a traditional file-upload API. It is a compression entry point built for Browser agents that can open pages, execute JavaScript, and read the DOM. Once the image reaches the browser, compression runs locally and returns structured output, JSON text, and a data URL.
How It Works
Pass the image, quality, output, and related settings through query or hash.
The page executes compression in the browser context instead of relying on a separate compression backend.
After compression finishes, automation can read DOM state, JSON output, and the resulting data URL.
Browser Agent Tool
Browser image compression for Browser agents
Pass a base64 image, quality, and output format to this page. The browser compresses it locally and returns JSON plus a data URL.
Supported params
Both query and hash inputs are supported. Use query for small images, and prefer hash for larger payloads to avoid URL length limits.
Built-in acceptance sample
Use sample=tiny-png for a deterministic smoke test, or sample=tiny-emoji for a tiny built-in emoji demo.
Acceptance example: /ai/image/compress?sample=tiny-png&quality=80&output=webp
Emoji sample: /ai/image/compress?sample=tiny-emoji&quality=80&output=webp
Machine-readable result
The JSON and output data URL below are ready to be consumed directly by a Browser agent, with no server API involved.
{}Output data URL
Notes
When this page is the right choice
If you only want to compress a few images manually, the main tool page is usually the simpler choice. This page is more appropriate when you need Browser agent integration, browser automation tests, JS-capable agent workflows, or structured compression results.
What kind of workflow fits this entry best
This page is best suited to callers that can truly drive a browser: Browser agents, browser automation scripts, JS-capable acceptance flows, or agent environments that can wait for page state changes and read structured output. If a workflow can only send requests and receive responses without entering the page context, this is not the best integration path.
How this differs from the main tool page
The main tool page is more human-facing and task-oriented, built for smaller uploads, website image optimization, screenshots, and WebP comparisons. This page is more Browser-agent-facing, emphasizing parameter input, DOM state, structured output, and local execution. The underlying capability is related, but the page intent is different.