# Relaystation Image Resize

> Relaystation Image Resize is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-16).

Resizes or fits images to specified dimensions, preserving animated GIF/WebP frames, priced at $0.0003 per megapixel

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/image/resize
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-image-resize-f883a9e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iTAlVSGAzLgSkflfoH7iq

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 relaystation-image-resize-f883a9e1 -d '<json body>'
```

Example prompt: Can you resize this image at https://example.com/photo.jpg to 800x600 pixels, keeping it fitted within those bounds — and make sure the animation is preserved since it's a GIF?

## When to prefer this

Choose this endpoint when you need a simple, pay-per-use image resize or fit operation without spinning up your own image processing infrastructure. It is especially useful for animated GIF/WebP where frame preservation is required, and for pipelines where per-megapixel metering is more cost-effective than flat-rate services. Prefer it over general-purpose image APIs when you want x402 micropayment billing with auto-credit for remainder.

## Known failure modes

- Invalid or unreachable image URL returns an error
- Unsupported image format returns a format error
- Dimensions exceeding service limits return a constraint error
- Network timeout fetching remote image
- Malformed request body returns 400 bad request
- Insufficient x402 payment balance returns payment error

## How this service works

$0.0003/MP. Resize or fit images — animated GIF/WebP preserved with animated:true. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns the resized image binary in the original or target format. Animated GIF and WebP files retain all frames when the animated flag is set. Metadata includes output dimensions and format. Pricing is metered at $0.0003 per megapixel of the source image, with a 1¢ minimum per call via x402 micropayment; any remainder is auto-credited.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "fit": {
       "enum": [
        "cover",
        "contain",
        "fill",
        "inside",
        "outside"
       ],
       "type": "string"
      },
      "file": {
       "type": "object",
       "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."
      },
      "width": {
       "type": "integer",
       "maximum": 10000,
       "minimum": 1
      },
      "height": {
       "type": "integer",
       "maximum": 10000,
       "minimum": 1
      },
      "animated": {
       "type": "boolean",
       "description": "Preserve all frames of an animated GIF/WebP (billed per-frame)."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

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