# fastapi.online Image Resize

> fastapi.online Image Resize is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.001/call, status down (last checked 2026-09-16).

Resizes an uploaded image (PNG/JPEG/WebP) to specified dimensions, optionally maintaining aspect ratio, for $0.001 USDC per call

## Facts

- Endpoint: POST https://api.fastapi.online/image-resize
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-image-resize-9886f33c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_elRgiNDn75b4B4o9wSI7x

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 fastapi-online-image-resize-9886f33c -d '<json body>'
```

Example prompt: Can you resize this product photo to 800 pixels wide by 600 pixels tall while keeping the aspect ratio? It's a JPEG I'll upload.

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call image resize without signup or subscription, especially in agentic workflows where crypto micropayments (USDC) are already available. Prefer this over cloud image CDNs when no account management is desired and the volume is low enough for per-call pricing to be economical.

## Known failure modes

- Unsupported file format (non-PNG/JPEG/WebP input) returns an error
- Missing width or height parameter causes a bad request error
- Payment failure via x402 protocol returns a 402 response requiring crypto payment
- Image file too large may cause a timeout or rejection
- Invalid or non-numeric width/height values return a validation error

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns the resized image as binary data in the same or compatible format (PNG/JPEG/WebP), scaled to the requested width and height, optionally with aspect ratio preserved.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "string",
   "format": "binary",
   "description": "Image file (PNG/JPEG/WebP)"
  },
  "width": {
   "type": "string"
  },
  "height": {
   "type": "string"
  },
  "maintain_aspect": {
   "type": "string"
  }
 }
}
```

## More

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