# agentsvc.io Image Resize API

> agentsvc.io Image Resize API is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.0045/call, status unknown (last checked 2026-10-10).

Resizes and converts images to specified dimensions and formats (webp, png, jpeg, avif) with configurable quality and fit modes

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/image-resize?utm_source=zero.xyz
- Price: $0.0045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-image-resize-api-869446d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b-2N8Sg1pq4AUwrDndTa9

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 agentsvc-io-image-resize-api-869446d9 -d '<json body>'
```

Example prompt: Resize the image at https://example.com/photo.png to 800 pixels wide and 600 pixels tall, convert it to webp format at quality 85, fitting it inside those bounds.

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically resize or reformat images on a per-call, pay-as-you-go basis without managing API keys or subscriptions. Particularly suited for agents handling user-uploaded content, generating thumbnails, or preparing images for specific display contexts. Supports both URL-based and base64 inputs, making it flexible for pipelines where the image is already in memory.

## Known failure modes

- Image URL is not publicly accessible or returns a non-image response
- Image exceeds the 15 MB size limit
- Requested width or height exceeds the 4096-pixel maximum
- Invalid or unsupported image format in the source file
- Network timeout fetching the source image URL
- Malformed base64 image data provided

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object containing the resized image as a base64-encoded string, along with the output width, height, format, and size in bytes, plus the original image's dimensions, format, and size for reference.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fit": {
   "enum": [
    "inside",
    "cover",
    "contain",
    "fill"
   ],
   "type": "string",
   "default": "inside"
  },
  "width": {
   "type": "integer",
   "maximum": 4096
  },
  "format": {
   "enum": [
    "webp",
    "png",
    "jpeg",
    "avif"
   ],
   "type": "string",
   "default": "webp"
  },
  "height": {
   "type": "integer",
   "maximum": 4096
  },
  "quality": {
   "type": "integer",
   "default": 80,
   "maximum": 100,
   "minimum": 1
  },
  "image_url": {
   "type": "string",
   "format": "uri",
   "description": "Public URL of the image (max 15 MB)"
  },
  "image_base64": {
   "type": "string",
   "description": "Base64 image data (data: URI prefix allowed)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "width": 320,
   "format": "webp",
   "height": 200,
   "original": {
    "width": 1280,
    "format": "png",
    "height": 800,
    "size_bytes": 214000
   },
   "size_bytes": 6120,
   "image_base64": "UklGRiQAAABXRUJQVlA4..."
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-image-resize-api-869446d9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
