Spaces:
Sleeping
Sleeping
fix: update API endpoints in README for consistency and clarity
Browse files
README.md
CHANGED
|
@@ -94,34 +94,36 @@ hf-crowncode-backend/
|
|
| 94 |
| Method | Endpoint | Description |
|
| 95 |
|--------|----------|-------------|
|
| 96 |
| GET | `/api/health` | Health check |
|
| 97 |
-
| POST | `/api/
|
| 98 |
-
| POST | `/api/
|
| 99 |
-
| POST | `/api/data/augment/image` | Image augmentation |
|
| 100 |
| GET | `/api/commend/health` | Crown Commend health check |
|
| 101 |
| POST | `/api/commend/generate` | Generate AI comment for YouTube |
|
| 102 |
-
| POST | `/api/commend/post` | Post comment to YouTube |
|
| 103 |
| GET | `/api/commend/styles` | Get available comment styles |
|
| 104 |
|
| 105 |
-
### POST /api/
|
| 106 |
|
| 107 |
-
Request
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
}
|
| 113 |
-
```
|
| 114 |
|
| 115 |
Response:
|
|
|
|
| 116 |
```json
|
| 117 |
{
|
| 118 |
-
"
|
| 119 |
-
"
|
| 120 |
"confidence": 0.85,
|
| 121 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
},
|
| 123 |
-
"music_ai": { ... },
|
| 124 |
-
"ses_analizi": { ... },
|
| 125 |
"warnings": [],
|
| 126 |
"errors": []
|
| 127 |
}
|
|
@@ -142,6 +144,8 @@ Response:
|
|
| 142 |
| `COMMEND_GEMINI_API_KEY` | - | Gemini API key for Crown Commend (also used as YouTube API Key fallback) |
|
| 143 |
| `COMMEND_YOUTUBE_API_KEY` | - | YouTube Data API key for read operations (optional if Gemini key is set) |
|
| 144 |
| `COMMEND_TOKEN_JSON` | - | YouTube OAuth token JSON for posting comments (optional) |
|
|
|
|
|
|
|
| 145 |
|
| 146 |
---
|
| 147 |
|
|
|
|
| 94 |
| Method | Endpoint | Description |
|
| 95 |
|--------|----------|-------------|
|
| 96 |
| GET | `/api/health` | Health check |
|
| 97 |
+
| POST | `/api/analyze` | Analyze YouTube URL or uploaded file |
|
| 98 |
+
| POST | `/api/process/audio` | Audio augmentation |
|
|
|
|
| 99 |
| GET | `/api/commend/health` | Crown Commend health check |
|
| 100 |
| POST | `/api/commend/generate` | Generate AI comment for YouTube |
|
| 101 |
+
| POST | `/api/commend/post` | Post comment to YouTube (feature-flagged) |
|
| 102 |
| GET | `/api/commend/styles` | Get available comment styles |
|
| 103 |
|
| 104 |
+
### POST /api/analyze
|
| 105 |
|
| 106 |
+
Request (multipart form):
|
| 107 |
+
|
| 108 |
+
- `sourceType`: `youtube` | `file` | `spotify` | `apple`
|
| 109 |
+
- `url`: YouTube URL (when sourceType=youtube)
|
| 110 |
+
- `file`: Audio file upload (when sourceType=file)
|
|
|
|
|
|
|
| 111 |
|
| 112 |
Response:
|
| 113 |
+
|
| 114 |
```json
|
| 115 |
{
|
| 116 |
+
"result": {
|
| 117 |
+
"isAIGenerated": true,
|
| 118 |
"confidence": 0.85,
|
| 119 |
+
"processingTime": 2.1,
|
| 120 |
+
"modelVersion": "preview-v2-enhanced",
|
| 121 |
+
"decisionSource": "preview",
|
| 122 |
+
"analysisMode": "preview",
|
| 123 |
+
"source": { "kind": "youtube", "videoId": "..." },
|
| 124 |
+
"features": { ... },
|
| 125 |
+
"audioInfo": { ... }
|
| 126 |
},
|
|
|
|
|
|
|
| 127 |
"warnings": [],
|
| 128 |
"errors": []
|
| 129 |
}
|
|
|
|
| 144 |
| `COMMEND_GEMINI_API_KEY` | - | Gemini API key for Crown Commend (also used as YouTube API Key fallback) |
|
| 145 |
| `COMMEND_YOUTUBE_API_KEY` | - | YouTube Data API key for read operations (optional if Gemini key is set) |
|
| 146 |
| `COMMEND_TOKEN_JSON` | - | YouTube OAuth token JSON for posting comments (optional) |
|
| 147 |
+
| `COMMEND_API_KEY` | - | API key for commend endpoint auth (optional, disables auth if unset) |
|
| 148 |
+
| `COMMEND_ENABLE_POSTING` | `false` | Enable YouTube comment posting (`true`/`false`) |
|
| 149 |
|
| 150 |
---
|
| 151 |
|