Update API documentation port from 8888 to 3001
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
eb69e8b063
commit
ea4c49b781
64
docs/API.md
64
docs/API.md
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Base URL
|
## Base URL
|
||||||
```
|
```
|
||||||
http://localhost:8888
|
http://localhost:3001
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🔐 Authentication
|
## 🔐 Authentication
|
||||||
@ -15,12 +15,12 @@ Include your API token in **one** of these ways:
|
|||||||
|
|
||||||
**Option 1: X-API-Key header (Recommended)**
|
**Option 1: X-API-Key header (Recommended)**
|
||||||
```bash
|
```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**
|
**Option 2: Authorization Bearer header**
|
||||||
```bash
|
```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
|
### Configuration
|
||||||
@ -131,10 +131,10 @@ Public endpoint to download files without authentication.
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
# Direct download (no auth needed)
|
# 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
|
# Or simply open in browser
|
||||||
http://localhost:8888/public/download/my_video.mp3
|
http://localhost:3001/public/download/my_video.mp3
|
||||||
```
|
```
|
||||||
|
|
||||||
**Response (Success):**
|
**Response (Success):**
|
||||||
@ -179,7 +179,7 @@ Get information about a YouTube video or playlist.
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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:**
|
**Response:**
|
||||||
@ -208,7 +208,7 @@ Download YouTube video(s) to MP3 with Server-Sent Events (SSE) progress updates.
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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:**
|
**SSE Events:**
|
||||||
@ -232,7 +232,7 @@ Download YouTube video(s) to MP3 (non-streaming).
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
curl -H "X-API-Key: your_token" \
|
||||||
-X POST http://localhost:8888/download \
|
-X POST http://localhost:3001/download \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}'
|
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}'
|
||||||
```
|
```
|
||||||
@ -282,7 +282,7 @@ Transcribe an existing audio file.
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
curl -H "X-API-Key: your_token" \
|
||||||
-X POST http://localhost:8888/transcribe \
|
-X POST http://localhost:3001/transcribe \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"filePath": "./output/audio.mp3",
|
"filePath": "./output/audio.mp3",
|
||||||
@ -313,7 +313,7 @@ Upload and transcribe audio files.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8888/upload-transcribe \
|
curl -X POST http://localhost:3001/upload-transcribe \
|
||||||
-F "files=@audio1.mp3" \
|
-F "files=@audio1.mp3" \
|
||||||
-F "files=@audio2.mp3" \
|
-F "files=@audio2.mp3" \
|
||||||
-F "language=en" \
|
-F "language=en" \
|
||||||
@ -350,7 +350,7 @@ Download + Transcribe with SSE progress updates.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```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:**
|
**SSE Events:**
|
||||||
@ -377,7 +377,7 @@ Download + Transcribe (non-streaming).
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8888/process \
|
curl -X POST http://localhost:3001/process \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
|
"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**
|
**Example 1: Upload video files**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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=@meeting.mp4" \
|
||||||
-F "files=@interview.avi" \
|
-F "files=@interview.avi" \
|
||||||
-F "language=en" \
|
-F "language=en" \
|
||||||
@ -440,7 +440,7 @@ curl -H "X-API-Key: your_token" \
|
|||||||
**Example 2: Upload audio files**
|
**Example 2: Upload audio files**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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=@podcast.mp3" \
|
||||||
-F "files=@lecture.wav" \
|
-F "files=@lecture.wav" \
|
||||||
-F "language=fr"
|
-F "language=fr"
|
||||||
@ -449,7 +449,7 @@ curl -H "X-API-Key: your_token" \
|
|||||||
**Example 3: Process YouTube URL**
|
**Example 3: Process YouTube URL**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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 "url=https://www.youtube.com/watch?v=VIDEO_ID" \
|
||||||
-F "language=en"
|
-F "language=en"
|
||||||
```
|
```
|
||||||
@ -457,7 +457,7 @@ curl -H "X-API-Key: your_token" \
|
|||||||
**Example 4: Mixed - Files AND URL**
|
**Example 4: Mixed - Files AND URL**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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 "files=@local_video.mp4" \
|
||||||
-F "url=https://www.youtube.com/watch?v=VIDEO_ID" \
|
-F "url=https://www.youtube.com/watch?v=VIDEO_ID" \
|
||||||
-F "language=en"
|
-F "language=en"
|
||||||
@ -531,7 +531,7 @@ Upload video or audio files and convert them to MP3 format.
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
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=@video.mp4" \
|
||||||
-F "files=@another_video.avi" \
|
-F "files=@another_video.avi" \
|
||||||
-F "bitrate=320k" \
|
-F "bitrate=320k" \
|
||||||
@ -572,7 +572,7 @@ Get list of supported video and audio formats for conversion.
|
|||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "X-API-Key: your_token" \
|
curl -H "X-API-Key: your_token" \
|
||||||
http://localhost:8888/supported-formats
|
http://localhost:3001/supported-formats
|
||||||
```
|
```
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
@ -621,7 +621,7 @@ Translate text.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8888/translate \
|
curl -X POST http://localhost:3001/translate \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"text": "Hello, how are you?",
|
"text": "Hello, how are you?",
|
||||||
@ -652,7 +652,7 @@ Translate uploaded text files.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8888/translate-file \
|
curl -X POST http://localhost:3001/translate-file \
|
||||||
-F "files=@document.txt" \
|
-F "files=@document.txt" \
|
||||||
-F "targetLang=fr" \
|
-F "targetLang=fr" \
|
||||||
-F "sourceLang=en"
|
-F "sourceLang=en"
|
||||||
@ -710,7 +710,7 @@ Summarize text using GPT-5.1.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8888/summarize \
|
curl -X POST http://localhost:3001/summarize \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"text": "Long article content...",
|
"text": "Long article content...",
|
||||||
@ -743,7 +743,7 @@ Summarize uploaded text files using GPT-5.1.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl -X POST http://localhost:8888/summarize-file \
|
curl -X POST http://localhost:3001/summarize-file \
|
||||||
-F "files=@article.txt" \
|
-F "files=@article.txt" \
|
||||||
-F "style=detailed" \
|
-F "style=detailed" \
|
||||||
-F "language=same"
|
-F "language=same"
|
||||||
@ -782,7 +782,7 @@ Full pipeline: Download -> Transcribe -> Summarize with SSE progress.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```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:**
|
**SSE Events:**
|
||||||
@ -803,7 +803,7 @@ List all downloaded/generated files.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```bash
|
||||||
curl http://localhost:8888/files-list
|
curl http://localhost:3001/files-list
|
||||||
```
|
```
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
@ -829,7 +829,7 @@ Serve a specific file.
|
|||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
```bash
|
```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 \
|
curl -X POST \
|
||||||
-H "X-API-Key: your_api_token" \
|
-H "X-API-Key: your_api_token" \
|
||||||
-F "cookies=@youtube-cookies.txt" \
|
-F "cookies=@youtube-cookies.txt" \
|
||||||
http://localhost:8888/admin/upload-cookies
|
http://localhost:3001/admin/upload-cookies
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example (Using the automation script):**
|
**Example (Using the automation script):**
|
||||||
```bash
|
```bash
|
||||||
# Extract cookies from browser and upload automatically
|
# Extract cookies from browser and upload automatically
|
||||||
export API_TOKEN="your_api_token"
|
export API_TOKEN="your_api_token"
|
||||||
export API_URL="http://localhost:8888"
|
export API_URL="http://localhost:3001"
|
||||||
./extract-and-upload-cookies.sh
|
./extract-and-upload-cookies.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -942,7 +942,7 @@ Use the provided `extract-and-upload-cookies.sh` script:
|
|||||||
```bash
|
```bash
|
||||||
# Set your API credentials
|
# Set your API credentials
|
||||||
export API_TOKEN="your_api_token"
|
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
|
# Run the script - it will auto-detect your browser
|
||||||
./extract-and-upload-cookies.sh
|
./extract-and-upload-cookies.sh
|
||||||
@ -973,7 +973,7 @@ The script will:
|
|||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "X-API-Key: your_api_token" \
|
-H "X-API-Key: your_api_token" \
|
||||||
-F "cookies=@youtube-cookies.txt" \
|
-F "cookies=@youtube-cookies.txt" \
|
||||||
http://localhost:8888/admin/upload-cookies
|
http://localhost:3001/admin/upload-cookies
|
||||||
```
|
```
|
||||||
|
|
||||||
### Cookie Storage
|
### Cookie Storage
|
||||||
@ -1073,13 +1073,13 @@ Before deploying to production:
|
|||||||
```bash
|
```bash
|
||||||
# Download endpoint
|
# Download endpoint
|
||||||
curl -H "X-API-Key: your_token" \
|
curl -H "X-API-Key: your_token" \
|
||||||
-X POST http://localhost:8888/download \
|
-X POST http://localhost:3001/download \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}'
|
-d '{"url":"https://www.youtube.com/watch?v=VIDEO_ID"}'
|
||||||
|
|
||||||
# Transcribe endpoint
|
# Transcribe endpoint
|
||||||
curl -H "X-API-Key: your_token" \
|
curl -H "X-API-Key: your_token" \
|
||||||
-X POST http://localhost:8888/transcribe \
|
-X POST http://localhost:3001/transcribe \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"filePath":"./output/audio.mp3"}'
|
-d '{"filePath":"./output/audio.mp3"}'
|
||||||
```
|
```
|
||||||
@ -1087,7 +1087,7 @@ curl -H "X-API-Key: your_token" \
|
|||||||
**Using Authorization Bearer:**
|
**Using Authorization Bearer:**
|
||||||
```bash
|
```bash
|
||||||
curl -H "Authorization: Bearer your_token" \
|
curl -H "Authorization: Bearer your_token" \
|
||||||
-X POST http://localhost:8888/summarize \
|
-X POST http://localhost:3001/summarize \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"text":"Long text to summarize..."}'
|
-d '{"text":"Long text to summarize..."}'
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user