Disclaimer: This project is not officially associated with Hugging Face. It is an independent reverse engineering effort to explore the Hugging Chat API.
🛑 Important Notice:
This repository is no longer maintained by the owner Devs Do Code (Sree). Any contributions to this repository are heartily welcomed 💝💝.
- Clone the repository:
git clone https://github.com/SreejanPersonal/Hugging-Chat-Reverse-Engineered-API.git
- Navigate to the Hugging Chat platform and sign in with your Hugging Face account. (Avoid guest mode for full functionality.)
- Choose any available model on Hugging Chat to initiate a new conversation.
- Access Developer Tools with
Ctrl + Shift + Iand select theNetworktab. - Engage with the model by entering a query in the chat interface.
- Observe the API requests in the
Networktab and locate theconversationrequest. - In the
Response Headerssection, find theSet-Cookieentry and copy thehf-chatvalue. Treat this as your API key and keep it confidential.
After cloning the repository and obtaining your HF_CHAT_ID, proceed as follows:
- Navigate to the
Hugging-Chat-Reverse-Engineered-APIdirectory:cd Hugging-Chat-Reverse-Engineered-API - Create a
.envfile and store yourHF_CHAT_IDwithin:echo "HF_CHAT_ID=your_hf_chat_id" > .env
- Execute
main.pyto start interacting with the API:python main.py
To utilize the API, ensure you have the necessary dependencies installed. You can install them using:
pip install -r requirements.txt-
Running the script:
python main.py
-
Make sure to replace
your_hf_chat_idwith the actualhf-chatvalue obtained from the response headers.
Your contributions are welcome! Please refer to our CONTRIBUTING.md for detailed contribution guidelines.
This project is licensed under the MIT License. Full license text is available in the LICENSE file.
For inquiries or assistance, please open an issue or reach out through our social channels:
We appreciate your interest in Hugging-Chat-Reverse-Engineered-API.