# RelayStation Image Auto-Trim

> RelayStation Image Auto-Trim 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-15).

Automatically detects and crops uniform borders from images without requiring manual coordinates, at $0.0003 per megapixel.

## Facts

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

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-auto-trim-7c134886 -d '<json body>'
```

Example prompt: Can you automatically trim the uniform white borders off this product image — I don't want to specify any coordinates, just let it detect and crop the blank edges for me?

## When to prefer this

Choose this endpoint when you need to automatically remove uniform solid-color borders or padding from images without manually specifying crop coordinates. Ideal for batch-processing product photos, scanned documents, or screenshots where borders are consistent and machine-detectable. Prefer over manual crop endpoints when coordinates are unknown or vary per image.

## Known failure modes

- Image has no uniform borders to detect — returns image unchanged or minimal crop
- Unsupported image format submitted — returns format error
- Image too large or malformed — returns processing error
- Non-uniform or gradient borders may not be fully removed
- Network timeout for very large images

## How this service works

$0.0003/MP. Auto-crop uniform borders — clean edges without manual coordinates. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns the processed image with uniform borders automatically detected and removed. The output is the cropped image file with clean edges, sized to the content area after border removal. Billing is per megapixel at $0.0003/MP with a 1¢ x402 minimum; any remainder is auto-credited.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "file": {
       "type": "object",
       "description": "cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."
      },
      "threshold": {
       "type": "number",
       "minimum": 0,
       "maximum": 255,
       "description": "Border-detection sensitivity."
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-image-auto-trim-7c134886/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)
