{"skill":{"slug":"u2-downloader","displayName":"u2-downloader","summary":"Download YouTube videos by URL in various resolutions using a pay-per-use API with credit-based authentication and no charge on failed downloads.","description":"# YouTube Video Downloader Skill\n\nDownload any YouTube video in various resolutions with a simple command. Supports 360p, 480p, 720p, 1080p, best quality, and audio-only extraction.\n\n## Quick Install\n\nJust tell OpenClaw:\n\n> **\"帮我安装这个 skill：https://clawhub.ai/XJouska/u2-downloader\"**\n\nOpenClaw will ask you for an **API Key**. Follow these steps to get one:\n\n1. Go to [https://u2foru.site](https://u2foru.site) and register an account\n2. Navigate to the **API Keys** page (or visit [https://u2foru.site/?page=apikeys](https://u2foru.site/?page=apikeys))\n3. Click **Generate** to create your API Key (format: `sk-yt-xxxxx`)\n4. Copy the key and paste it to OpenClaw when prompted\n\nThat's it! You're ready to use the skill.\n\n## Usage\n\nOnce installed, just tell OpenClaw what you want. For example:\n\n> \"帮我下载这个 YouTube 视频：https://youtube.com/watch?v=dQw4w9WgXcQ\"\n\n> \"Download this video in 1080p: https://youtube.com/watch?v=xxxxx\"\n\nSupported resolutions: 360p, 480p, 720p (default), 1080p, best, audio-only.\n\n## Authentication\n\nAll API calls require an API Key in the Authorization header:\n\n```\nAuthorization: Bearer sk-yt-xxxxx\n```\n\nGet your API Key at: https://u2foru.site/?page=apikeys\n\n## Endpoints\n\n### POST /api/v1/skill/download\n\nDownload a YouTube video.\n\n**Request:**\n```json\n{\n  \"youtube_url\": \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",\n  \"resolution\": \"720\"\n}\n```\n\n**Parameters:**\n- `youtube_url` (required): YouTube video URL\n- `resolution` (optional): \"360\", \"480\", \"720\", \"1080\", \"best\", \"audio\". Default: \"720\"\n\n**Response (success):**\n```json\n{\n  \"success\": true,\n  \"download_url\": \"https://oss-bucket.aliyuncs.com/skill/abc123/video.mp4\",\n  \"video_title\": \"Video Title\",\n  \"video_duration\": 212,\n  \"file_size\": 52428800,\n  \"resolution\": \"720\",\n  \"processing_time\": 45.2\n}\n```\n\n### GET /api/v1/skill/balance\n\nCheck account status.\n\n**Response:**\n```json\n{\n  \"username\": \"user123\"\n}\n```\n\n### GET /api/v1/skill/health\n\nHealth check (no authentication required).\n\n**Response:**\n```json\n{\n  \"status\": \"healthy\",\n  \"service\": \"YouTube Video Downloader Skill\",\n  \"version\": \"1.0.0\"\n}\n```\n\n## Error Codes\n\n| Code | Meaning |\n|------|---------|\n| 200  | Success |\n| 401  | Invalid or missing API Key |\n| 400  | Invalid request (bad URL, etc.) |\n| 500  | Server error |\n\n## Example (curl)\n\n```bash\n# Download a video\ncurl -X POST https://u2foru.site/api/v1/skill/download \\\n  -H \"Authorization: Bearer sk-yt-xxxxx\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"youtube_url\": \"https://youtube.com/watch?v=dQw4w9WgXcQ\", \"resolution\": \"720\"}'\n```\n\n## Example (Python)\n\n```python\nimport requests\n\nAPI_KEY = \"sk-yt-xxxxx\"\nBASE_URL = \"https://u2foru.site\"\n\n# Download\nresp = requests.post(\n    f\"{BASE_URL}/api/v1/skill/download\",\n    headers={\"Authorization\": f\"Bearer {API_KEY}\"},\n    json={\"youtube_url\": \"https://youtube.com/watch?v=dQw4w9WgXcQ\", \"resolution\": \"720\"}\n)\ndata = resp.json()\nif data[\"success\"]:\n    print(f\"Download URL: {data['download_url']}\")\n```\n","tags":{"latest":"1.0.3"},"stats":{"comments":1,"downloads":908,"installsAllTime":0,"installsCurrent":0,"stars":2,"versions":4},"createdAt":1772014451476,"updatedAt":1778993119925},"latestVersion":{"version":"1.0.3","createdAt":1772028572886,"changelog":"- Simplified and shortened installation and usage instructions.\n- Removed credit pricing and charging details from documentation.\n- Updated API reference: balance response now shows only username; health response excludes credit info.\n- Credit deduction and error details were removed from the example responses and error code table.\n- Content is now more concise, focusing on essential usage and endpoint information.","license":null},"metadata":null,"owner":{"handle":"xjouska","userId":"s17eys7w92v4vkdcjrmysjxd9d83t90z","displayName":"Xiaosen Li","image":"https://avatars.githubusercontent.com/u/149303023?v=4"},"moderation":null}