From ea4c49b7817884b6b52fa1a35ed98c186a79c451 Mon Sep 17 00:00:00 2001 From: "debian.StillHammer" Date: Mon, 8 Dec 2025 12:13:54 +0000 Subject: [PATCH] Update API documentation port from 8888 to 3001 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed all localhost:8888 references to localhost:3001 - Reflects actual server configuration (PORT=3001 in .env) - 32 occurrences updated throughout the documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs/API.md | 64 ++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/API.md b/docs/API.md index 1a6fd20..d90c4c8 100644 --- a/docs/API.md +++ b/docs/API.md @@ -2,7 +2,7 @@ ## Base URL ``` -http://localhost:8888 +http://localhost:3001 ``` ## 🔐 Authentication @@ -15,12 +15,12 @@ Include your API token in **one** of these ways: **Option 1: X-API-Key header (Recommended)** ```bash -curl -H "X-API-Key: your_api_token_here" http://localhost:8888/endpoint +curl -H "X-API-Key: your_api_token_here" http://localhost:3001/endpoint ``` **Option 2: Authorization Bearer header** ```bash -curl -H "Authorization: Bearer your_api_token_here" http://localhost:8888/endpoint +curl -H "Authorization: Bearer your_api_token_here" http://localhost:3001/endpoint ``` ### Configuration @@ -131,10 +131,10 @@ Public endpoint to download files without authentication. **Example:** ```bash # Direct download (no auth needed) -curl -O http://localhost:8888/public/download/my_video.mp3 +curl -O http://localhost:3001/public/download/my_video.mp3 # Or simply open in browser -http://localhost:8888/public/download/my_video.mp3 +http://localhost:3001/public/download/my_video.mp3 ``` **Response (Success):** @@ -179,7 +179,7 @@ Get information about a YouTube video or playlist. **Example:** ```bash curl -H "X-API-Key: your_token" \ - "http://localhost:8888/info?url=https://www.youtube.com/watch?v=VIDEO_ID" + "http://localhost:3001/info?url=https://www.youtube.com/watch?v=VIDEO_ID" ``` **Response:** @@ -208,7 +208,7 @@ Download YouTube video(s) to MP3 with Server-Sent Events (SSE) progress updates. **Example:** ```bash curl -H "X-API-Key: your_token" \ - "http://localhost:8888/download-stream?url=https://www.youtube.com/watch?v=VIDEO_ID" + "http://localhost:3001/download-stream?url=https://www.youtube.com/watch?v=VIDEO_ID" ``` **SSE Events:** @@ -232,7 +232,7 @@ Download YouTube video(s) to MP3 (non-streaming). **Example:** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/download \ + -X POST http://localhost:3001/download \ -H "Content-Type: application/json" \ -d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}' ``` @@ -282,7 +282,7 @@ Transcribe an existing audio file. **Example:** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/transcribe \ + -X POST http://localhost:3001/transcribe \ -H "Content-Type: application/json" \ -d '{ "filePath": "./output/audio.mp3", @@ -313,7 +313,7 @@ Upload and transcribe audio files. **Example:** ```bash -curl -X POST http://localhost:8888/upload-transcribe \ +curl -X POST http://localhost:3001/upload-transcribe \ -F "files=@audio1.mp3" \ -F "files=@audio2.mp3" \ -F "language=en" \ @@ -350,7 +350,7 @@ Download + Transcribe with SSE progress updates. **Example:** ```bash -curl "http://localhost:8888/process-stream?url=https://www.youtube.com/watch?v=VIDEO_ID&language=en&model=gpt-4o-mini-transcribe" +curl "http://localhost:3001/process-stream?url=https://www.youtube.com/watch?v=VIDEO_ID&language=en&model=gpt-4o-mini-transcribe" ``` **SSE Events:** @@ -377,7 +377,7 @@ Download + Transcribe (non-streaming). **Example:** ```bash -curl -X POST http://localhost:8888/process \ +curl -X POST http://localhost:3001/process \ -H "Content-Type: application/json" \ -d '{ "url": "https://www.youtube.com/watch?v=VIDEO_ID", @@ -430,7 +430,7 @@ This endpoint intelligently handles whatever you send it! **Example 1: Upload video files** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/upload-process \ + -X POST http://localhost:3001/upload-process \ -F "files=@meeting.mp4" \ -F "files=@interview.avi" \ -F "language=en" \ @@ -440,7 +440,7 @@ curl -H "X-API-Key: your_token" \ **Example 2: Upload audio files** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/upload-process \ + -X POST http://localhost:3001/upload-process \ -F "files=@podcast.mp3" \ -F "files=@lecture.wav" \ -F "language=fr" @@ -449,7 +449,7 @@ curl -H "X-API-Key: your_token" \ **Example 3: Process YouTube URL** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/upload-process \ + -X POST http://localhost:3001/upload-process \ -F "url=https://www.youtube.com/watch?v=VIDEO_ID" \ -F "language=en" ``` @@ -457,7 +457,7 @@ curl -H "X-API-Key: your_token" \ **Example 4: Mixed - Files AND URL** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/upload-process \ + -X POST http://localhost:3001/upload-process \ -F "files=@local_video.mp4" \ -F "url=https://www.youtube.com/watch?v=VIDEO_ID" \ -F "language=en" @@ -531,7 +531,7 @@ Upload video or audio files and convert them to MP3 format. **Example:** ```bash curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/convert-to-mp3 \ + -X POST http://localhost:3001/convert-to-mp3 \ -F "files=@video.mp4" \ -F "files=@another_video.avi" \ -F "bitrate=320k" \ @@ -572,7 +572,7 @@ Get list of supported video and audio formats for conversion. **Example:** ```bash curl -H "X-API-Key: your_token" \ - http://localhost:8888/supported-formats + http://localhost:3001/supported-formats ``` **Response:** @@ -621,7 +621,7 @@ Translate text. **Example:** ```bash -curl -X POST http://localhost:8888/translate \ +curl -X POST http://localhost:3001/translate \ -H "Content-Type: application/json" \ -d '{ "text": "Hello, how are you?", @@ -652,7 +652,7 @@ Translate uploaded text files. **Example:** ```bash -curl -X POST http://localhost:8888/translate-file \ +curl -X POST http://localhost:3001/translate-file \ -F "files=@document.txt" \ -F "targetLang=fr" \ -F "sourceLang=en" @@ -710,7 +710,7 @@ Summarize text using GPT-5.1. **Example:** ```bash -curl -X POST http://localhost:8888/summarize \ +curl -X POST http://localhost:3001/summarize \ -H "Content-Type: application/json" \ -d '{ "text": "Long article content...", @@ -743,7 +743,7 @@ Summarize uploaded text files using GPT-5.1. **Example:** ```bash -curl -X POST http://localhost:8888/summarize-file \ +curl -X POST http://localhost:3001/summarize-file \ -F "files=@article.txt" \ -F "style=detailed" \ -F "language=same" @@ -782,7 +782,7 @@ Full pipeline: Download -> Transcribe -> Summarize with SSE progress. **Example:** ```bash -curl "http://localhost:8888/summarize-stream?url=https://www.youtube.com/watch?v=VIDEO_ID&style=bullet&model=gpt-4o-mini-transcribe" +curl "http://localhost:3001/summarize-stream?url=https://www.youtube.com/watch?v=VIDEO_ID&style=bullet&model=gpt-4o-mini-transcribe" ``` **SSE Events:** @@ -803,7 +803,7 @@ List all downloaded/generated files. **Example:** ```bash -curl http://localhost:8888/files-list +curl http://localhost:3001/files-list ``` **Response:** @@ -829,7 +829,7 @@ Serve a specific file. **Example:** ```bash -curl http://localhost:8888/files/video.mp3 --output video.mp3 +curl http://localhost:3001/files/video.mp3 --output video.mp3 ``` --- @@ -892,14 +892,14 @@ Upload YouTube cookies file to enable authentication bypass for bot detection. curl -X POST \ -H "X-API-Key: your_api_token" \ -F "cookies=@youtube-cookies.txt" \ - http://localhost:8888/admin/upload-cookies + http://localhost:3001/admin/upload-cookies ``` **Example (Using the automation script):** ```bash # Extract cookies from browser and upload automatically export API_TOKEN="your_api_token" -export API_URL="http://localhost:8888" +export API_URL="http://localhost:3001" ./extract-and-upload-cookies.sh ``` @@ -942,7 +942,7 @@ Use the provided `extract-and-upload-cookies.sh` script: ```bash # Set your API credentials export API_TOKEN="your_api_token" -export API_URL="http://localhost:8888" +export API_URL="http://localhost:3001" # Run the script - it will auto-detect your browser ./extract-and-upload-cookies.sh @@ -973,7 +973,7 @@ The script will: curl -X POST \ -H "X-API-Key: your_api_token" \ -F "cookies=@youtube-cookies.txt" \ - http://localhost:8888/admin/upload-cookies + http://localhost:3001/admin/upload-cookies ``` ### Cookie Storage @@ -1073,13 +1073,13 @@ Before deploying to production: ```bash # Download endpoint curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/download \ + -X POST http://localhost:3001/download \ -H "Content-Type: application/json" \ -d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}' # Transcribe endpoint curl -H "X-API-Key: your_token" \ - -X POST http://localhost:8888/transcribe \ + -X POST http://localhost:3001/transcribe \ -H "Content-Type: application/json" \ -d '{"filePath":"./output/audio.mp3"}' ``` @@ -1087,7 +1087,7 @@ curl -H "X-API-Key: your_token" \ **Using Authorization Bearer:** ```bash curl -H "Authorization: Bearer your_token" \ - -X POST http://localhost:8888/summarize \ + -X POST http://localhost:3001/summarize \ -H "Content-Type: application/json" \ -d '{"text":"Long text to summarize..."}' ```