# FastX402 Media Trim

> FastX402 Media Trim is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Trims a video or audio file to a specified time range and returns a download URL for the clipped output

## Facts

- Endpoint: GET https://fastx402.tools/media-trim?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-media-trim-edc7213f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PhvZctACx3zfpRB6XN3af

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 fastx402-media-trim-edc7213f
```

Example prompt: Can you trim this video from 5 seconds to 1:35 and give me a download link? The file is at https://example.com/footage.mp4 — output it as mp4.

## When to prefer this

Choose this endpoint when you need to quickly trim or clip a video or audio file from a remote URL without setting up a server-side FFmpeg pipeline or requiring API keys. It supports a wide range of formats (mp4, mov, mkv, webm, avi, mp3, m4a, wav, ogg, flac) and accepts flexible time formats. At $0.01 per call it is cost-effective for on-demand, single-file trimming operations in agent workflows. It is especially suited for AI agents that need to process media as part of a larger pipeline without account registration.

## Known failure modes

- Invalid or unreachable media URL returns an error — the URL must be a publicly accessible http(s) resource
- Unsupported file format at the source URL may cause processing failure
- Start time greater than or equal to end time returns an error
- End time beyond the actual file duration may be clamped or return an error
- Malformed time strings (not in seconds or MM:SS format) may fail validation
- Large files may time out depending on network and processing constraints

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing a temporary download URL for the trimmed media file, the output file size in bytes, the start time used, the output format, MIME type, duration in seconds, an expiry timestamp, and the original input file size in bytes.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "end": {
       "type": "string",
       "description": "End time in seconds or as 1:05, default the end of the file"
      },
      "url": {
       "type": "string",
       "description": "Absolute http(s) URL of a video or audio file (mp4, mov, mkv, webm, avi, mp3, m4a, wav, ogg, flac)"
      },
      "start": {
       "type": "string",
       "description": "Start time in seconds (12.5) or as 1:05, default 0"
      },
      "format": {
       "enum": [
        "mp4",
        "mov",
        "mkv",
        "webm",
        "mp3",
        "m4a",
        "wav",
        "ogg",
        "flac",
        "opus"
       ],
       "type": "string",
       "description": "Output format, default mp4 for video and mp3 for audio"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "url": {
       "type": "string"
      },
      "bytes": {
       "type": "integer"
      },
      "start": {
       "type": "integer"
      },
      "format": {
       "type": "string"
      },
      "mime_type": {
       "type": "string"
      },
      "duration_s": {
       "type": "integer"
      },
      "expires_at": {
       "type": "string"
      },
      "input_bytes": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://workshop.tusk80.com/r/1b4714c56e71cd586c493fc3e8f75f2a.mp4",
  "bytes": 932084,
  "start": 5,
  "format": "mp4",
  "mime_type": "video/mp4",
  "duration_s": 10,
  "expires_at": "2026-10-17T15:20:47.820Z",
  "input_bytes": 5510872
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-media-trim-edc7213f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
