# x402-experiments Image Resize (lab.paidapis.net)

> x402-experiments Image Resize (lab.paidapis.net) is a paid API for AI agents from lab.paidapis.net, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Resizes a remote image to specified pixel dimensions and returns the resized image as a data URL with metadata.

## Facts

- Endpoint: GET https://lab.paidapis.net/api/resize-image
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-experiments-image-resize-lab-paidapis-net-32ecafc8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MqT5bPA05UbG8u53Rf25C

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 x402-experiments-image-resize-lab-paidapis-net-32ecafc8
```

Example prompt: Can you resize this image — https://example.com/photo.jpg — to 800 pixels wide and 600 pixels tall, and give me the result as a data URL?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call image resize from a public URL with no signup or API key, just a small USDC micropayment via the x402 protocol. Ideal for agents that occasionally need to resize images on-demand without maintaining a dedicated image processing service. Best for single-image, real-time resize operations up to 2000×2000 px where you want the result inline as a data URL.

## Known failure modes

- Invalid or unreachable image URL returns an error (network fetch failure)
- Width or height exceeding 2000px may be rejected as out of range
- Non-image URLs (e.g. HTML pages) will fail to decode
- Payment failure on Base mainnet USDC will result in 402 response before processing
- Malformed JSON body or missing required fields returns a 400 validation error

## How this service works

Task-runner: resize an image (?url=, ?width=, ?height=, max 2000px each) and return it as a data URL. Priced at $0.02/output-megapixel (min $0.005) — sells compute, metered by resource use, not a flat fee.

## Output

Returns a JSON object containing the resized image as a base64-encoded data URL (imageDataUrl), the actual output width and height in pixels, the image format string, file size in bytes, and a timestamp (resizedAt) indicating when the resize was performed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url",
  "width",
  "height"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Public http(s) URL of the source image."
  },
  "width": {
   "type": "integer",
   "description": "Output width in px, up to 2000."
  },
  "height": {
   "type": "integer",
   "description": "Output height in px, up to 2000."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "width": {
   "type": "integer"
  },
  "format": {
   "type": "string"
  },
  "height": {
   "type": "integer"
  },
  "resizedAt": {
   "type": "string"
  },
  "sizeBytes": {
   "type": "integer"
  },
  "imageDataUrl": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-experiments-image-resize-lab-paidapis-net-32ecafc8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lab.paidapis.net](https://www.zero.xyz/host/lab.paidapis.net/llms.txt)
