# fastapi.online — Media Download (URL/Magnet to Binary)

> fastapi.online — Media Download (URL/Magnet to Binary) is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.02/call, status down (last checked 2026-09-15).

Downloads media (video, audio, image, or magnet-linked content) from a public URL or magnet link and returns the binary stream

## Facts

- Endpoint: POST https://api.fastapi.online/download
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-media-download-url-magnet-to-binary-111bb5d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X1H8N29zZ42Y3OOwCQO_l

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 fastapi-online-media-download-url-magnet-to-binary-111bb5d8 -d '<json body>'
```

Example prompt: Can you download the video at https://example.com/clip.mp4 and give me the file? Treat it as type 'video' and save it as 'clip.mp4'.

## When to prefer this

Use this endpoint when you need to programmatically fetch a media file (video, audio, or image) from a known public URL or magnet link and receive the raw binary content — especially when you want a pay-per-call, no-signup approach via crypto. Prefer this over general HTTP fetch tools when magnet link support or media-type-aware downloading is needed.

## Known failure modes

- URL is not publicly accessible or returns a non-200 status — download fails
- Magnet link has no seeders or content is unavailable — timeout or empty result
- URL points to non-media content — may return unexpected binary or error
- File too large — may time out or exceed server limits
- Invalid or malformed URL/magnet string — validation error returned
- Unsupported media type at the given URL — type mismatch error

## How this service works

Self-hosted AI API gateway. Expensive endpoints require an x402 micropayment (USDC on Base) before executing.

## Output

A binary stream of the requested media file (video, audio, or image). The response is raw binary content, suitable for saving to disk or piping into further processing steps.

## 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": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "maxLength": 4096,
       "minLength": 8,
       "description": "Public http(s) URL, or a magnet: link, of the media to pull."
      },
      "type": {
       "enum": [
        "video",
        "audio",
        "image",
        "magnet",
        "auto"
       ],
       "type": "string",
       "default": "auto"
      },
      "filename": {
       "type": "string",
       "maxLength": 200
      }
     }
    },
    "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": "<binary stream>"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-media-download-url-magnet-to-binary-111bb5d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
