
CustomGPT.ai gives developers two command-line examples for checking project stats and traffic reports from the RAG API. Use Quota.py for project statistics from the /stats endpoint, and use user_count.py for traffic reports from the /reports/traffic endpoint.
In this developer blog post, we explore two command-line tools provided by CustomGPT.ai: Quota.py and user_count.py. These tools are designed to streamline project management and enhance analytics capabilities, offering developers deeper insights into their chatbot applications.
Build usage reporting into your RAG API workflow
Use CustomGPT.ai’s RAG API endpoints for project stats and traffic reports, then connect those signals to the analytics stack your team already uses.
Quota.py: Monitoring Project Statistics
The Quota RAG API script enables developers to fetch project statistics about their CustomGPT.ai projects. For broader API setup context, see the CustomGPT.ai RAG API page. By utilizing this RAG API, users can retrieve project-level data such as:
- Usage Data: Project-level statistics returned by the
/statsendpoint. - Project Statistics: JSON output that helps developers inspect the fields returned for a specific project.
- Resource Planning: A command-line starting point for reviewing project stats before deeper analytics work.
The purpose of this script is to retrieve and display comprehensive project statistics, aiding developers in monitoring and optimizing their CustomGPT.ai chatbot projects directly from the command line.
Quota.py command line tool Functionality
This script fetches project statistics from CustomGPT.ai for a specific project. It asks the user to enter their RAG API key and project ID. Using this information, the script sends a request to CustomGPT.ai’s RAG API /stats endpoint.

The RAG API returns project statistics for the specified project. Finally, the script prints the JSON response so users can inspect the available stats directly from the command line.
Execute the Script in the Command line
To execute the script in the command line, first download the script from the CustomGPT.ai cookbook.
- Open the command line interface and use the cd command (change directory) to navigate to the directory where the script quota.py is saved.

- Once you are in the correct directory containing quota.py, execute the script by typing the following command.

- When prompted by the script, enter your CustomGPT.ai’s RAG API key and project ID as requested.

- After providing the RAG API key and project ID, the script will send a request to CustomGPT.ai’s RAG API to fetch project statistics. The API’s JSON response will be displayed in the command line interface.

The script will print out the JSON-formatted response from the API, showing the project statistics returned by the endpoint.
Analyze this information to understand the project-level stats available through the CustomGPT.ai RAG API.
Traffic API: Analyzing Usage Patterns
The Traffic RAG API script provides developers with insights into the traffic and usage patterns of their chatbot applications. Key functionalities include:
- Traffic Reports: Detailed analytics on user interactions, session durations, and peak usage times.
- User Behavior Analysis: Understanding how users engage with the chatbot, including popular prompts and conversation flows.
- Real-Time Monitoring: Continuously monitor traffic trends to adapt chatbot strategies and improve user experience.
The purpose of this script is to allow developers to access and analyze traffic reports, enabling informed decisions and optimizations based on real-time user interactions and usage patterns.
User_count.py command line Functionality
This script is designed to retrieve traffic reports from CustomGPT.ai for a specific chatbot project. It starts by prompting the user to input their CustomGPT.ai RAG API key and the project ID they want to fetch traffic reports. Using this information, the script constructs a URL that targets CustomGPT.ai’s RAG API endpoint for traffic reports. It then sends a GET request to this URL, including the RAG API key for authentication in the request headers.

Once the request is processed by CustomGPT.ai’s API, it returns a response containing detailed traffic metrics in JSON format. These metrics typically include information such as the number of interactions, session durations, and other traffic-related data relevant to the specified project.
Finally, the script prints out this JSON-formatted response to the console, allowing users to view and analyze the traffic reports directly from their command line interface. This provides developers and project managers with valuable insights into how their chatbot project is performing and being utilized by users over time.
Execute the Script in the Command line
To run the script in the command line download the user_count.py from the CustomGPT.ai cookbook.
- Open the command line interface and use the cd command to navigate to the directory where the script is saved.
- Once you are in the correct directory containing the script, execute the script by typing the file name.

- When prompted by the script, enter your CustomGPT.ai RAG API key and project ID as requested.

- The API’s response, containing detailed traffic metrics in JSON format, will be displayed in the command line interface.
By following these steps, you can successfully execute the user_count.py script from the command line interface and retrieve valuable traffic reports from CustomGPT.ai for your project. This allows you to monitor and optimize your chatbot’s performance based on real-time usage metrics.
Conclusion
In this article, we’ve explored Quota.py and user_count.py, two command-line examples for checking CustomGPT.ai RAG API project data. Quota.py helps developers inspect project statistics from the /stats endpoint, while user_count.py retrieves traffic reports from the /reports/traffic endpoint. Together, they give developers a practical starting point for reviewing usage signals from the command line.
Frequently Asked Questions
Which CustomGPT API endpoints are used to pull usage analytics?
The linked examples use two CustomGPT.ai RAG API endpoints: /api/v1/projects/{project_id}/stats for project statistics and /api/v1/projects/{project_id}/reports/traffic for traffic reports. Both examples require a RAG API key and a project ID.
What built-in tools can you use to monitor CustomGPT API usage?
You can start with two command-line tools: quota.py and user_count.py. They are presented as the core tools for streamlining project management and improving analytics visibility for chatbot applications.
How can traffic reports help you improve chatbot performance?
Traffic reports help you identify usage patterns and evaluate how the chatbot is performing against real traffic. Use those signals to prioritize improvements where usage is highest or performance is weakest.
What does quota.py provide for resource planning?
quota.py calls the project /stats endpoint and prints the JSON response for the selected project. Use that response as a starting point for reviewing project-level usage data, then layer in your own analytics workflow if you need broader reporting.
What metrics are explicitly available through quota.py?
The linked quota.py example prints the raw JSON returned by the project /stats endpoint. Treat the response fields as project-statistics data from the API — not as a full product analytics dashboard or traffic report.
Should you rely only on quota.py and user_count.py for analytics?
For CustomGPT API usage analysis, these are the documented built-in tools and endpoints to start with. If you need broader product analytics beyond API usage, add your own analytics stack alongside them based on your team’s requirements.