bened commited on
Commit
56a2ded
·
verified ·
1 Parent(s): 5eb0784

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +311 -0
README.md CHANGED
@@ -6,6 +6,317 @@ colorTo: gray
6
  sdk: docker
7
  pinned: false
8
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
6
  sdk: docker
7
  pinned: false
8
  license: mit
9
+
10
+
11
+
12
+
13
+
14
+
15
+ ---
16
+
17
+ ## API Endpoints
18
+
19
+ Each endpoint is supported by robust payload validation and detailed API documentation to facilitate easy integration and usage.
20
+
21
+ ### Audio
22
+
23
+ - **[`/v1/audio/concatenate`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/audio/concatenate.md)**
24
+ - Combines multiple audio files into a single audio file.
25
+
26
+ ### Code
27
+
28
+ - **[`/v1/code/execute/python`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/code/execute/execute_python.md)**
29
+ - Executes Python code remotely and returns the execution results.
30
+
31
+ ### FFmpeg
32
+
33
+ - **[`/v1/ffmpeg/compose`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/ffmpeg/ffmpeg_compose.md)**
34
+ - Provides a flexible interface to FFmpeg for complex media processing operations.
35
+
36
+ ### Image
37
+
38
+ - **[`/v1/image/convert/video`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/image/convert/image_to_video.md)**
39
+ - Transforms a static image into a video with custom duration and zoom effects.
40
+
41
+ - **[`/v1/image/screenshot/webpage`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/image/screenshot_webpage.md)**
42
+ - Captures screenshots of web pages using Playwright with advanced options like viewport size, device emulation, and custom HTML/CSS/JS injection.
43
+
44
+ ### Media
45
+
46
+ - **[`/v1/media/convert`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_convert.md)**
47
+ - Converts media files from one format to another with customizable codec options.
48
+
49
+ - **[`/v1/media/convert/mp3`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_to_mp3.md)**
50
+ - Converts various media formats specifically to MP3 audio.
51
+
52
+ - **[`/v1/BETA/media/download`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/download.md)**
53
+ - Downloads media content from various online sources using yt-dlp.
54
+
55
+ - **[`/v1/media/feedback`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/feedback.md)**
56
+ - Provides a web interface for collecting and displaying feedback on media content.
57
+
58
+ - **[`/v1/media/transcribe`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/media_transcribe.md)**
59
+ - Transcribes or translates audio/video content from a provided media URL.
60
+
61
+ - **[`/v1/media/silence`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/silence.md)**
62
+ - Detects silence intervals in a given media file.
63
+
64
+ - **[`/v1/media/metadata`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/metadata.md)**
65
+ - Extracts comprehensive metadata from media files including format, codecs, resolution, and bitrates.
66
+
67
+ ### S3
68
+
69
+ - **[`/v1/s3/upload`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/s3/upload.md)**
70
+ - Uploads files to Amazon S3 storage by streaming directly from a URL.
71
+
72
+ ### Toolkit
73
+
74
+ - **[`/v1/toolkit/authenticate`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/authenticate.md)**
75
+ - Provides a simple authentication mechanism to validate API keys.
76
+
77
+ - **[`/v1/toolkit/test`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/test.md)**
78
+ - Verifies that the NCA Toolkit API is properly installed and functioning.
79
+
80
+ - **[`/v1/toolkit/job/status`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/job_status.md)**
81
+ - Retrieves the status of a specific job by its ID.
82
+
83
+ - **[`/v1/toolkit/jobs/status`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/jobs_status.md)**
84
+ - Retrieves the status of all jobs within a specified time range.
85
+
86
+ ### Video
87
+
88
+ - **[`/v1/video/caption`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/caption_video.md)**
89
+ - Adds customizable captions to videos with various styling options.
90
+
91
+ - **[`/v1/video/concatenate`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/concatenate.md)**
92
+ - Combines multiple videos into a single continuous video file.
93
+
94
+ - **[`/v1/video/thumbnail`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/thumbnail.md)**
95
+ - Extracts a thumbnail image from a specific timestamp in a video.
96
+
97
+ - **[`/v1/video/cut`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/cut.md)**
98
+ - Cuts specified segments from a video file with optional encoding settings.
99
+
100
+ - **[`/v1/video/split`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/split.md)**
101
+ - Splits a video into multiple segments based on specified start and end times.
102
+
103
+ - **[`/v1/video/trim`](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/trim.md)**
104
+ - Trims a video by keeping only the content between specified start and end times.
105
+
106
+ ---
107
+
108
+ ## Docker Build and Run
109
+
110
+ ### Build the Docker Image
111
+
112
+ ```bash
113
+ docker build -t no-code-architects-toolkit .
114
+ ```
115
+
116
+ ### General Environment Variables
117
+
118
+ #### `API_KEY`
119
+ - **Purpose**: Used for API authentication.
120
+ - **Requirement**: Mandatory.
121
+
122
+ ---
123
+
124
+ ### S3-Compatible Storage Environment Variables
125
+
126
+ #### `S3_ENDPOINT_URL`
127
+ - **Purpose**: Endpoint URL for the S3-compatible service.
128
+ - **Requirement**: Mandatory if using S3-compatible storage.
129
+
130
+ #### `S3_ACCESS_KEY`
131
+ - **Purpose**: The access key for the S3-compatible storage service.
132
+ - **Requirement**: Mandatory if using S3-compatible storage.
133
+
134
+ #### `S3_SECRET_KEY`
135
+ - **Purpose**: The secret key for the S3-compatible storage service.
136
+ - **Requirement**: Mandatory if using S3-compatible storage.
137
+
138
+ #### `S3_BUCKET_NAME`
139
+ - **Purpose**: The bucket name for the S3-compatible storage service.
140
+ - **Requirement**: Mandatory if using S3-compatible storage.
141
+
142
+ #### `S3_REGION`
143
+ - **Purpose**: The region for the S3-compatible storage service.
144
+ - **Requirement**: Mandatory if using S3-compatible storage, "None" is acceptible for some s3 providers.
145
+
146
+ ---
147
+
148
+ ### Google Cloud Storage (GCP) Environment Variables
149
+
150
+ #### `GCP_SA_CREDENTIALS`
151
+ - **Purpose**: The JSON credentials for the GCP Service Account.
152
+ - **Requirement**: Mandatory if using GCP storage.
153
+
154
+ #### `GCP_BUCKET_NAME`
155
+ - **Purpose**: The name of the GCP storage bucket.
156
+ - **Requirement**: Mandatory if using GCP storage.
157
+
158
+ ---
159
+
160
+ ### Performance Tuning Variables
161
+
162
+ #### `MAX_QUEUE_LENGTH`
163
+ - **Purpose**: Limits the maximum number of concurrent tasks in the queue.
164
+ - **Default**: 0 (unlimited)
165
+ - **Recommendation**: Set to a value based on your server resources, e.g., 10-20 for smaller instances.
166
+
167
+ #### `GUNICORN_WORKERS`
168
+ - **Purpose**: Number of worker processes for handling requests.
169
+ - **Default**: Number of CPU cores + 1
170
+ - **Recommendation**: 2-4× number of CPU cores for CPU-bound workloads.
171
+
172
+ #### `GUNICORN_TIMEOUT`
173
+ - **Purpose**: Timeout (in seconds) for worker processes.
174
+ - **Default**: 30
175
+ - **Recommendation**: Increase for processing large media files (e.g., 300-600).
176
+
177
+ ---
178
+
179
+ ### Storage Configuration
180
+
181
+ #### `LOCAL_STORAGE_PATH`
182
+ - **Purpose**: Directory for temporary file storage during processing.
183
+ - **Default**: /tmp
184
+ - **Recommendation**: Set to a path with sufficient disk space for your expected workloads.
185
+
186
+ ### Notes
187
+ - Ensure all required environment variables are set based on the storage provider in use (GCP or S3-compatible).
188
+ - Missing any required variables will result in errors during runtime.
189
+ - Performance variables can be tuned based on your workload and available resources.
190
+
191
+ ### Run the Docker Container:
192
+
193
+ ```bash
194
+ docker run -d -p 8080:8080 \
195
+ # Authentication (required)
196
+ -e API_KEY=your_api_key \
197
+
198
+ # Cloud storage provider (choose one)
199
+
200
+ # s3
201
+ #
202
+ #-e S3_ENDPOINT_URL=https://nyc3.digitaloceanspaces.com \
203
+ #-e S3_ACCESS_KEY=your_access_key \
204
+ #-e S3_SECRET_KEY=your_secret_key \
205
+ #-e S3_BUCKET_NAME=your_bucket_name \
206
+ #-e S3_REGION=nyc3 \
207
+
208
+ # Or
209
+
210
+ # GCP Storage
211
+ #
212
+ #-e GCP_SA_CREDENTIALS='{"your":"service_account_json"}' \
213
+ #-e GCP_BUCKET_NAME=your_gcs_bucket_name \
214
+
215
+ # Local storage configuration (optional)
216
+ -e LOCAL_STORAGE_PATH=/tmp \
217
+
218
+ # Performance tuning (optional)
219
+ -e MAX_QUEUE_LENGTH=10 \
220
+ -e GUNICORN_WORKERS=4 \
221
+ -e GUNICORN_TIMEOUT=300 \
222
+
223
+ no-code-architects-toolkit
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Installation Guides
229
+
230
+ This API can be deployed to various cloud platforms:
231
+
232
+ ### Digital Ocean
233
+
234
+ The Digital Ocean App platform is pretty easy to set up and get going, but it can cost more then other cloud providers.
235
+
236
+ #### Important: Long running processes
237
+
238
+ You need to use the "webhook_url" (for any request that exceeds 1 min) in your API payload to avoid timeouts due to CloudFlair proxy timeout.
239
+
240
+ If you use the webhook_url, there is no limit to the processing length.
241
+
242
+ - [Digital Ocean App Platform Installation Guide](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/cloud-installation/do.md) - Deploy the API on Digital Ocean App Platform
243
+
244
+ ### Google Cloud RUN Platform
245
+
246
+ Sometimes difficult for people to install (especially on Google Business Workspaces), lots of detailed security exceptions.
247
+
248
+ However this is one of the cheapest options with great performance because you're only charged when the NCA Toolkit is processesing a request.
249
+
250
+ Outside of that you are not charged.
251
+
252
+ #### Imporatnt: Requests exceeding 5+ minutes can be problemactic
253
+
254
+ GCP Run will terminate long rununing processes, which can happen when processing larger files (whether you use the webhook_url or not).
255
+
256
+ However, when your processing times are consistant lower than 5 minutes (e.g. you're only process smaller files), it works great! The performance is also great and as soon as you stop making requests you stop paying.
257
+
258
+ They also have a GPU option that might be usable for better performance (untested).
259
+
260
+ - [Google Cloud RUN Platform (GCP) Installation Guide](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/cloud-installation/gcp.md) - Deploy the API on Google Cloud Run
261
+
262
+ ### General Docker Instructions
263
+
264
+ You can use these instructions to deploy the NCA Toolkit to any linux server (on any platform)
265
+
266
+ You can more easily control performance and cost this way, but requires more technical skill to get up and running (not much though).
267
+
268
+ - [General Docker Compose Installation Guide](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.md)
269
+
270
+ ### Local Development with MinIO and n8n
271
+
272
+ For local development with integrated S3-compatible storage and workflow automation:
273
+
274
+ - [Local Development with MinIO and n8n Guide](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docker-compose.local.minio.n8n.md) - Complete local development environment with MinIO storage and n8n workflow automation
275
+
276
+ ## Testing the API
277
+
278
+ 1. Install the **[Postman Template](https://bit.ly/49Gkh61)** on your computer
279
+ 2. Import the API example requests from the template
280
+ 3. Configure your environment variables in Postman:
281
+ - `base_url`: Your deployed API URL
282
+ - `x-api-key`: Your API key configured during installation
283
+ 4. Use the example requests to validate that the API is functioning correctly
284
+ 5. Use the **[NCA Toolkit API GPT](https://bit.ly/4feDDk4)** to explore additional features
285
+
286
+ ---
287
+
288
+ ## Contributing To the NCA Toolkit API
289
+
290
+ We welcome contributions from the public! If you'd like to contribute to this project, please follow these steps:
291
+
292
+ 1. Fork the repository
293
+ 2. Create a new branch for your feature or bug fix
294
+ 3. Make your changes
295
+ 4. Submit a pull request to the "build" branch
296
+
297
+ ### Pull Request Process
298
+
299
+ 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
300
+ 2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
301
+
302
+ ### Adding New Routes
303
+
304
+ If you want to add new API endpoints, check out our [Adding Routes Guide](docs/adding_routes.md) to learn how to use the dynamic route registration system.
305
+
306
+ Thank you for your contributions!
307
+
308
+ ---
309
+
310
+ ## How To Get Support
311
+
312
+ Get courses, community, support daily calls and more.
313
+
314
+ Join the **[No-Code Architects Community](https://www.skool.com/no-code-architects)** today!
315
+
316
+ ## License
317
+
318
+ This project is licensed under the [GNU General Public License v2.0 (GPL-2.0)](LICENSE).
319
+
320
  ---
321
 
322
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference