# 24K Labs Image Resize

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

Resizes an image (supplied as base64 or URL) to target width/height using contain, cover, or stretch fit modes.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/image-resize
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-image-resize-632ad160
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HSvcXd-0746ZAVAbD2TFg

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-resize-632ad160 -d '<json body>'
```

Example prompt: Can you resize this image — https://example.com/photo.jpg — to 800 by 600 pixels using contain mode so it fits without cropping?

## When to prefer this

Choose this endpoint when you need a simple, fast server-side image resize with explicit fit-mode control (contain/cover/stretch) and don't want to spin up your own image processing infrastructure. It accepts both URLs and base64 inputs, making it convenient for agentic pipelines where images may be in either form. Prefer it over client-side resizing when consistent output dimensions are required across environments.

## Known failure modes

- Invalid or unreachable image URL returns an error
- Malformed base64 data causes a parsing failure
- Unsupported fit mode value returns a validation error
- Requested dimensions are zero or negative — returns a bad request error
- Image format not supported returns a conversion error
- Network timeout fetching remote URL

## How this service works

Resize an image (base64 or URL) to target dimensions with fit modes contain/cover/stretch.

## Output

Returns the resized image as a base64-encoded string along with the actual output dimensions, reflecting the applied fit mode (contain/cover/stretch).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fit": {
   "type": "string"
  },
  "width": {
   "type": "number"
  },
  "height": {
   "type": "number"
  },
  "image_b64": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "width": 4
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-image-resize-632ad160/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)
