# 24K Labs Image Compressor

> 24K Labs Image Compressor is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Re-encodes an image as JPEG or WEBP at a specified target quality level to reduce its file size.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/image-compress
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-image-compressor-6657780b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__OoIu-DOfusOI9dlcU4h_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 24k-labs-image-compressor-6657780b -d '<json body>'
```

Example prompt: Can you compress this image as a WEBP at quality 75 to shrink the file size for my website?

## When to prefer this

Choose this endpoint when you need to reduce image file size by re-encoding to JPEG or WEBP at a controlled quality level, especially when targeting web performance or storage savings. If you need to change image format without quality/compression control, prefer the format-conversion sibling endpoint instead.

## Known failure modes

- Unsupported input image format returns an error
- Invalid quality value outside accepted range causes rejection
- Corrupted or non-image input returns a processing error
- Network timeout for very large input images

## How this service works

Re-encode an image as JPEG/WEBP at a target quality to shrink it.

## Output

Returns the re-encoded image binary (JPEG or WEBP) at the specified quality, resulting in a smaller file size than the original input image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "quality": {
   "type": "number"
  },
  "image_b64": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-image-compressor-6657780b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
