# RelayStation Media Trim

> RelayStation Media 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).

Cuts a specified time range from an audio or video file using fast stream-copy, preserving original codecs with no quality loss.

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/media/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-media-trim-eac73773
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-KhTqZk1AMnBJSg9_WoLj

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-media-trim-eac73773 -d '<json body>'
```

Example prompt: Trim my video file from the 0:30 mark to 2:45 without re-encoding it — I need the original codec preserved and no quality loss.

## When to prefer this

Choose this endpoint when you need to extract a time-bounded segment from audio or video without any transcoding overhead — ideal when preserving the original codec and quality is critical, or when speed and cost efficiency matter. Prefer over full re-encode pipelines when the output format does not need to change.

## Known failure modes

- Invalid or unreachable media URL returns an error
- Start or end time out of bounds for the media duration
- Unsupported container format may prevent stream-copy
- Network timeout for large files
- Malformed time range (start >= end) causes rejection

## How this service works

$0.0005/MB. Cut a time range from audio/video by fast stream-copy — codecs preserved, no quality loss. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns the trimmed audio or video file segment spanning the requested time range, with all original codecs and streams preserved via stream-copy — no transcoding, no quality degradation. Billed at $0.0005/MB with a 1¢ x402 minimum; any remainder is credited to the account.

## 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 ≤ 50 MB> }. The input container must sniff (ffprobe) to the live allowlist (operator-tunable cputools.media.input_formats): 3g2, 3gp, aac, asf, avi, flac, flv, gif, m4a, m4v, matroska, mj2, mov, mov,mp4,m4a,3gp,3g2,mj2, mp3, mp4, mpeg, mpegts, mpegvideo, ogg, wav, webm, wmv. An off-list input is a free 422 UNSUPPORTED_FORMAT."
      },
      "start": {
       "type": "number",
       "minimum": 0
      },
      "end": {
       "type": "number",
       "minimum": 0
      },
      "duration": {
       "type": "number",
       "minimum": 0.01
      },
      "format": {
       "type": "string",
       "enum": [
        "mp4",
        "mov",
        "mkv",
        "webm",
        "m4a",
        "mp3",
        "wav",
        "ogg",
        "aac",
        "flac"
       ]
      }
     }
    }
   },
   "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-media-trim-eac73773/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)
