# StableTube YouTube Video Downloader

> StableTube YouTube Video Downloader is a paid API for AI agents from stabletube.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14, last successful call 2026-07-04).

Downloads a YouTube video server-side at a specified quality and returns a temporary S3 URL for the file, billed per call via x402/USDC.

## Facts

- Endpoint: POST https://stabletube.dev/api/download
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Last successful call: 2026-07-04
- Success rate: 98% of calls made through Zero
- Rating: 4.7 / 5 from 2 reviews
- Activations on Zero: 139
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stabletube-youtube-video-downloader-edae78f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_saSXSDLBZdyAIpdZyzIqL

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 stabletube-youtube-video-downloader-edae78f6 -d '<json body>'
```

Example prompt: Download this YouTube video for me at 720p — https://www.youtube.com/watch?v=dQw4w9WgXcQ — use the tube-500mb tier and save it as mp4.

## When to prefer this

Use this endpoint when you need a server-side YouTube download returned as a temporary S3 link without running a local downloader, especially in agent workflows that need a hosted file URL rather than a local file. Prefer this over browser-based tools or client-side solutions when you need a clean API call with predictable pricing per download.

## Known failure modes

- Requested quality (e.g. 1080p) unavailable for the video — returns failure/error
- YouTube URL is invalid or video is private/deleted — request fails
- Size tier exceeded by actual video size — request may fail or be rejected
- Payment not fulfilled via x402 — request blocked
- Network or S3 storage issue on server side — transient error

## How this service works

Create a paid StableTube download job. StableTube downloads the video server-side, uploads the mp4 to S3, and returns a temporary StableTube-owned download URL when ready.

## Output

A temporary S3 URL pointing to the downloaded MP4 video file, which can be accessed for a limited time after the server-side download completes.

## Example request

```json
{
 "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
 "tier": "tube-500mb",
 "type": "stabletube.download",
 "format": "mp4",
 "quality": "720p",
 "clientRequestId": "test-qa-001"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Full YouTube URL of the video to download."
  },
  "tier": {
   "enum": [
    "tube-100mb",
    "tube-500mb",
    "tube-1gb"
   ],
   "type": "string",
   "description": "Required output size tier: tube-100mb (100 MB, $0.05) | tube-500mb (500 MB, $0.10) | tube-1gb (1 GB, $0.20)."
  },
  "type": {
   "type": "string",
   "const": "stabletube.download",
   "default": "stabletube.download"
  },
  "format": {
   "enum": [
    "mp4"
   ],
   "type": "string",
   "default": "mp4",
   "description": "Output container format. mp4 only for now."
  },
  "quality": {
   "enum": [
    "360p",
    "720p",
    "1080p"
   ],
   "type": "string",
   "description": "Required target video quality. The request fails if unavailable."
  },
  "clientRequestId": {
   "type": "string",
   "maxLength": 120,
   "minLength": 1,
   "description": "Optional idempotency key scoped to the paying wallet."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stabletube-youtube-video-downloader-edae78f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stabletube.dev](https://www.zero.xyz/host/stabletube.dev/llms.txt)
