Overview
This guide will help you set up and run APITHON quickly. In less than 5 minutes, you’ll have a working API gateway for protocol analysis.Make sure you have Python 3.x installed before proceeding. Check your version with
python --versionQuick Setup
Install Dependencies
Install the required Python packages for APITHON:Then install the Chromium browser for Playwright automation:
Run APITHON
Launch the script to start the interception process:You’ll see the APITHON ASCII art banner confirming the script has started:
Enter Target URL
When prompted, enter the URL of the service you want to analyze:A Chromium browser window will open automatically. APITHON will:
You can enter the URL with or without
https:// - APITHON will automatically add it if missing (apithon.py:55-56)- Navigate to the target URL
- Detect the input interface
- Send an automated validation signal (
.) - Capture session tokens and protocol structure
Select Operating Mode
Choose your preferred mode:For this quickstart, select option 1 (Gateway Mode).
Configure Network Scope
Choose where the API will be accessible:
The Flask server will start and display a comprehensive tutorial with platform-specific commands.
Network Scope Options
Network Scope Options
- L (Localhost): API only accessible from
127.0.0.1- secure for local testing - N (LAN): API exposed on
0.0.0.0- accessible from other devices on your network
Make Your First API Request
APITHON will display the exact curl command for your platform. Here’s an example for Linux/Bash:
Understanding the Endpoint
API Endpoint Structure
Required Headers
| Header | Value | Purpose |
|---|---|---|
Content-Type | application/json | Specifies JSON payload |
Authorization | Bearer UnHackerEnCapital | API authentication (apithon.py:29) |
Request Body Format
APITHON extracts the last message content from the messages array (
apithon.py:137)Response Format
Successful response (HTTP 200):Platform-Specific Notes
Windows PowerShell
Windows PowerShell
PowerShell has a built-in
curl alias that points to Invoke-WebRequest. APITHON automatically generates commands using curl.exe to use the native curl binary (apithon.py:151).Always use curl.exe instead of curl in PowerShell for proper behavior.Windows CMD
Windows CMD
CMD requires specific JSON escaping. APITHON generates the correct escape sequences automatically (
apithon.py:154).Linux/Bash
Linux/Bash
Bash commands use single quotes for the JSON payload and backslash line continuation for readability (
apithon.py:157-160).What’s Happening Behind the Scenes?
When you make an API request:- Flask receives your request at
/v1/chat/completions(apithon.py:132) - Authentication validates your Bearer token (
apithon.py:134-136) - Message extraction pulls the user content from the messages array (
apithon.py:137) - Protocol translation converts your request to the target service’s internal format (
apithon.py:103-129) - Request execution sends the translated request with captured session tokens (
apithon.py:123) - Response parsing extracts the reply using regex patterns (
apithon.py:124-126) - JSON formatting returns the response in OpenAI-compatible format (
apithon.py:139)
Next Steps
Installation Guide
Detailed installation instructions and troubleshooting tips
Introduction
Learn more about APITHON’s architecture and use cases
Stopping APITHON
To stop the gateway server, pressCtrl+C in the terminal: