You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **ChatGPT Browser API Proxy** is a project that enables the use of OpenAI APIs by leveraging the ChatGPT unofficial browser API while bypassing Cloudflare anti-bot detection. This proxy allows you to make API requests to OpenAI's services directly from your local machine.
4
+
5
+
## Prerequisites
6
+
7
+
Before using this API proxy, ensure that you have the following:
8
+
9
+
- Node.js installed on your machine
10
+
- Yarn package manager installed
11
+
12
+
## Getting Started
13
+
14
+
To set up and use the ChatGPT Browser API Proxy, follow these steps:
4. Copy the example environment file and rename it to `.env`:
35
+
36
+
```shell
37
+
cp example.env .env
38
+
```
39
+
40
+
5. Open the `.env` file and add your OpenAI Access Token obtained from the OpenAI platform. Replace `<YOUR_ACCESS_TOKEN>` with your actual token.
41
+
42
+
6. Start the proxy server in development mode:
43
+
44
+
```shell
45
+
yarn start:dev
46
+
```
47
+
48
+
*Note:*
49
+
50
+
You can get an Access Token by logging in to the ChatGPT webapp and then opening `https://chat.openai.com/api/auth/session`, which will return a JSON object containing your Access Token string.
51
+
52
+
Access tokens last for few days.
53
+
54
+
## Configuring for LangChain
55
+
56
+
If you intend to use the proxy with _LangChain_, you need to set the `OPENAI_API_BASE` environment variable to specify the API base URL.
57
+
58
+
```shell
59
+
export OPENAI_API_BASE=http://localhost:3000/v1
60
+
```
61
+
62
+
## Making API Requests
63
+
64
+
Once the proxy server is running, you can make API requests to OpenAI's services using the provided routes and endpoints. The proxy will handle the communication with the ChatGPT unofficial browser API and forward the responses to your local machine.
65
+
66
+
## Notes
67
+
68
+
- This project is an unofficial implementation and may not provide the same level of reliability or stability as official OpenAI APIs.
69
+
- Usage of this project may be subject to OpenAI's terms of service. Please ensure compliance with their guidelines and policies.
70
+
71
+
## Disclaimer
72
+
73
+
This project is provided as-is, without any warranty or guarantee of its functionality. The developers and contributors are not responsible for any damages or issues arising from the use of this project.
74
+
75
+
## License
76
+
77
+
This project is licensed under the [MIT License](LICENSE).
0 commit comments