CANCEL 100% Of Your Monthly AI Automation Subscriptions
How to Build Your Own API Toolkit on Google Cloud
Introduction to Building an API
- The video introduces a method to eliminate monthly API service costs by building a custom API deployed on Google Cloud.
- Various tools like Leonardo, 11 Labs, and ChatGPT are mentioned as common automation aids that can become costly over time.
- The speaker highlights the issue of high costs associated with using multiple APIs for specific functions in automations.
Benefits of Creating Your Own API
- By creating a personal API, users can run necessary services at a lower cost while eliminating reliance on expensive third-party APIs.
- The speaker emphasizes the ability to identify and replicate commonly used functions within their own toolkit over time.
Features of the Custom API Toolkit
- The toolkit includes modules for converting media to MP3, transcribing larger files, and combining videos.
- Future developments will focus on additional functionalities such as audio mixing and uploading large files to Google Drive.
Understanding APIs
- An explanation is provided about what an API is: essentially a server with code that processes requests and returns responses.
- The speaker discusses how existing APIs charge fees for access, contrasting this with the potential savings from developing one's own.
Deployment Process Overview
- A step-by-step guide will be provided for deploying the custom API toolkit on Google Cloud and integrating it with Make.com.
- Users are encouraged to join the No Code Architects community for beta access to modules and templates related to this project.
Getting Started with Google Cloud
- Before calling the new API through Make.com or HTTP modules, users must deploy their service on Google Cloud.
Setting Up Google APIs and Service Accounts
Enabling Google APIs
- The process begins by ensuring the Google Drive API is enabled. Navigate to the library, search for "Google Drive API," and click "Enable" if it isn't already activated.
- Next, return to the library to enable the Google Run Admin API by searching for it and clicking "Enable."
Creating a Service Account
- A new service account named "NCA toolkit service account" is created. After naming, select a role of "Storage Admin" which grants full control over buckets and objects.
- An additional role of "Viewer" is added before finalizing the creation of the service account.
- Access keys are generated by navigating to keys in the service account settings, creating a new key in JSON format, which will be downloaded automatically.
Setting Up Cloud Storage Bucket
- A new bucket named "NCA tool kit bucket" is created using default multi-region settings. This bucket will store files created via the API.
- Public access prevention is turned off on this bucket to allow public access to stored files later on.
- Permissions are updated by granting access to all users as storage object viewers, confirming that resources will be made public.
Deploying Container on Cloud Run
- The deployment process begins in Cloud Run where a container image is selected. It's crucial to copy the exact image string provided during setup.
- A service name like “no code architect toolkit-demo” should be chosen for clarity and organization within your projects.
Configuring Deployment Settings
- For CPU allocation, select “Always” while keeping autoscaling at zero initially. Adjust memory settings up to 4 GB based on testing needs.
- Set maximum concurrent requests per instance to one and leave other execution environment settings unchanged for simplicity.
Adding Environment Variables
- Essential variables such as API key (e.g., test 1 2 3), GCP bucket name (copied from earlier steps), storage path (set as GCP), and credentials from the downloaded JSON file need to be configured here.
Deploying Your API with Docker Hub
Overview of Deployment
- The code for deploying the API is hosted on Docker Hub, which provides a direct URL for downloading and deploying the package. This service is free, but users must pay for their server on Google Cloud.
Testing the API with Postman
- After deployment, testing can be conducted using Postman, a recommended free application for simulating API calls.
- A new request tab in Postman allows users to create POST requests easily by entering the appropriate URL.
Making API Calls
- To test the transcribe endpoint, append
/transcribeto the base URL and set up headers includingX API key, using "test 123" as an example key.
- A media URL must be provided in JSON format; it should point to a public file (e.g., a video from Google Drive).
Handling Responses
- Upon sending the request, if successful, a response will indicate success along with the transcript of the video sent. Ensure that test files are under 25 MB to avoid issues during testing.
Generating MP3 Files from Video
Modifying Requests for Different Outputs
- The next step involves modifying requests to convert media files into MP3 format instead of generating transcripts.
- The generated MP3 file will be saved in Google Cloud Storage as previously configured.
Accessing Generated Files
- Successful conversion returns a URL linking directly to the generated MP3 file, allowing easy access through any web browser.
Integrating Remote APIs with Make.com
Using Make.com Modules
- After confirming both endpoints work correctly, attention shifts to how remote APIs can be called within Make.com using built-in modules currently in beta.
Manual HTTP Module Setup
- Users can still make API calls without these modules by utilizing an HTTP module where they input similar information as used in Postman.
Configuring Requests in Make.com
How to Use the No Code Architects Toolkit API
Converting Video to MP3
- The process begins by updating the parse response, confirming that clicking "okay" will trigger a module that calls a media URL, returning an MP3 file.
- The video is successfully converted into an MP3 format, allowing for further modifications or additional modules to be added for processing the audio file.
Utilizing No Code Architects Toolkit
- The speaker discusses deleting the HTTP module in favor of using the no code Architects toolkit API, which simplifies module creation and access to various endpoints.
- New connections can be created easily within the toolkit, requiring an X API key and specific toolkit URL from a deployed server.
Running Modules with New Connections
- After setting up a new connection with the media URL, running this module yields a success message along with the new MP3 output.
- Users can directly play the generated MP3 in their browser, demonstrating ease of access and functionality.
Advanced Features: Transcription and Merging
- The toolkit also supports transcribing media files and merging videos—useful for creating faceless videos that combine multiple elements seamlessly.
- A webhook feature allows users to handle long processing times effectively by sending notifications once tasks are completed.
Setting Up Webhooks in Airtable
- A basic Airtable database is introduced for tracking requests made through the API. Key fields include request ID, endpoint text field, response details, and timestamps.
Creating and Updating Records in Airtable
Adding New Records
- The process involves creating a new record and updating it within the table, including fields such as ID, response code, and message.
- When running this setup, logs will show the media type (e.g., MP3), along with the ID sent (demo 123), confirming successful data retrieval.
Transcribing Media
- The next step is to transcribe media using a specified URL; users can also create an SRT file for subtitles.
- The webhook processes messages immediately without waiting for Make to complete its processing, allowing for efficient data handling.
Combining Videos and Handling Logs
Merging Video Clips
- Users can add multiple video URLs to merge them into one file. This feature enhances content creation by simplifying video editing tasks.
- After running the module, logs will display both the transcription results and combined video status. Processing time may vary based on server resources.
Monitoring Outputs
- Users should monitor logs for updates on combined videos; processing may take longer than other tasks due to resource allocation.
- Final output verification shows that merged clips maintain expected durations and quality.
API Functions and Automation Toolkit
Focused API Development
- The goal is not to replace all APIs but rather isolate essential functions that enhance AI automation while reducing costs.
- Collaboration within a community allows for identifying beneficial functions that can be developed further into a toolkit.
Community Engagement
- Early access to tools like Make.com’s No Code Architects toolkit is available for community members seeking support in automations.