# Delx Commerce Image Transform API

> Delx Commerce Image Transform API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Resizes and re-encodes a base64-encoded image to a specified format (WebP, PNG, JPEG) and maximum dimension, returning a hosted URL and SHA256 hash, paid per-call via USDC on Base or Solana.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/image-transform?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-image-transform-api-e4e863d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BSHI0iGwJBH2bIdPD6kCL

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 delx-commerce-image-transform-api-e4e863d5 -d '<json body>'
```

Example prompt: Take this base64-encoded PNG image, resize it so the longest side is at most 1024 pixels, convert it to WebP at quality 85, and give me back the hosted URL and SHA256 hash.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call image resize and format conversion with no subscription or signup, a verifiable SHA256 hash on output, and a hosted CDN URL returned immediately. Ideal for agent pipelines that process images on-demand and want deterministic per-image pricing in USDC. Prefer this over general-purpose image generation APIs when you already have a source image and only need resizing/re-encoding, not AI-generated content.

## Known failure modes

- Image base64 payload exceeds 8 MiB decoded limit — returns validation error
- Invalid base64 string or unsupported image format — returns parse/decode error
- Requested max_dimension not in allowed enum [256,512,768,1024,1536,2048] — returns validation error
- Quality value outside 40–95 range — returns validation error
- Payment via x402 not completed or insufficient USDC — returns 402 Payment Required
- Image is corrupt or cannot be processed by Pillow — returns processing error

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object containing the hosted URL of the transformed image, its width and height in pixels, file size in bytes, SHA256 hash for verification, media type, output format, transform ID, and the exact sale price in USDC ($0.001). The image is immediately accessible at the returned URL.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "quality": {
   "type": "integer",
   "default": 85,
   "maximum": 95,
   "minimum": 40,
   "description": "JPEG/WebP quality. PNG ignores this field."
  },
  "image_base64": {
   "type": "string",
   "maxLength": 8388608,
   "minLength": 1,
   "description": "One base64-encoded PNG, JPEG, or WebP image; decoded input is limited to 6 MiB. Data-URI prefixes are accepted."
  },
  "max_dimension": {
   "enum": [
    256,
    512,
    768,
    1024,
    1536,
    2048
   ],
   "type": "integer",
   "default": 1024
  },
  "output_format": {
   "enum": [
    "webp",
    "png",
    "jpeg"
   ],
   "type": "string",
   "default": "webp"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 42132,
  "model": "pillow",
  "width": 1024,
  "height": 576,
  "sha256": "2d6c7c2b3f3c8e1e7b0d3a5b6e7f8a9b1234567890abcdef1234567890abcdef",
  "provider": "first-party",
  "image_url": "https://api.delx.ai/api/v1/generated-image-transforms/2d6c7c2b3f3c8e1e7b0d3a5b6e7f8a9b.webp",
  "media_type": "image/webp",
  "transform_id": "8e2f4a7d4f3d42b5a2c8f4ecb2b6d5a1",
  "output_format": "webp",
  "sale_price_usdc": 0.001
 }
}
```

## More

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