80trust / 100
Download
by StableTube in Documents & files
x402 APIPassing, checked 19 min ago
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.
POST https://stabletube.dev/api/download
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 535 ms typical, 619 ms slowest 5%
- Last check
- 19 min ago
- Next check
- in 12 min
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://stabletube.dev/api/download" \
-H "content-type: application/json" \
-d '{"format":"mp4","quality":"720p","tier":"tube-500mb","type":"stabletube.download","url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fstabletube.dev%2Fapi%2Fdownload
const res = await pay("https://stabletube.dev/api/download", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"format":"mp4","quality":"720p","tier":"tube-500mb","type":"stabletube.download","url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}),
});
console.log(await res.json());Example input
{
"format": "mp4",
"quality": "720p",
"tier": "tube-500mb",
"type": "stabletube.download",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}Example output
{
"contentLengthBytes": 23456789,
"downloadUrl": "https://stabletube-bucket.s3.us-east-1.amazonaws.com/...",
"durationSec": 213,
"expiresAt": "2026-05-04T18:00:00.000Z",
"format": "mp4",
"jobId": "clxstabletubejob123",
"maxBytes": 524288000,
"mimeType": "video/mp4; codecs=\"avc1.64001F, mp4a.40.2\"",
"price": "0.10",
"quality": "720p",
"status": "complete",
"tier": "tube-500mb",
"title": "Rick Astley - Never Gonna Give You Up (Official Video)",
"videoId": "dQw4w9WgXcQ"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 19 min ago | Passed | 402 | 482 ms | $0.1 |
| 4 h ago | Passed | 402 | 481 ms | $0.1 |
| 7 h ago | Passed | 402 | 565 ms | $0.1 |
| 11 h ago | Passed | 402 | 535 ms | $0.1 |
| 15 h ago | Passed | 402 | 517 ms | $0.1 |
| 19 h ago | Passed | 402 | 626 ms | $0.1 |
| 22 h ago | Passed | 402 | 545 ms | $0.1 |
| 26 h ago | Passed | 402 | 493 ms | $0.1 |
| 29 h ago | Passed | 402 | 598 ms | $0.1 |
| 32 h ago | Passed | 402 | 619 ms | $0.1 |
| 38 h ago | Passed | 402 | 449 ms | $0.1 |