# Image Compress API

> Image Compress API is a paid API for AI agents from remarkable-light-production-0cb8.up.railway.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-19).

Compresses and optimizes images via HTTP POST, returning a base64-encoded compressed image with size metadata

## Facts

- Endpoint: POST https://remarkable-light-production-0cb8.up.railway.app/compress?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/image-compress-api-824794bf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P622mFb5eIu7NXWxce6mH

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 image-compress-api-824794bf -d '<json body>'
```

Example prompt: Can you compress this image for me? It's a JPEG that's currently around 450 KB and I need it reduced — send it as a JSON POST with the image in the body and give me back the compressed base64 version.

## When to prefer this

Choose this endpoint when you need a fast, pay-per-use image compression service accessible via HTTP POST that returns a base64-encoded result with before/after size metadata. Ideal for agents that need to compress individual images on-demand within a workflow without managing local image processing libraries.

## Known failure modes

- Invalid or missing image body returns an error
- Unsupported image format may cause processing failure
- Overly large payloads may time out or be rejected
- Malformed JSON body returns a 400-level error
- Payment not fulfilled returns a 402 Payment Required response

## How this service works

Image processing for AI agents

## Output

Returns a JSON object containing: 'image' (base64-encoded compressed image string), 'format' (output format, e.g. 'jpeg'), 'original_kb' (original file size in kilobytes), and 'compressed_kb' (resulting compressed file size in kilobytes).

## 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": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "image": "base64...",
  "format": "jpeg",
  "original_kb": 450,
  "compressed_kb": 98
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/image-compress-api-824794bf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from remarkable-light-production-0cb8.up.railway.app](https://www.zero.xyz/host/remarkable-light-production-0cb8.up.railway.app/llms.txt)
