canonical: https://jentic.com/apis/compresso.space/compresso

# Compresso Space compresso API

The compresso API compresses PNG, JPEG, and WebP images to a visually lossless, smaller file through a single compress endpoint that accepts the image as a raw body or a multipart form upload. It returns the optimized image directly, and a usage endpoint reports today's account activity and doubles as a quick key check. The service focuses on size reduction without visible quality loss rather than broader image editing.

## For AI agents

Compress PNG, JPEG, and WebP images to a visually lossless, smaller file through one compress endpoint, and read today's account usage. Accepts images as a raw body or a multipart form upload.

## Scope

Does not resize, crop, host, or convert images between formats. Use for visually lossless image compression only.

## Capabilities

- Compress a PNG, JPEG, or WebP image to a visually lossless, smaller file
- Upload an image as a raw body or a multipart form file to compress it
- Read today's account usage and verify an API key

## Use cases

### Agent-Driven Image Compression

An AI agent connected to the compresso API can compress images as a step in a content pipeline. It posts a PNG, JPEG, or WebP image to the compress endpoint and gets back a visually lossless, smaller file to store or forward, so an agent handling user uploads or generated images can shrink them inline without a separate tool. The usage endpoint lets the agent confirm its key before a batch.

Example prompt: Post a PNG image to the compress endpoint and save the returned compressed file

### Web Asset Optimization Before Publishing

Large images slow page loads. The compresso API reduces the size of PNG, JPEG, and WebP assets without visible quality loss, so a publishing agent can compress every image in an article before it ships. Because the endpoint returns the optimized image directly, the agent can swap the smaller file straight into the page without a round trip to storage.

Example prompt: Compress each JPEG and PNG referenced in an article and replace them with the smaller returned files

### Usage-Aware Batch Compression

When compressing many images, an agent needs to stay within the day's allowance. The compresso API's usage endpoint reports today's account activity, so an agent can check consumption before and during a batch and pause when it nears the limit. The same endpoint doubles as a quick key check at the start of a run.

Example prompt: Read the usage endpoint, then compress a folder of images while stopping if the day's usage nears its limit

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/compress` | Compress a PNG, JPEG, or WebP image |
| GET | `/usage` | Today's usage for the account and a quick key check |
| GET | `/openapi.json` | The OpenAPI document for the API |

## Key resources

- **Compress** — Compress a PNG, JPEG, or WebP image sent as a raw body or multipart form upload, returning the optimized file
- **Usage** — Read today's account usage, which also serves as a quick API key check

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 57 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 93 / 100
  - Developer Experience & Jentic Compatibility: 72 / 100
  - AI-Readiness & Agent Experience: 41 / 100
  - Agent Usability: 94 / 100
  - Security: 35 / 100
  - AI Discoverability: 50 / 100
- **View full report:** https://jentic.com/apis/compresso.space/compresso/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the compresso API by hand means choosing between its basic-auth and bearer key styles, sending the image with the right content type or as a multipart upload, and handling the 413 and 415 responses. Through Jentic you install once, import compresso from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The compresso API carries the image in the request body, not the URL path, so a rule bounds which operations your agent may call rather than which image. You can let it call the compress operation it needs without granting the usage read, and because the surface is small there is little else to expose.
- **Credential handling:** Your compresso key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'compress an image' or 'reduce image file size', and Jentic returns the matching compresso operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **ShortPixel** — Image compression and optimization with resizing and format conversion beyond compresso's single compress step.
- **Cloudinary** — Full image upload, transformation, and delivery platform rather than a focused compression endpoint.
- **imgix** — On-the-fly image CDN and transformation versus compresso's upload-and-compress model.
- **Filestack** — Handles upload and storage of the images that compresso then compresses.

## FAQ

### What authentication does the compresso API use?

The compresso API accepts your API key two ways per its OpenAPI spec: HTTP basic auth, using api as the username and the key as the password (or the key as the username with an empty password), or an Authorization: Bearer header with the key. The spec document endpoint is open. Through Jentic the key is stored once by your own self-hosted instance and injected at call time, so it never sits in your agent's prompt or logs.

### Is there a compresso MCP server?

You do not need an MCP server to give your agent the compresso API. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the compress and usage endpoints on demand. Operations are discovered when needed, so no extra server's tool definitions are loaded into the agent's context.

### Can I limit what my agent is allowed to do with the compresso API?

Yes. Write a rule that allows only the compress operation, so the agent can compress images but cannot read your account usage. The compresso API carries the image in the request body, so the rule bounds which operations your agent may call rather than a specific image, and the calls it makes are logged.

### What image formats can I compress with the compresso API?

The compress endpoint accepts PNG, JPEG, and WebP images per its OpenAPI spec, sent either as a raw request body with the matching content type or as a multipart form upload with a file field. It returns the compressed image directly, and responds with a 415 when the media type is unsupported and a 413 when the image is too large.

### What are the rate limits for the compresso API?

The OpenAPI spec does not state a fixed per-second rate limit, though the compress endpoint can return a 429 when you exceed your allowance. GET /usage reports today's account activity so an agent can pace itself. Check the documentation at https://compresso.space/developers for current plan limits.

### How do I compress an image with the compresso API through Jentic?

Search Jentic for 'compress an image' and it returns the POST /compress operation with its input schema. Send a PNG, JPEG, or WebP image and the agent gets back the compressed file. To run it on your own infrastructure, install Jentic One from its GitHub repo.
