# 24K Labs Image Compress

> 24K Labs Image Compress 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).

Compresses an image to reduce file size while preserving visual quality, returning the compressed image bytes.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/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-compress-18a0186d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DNs3gSzMaKxT019K3IYs1

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-compress-18a0186d -d '<json body>'
```

Example prompt: Can you compress this image to reduce its file size as much as possible before I upload it to the site?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call image compression step without managing your own image processing infrastructure. It's ideal for agentic workflows that need to reduce image file sizes on the fly — e.g., before storing, emailing, or serving images — and when you want a simple JSON response with the resulting bytes rather than a full image CDN solution.

## Known failure modes

- Unsupported image format returns an error response
- Corrupt or malformed image binary causes a processing failure
- Image too large exceeds payload limits
- Network timeout on very large files
- Missing or empty image input field returns a validation error

## How this service works

A curated directory of x402 services — each one on the list on purpose, with the health, uptime, and independent trust grades from across the ecosystem gathered in one place.

## Output

A JSON object containing the compressed image as bytes and the resulting byte size, allowing the caller to retrieve the optimized image data and confirm the new file size.

## 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-compress-18a0186d/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)
