hncboy / java-chatgpt-api

Unofficial API in Java (bypass Cloudflare 403).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java-chatgpt-api

Bypass Cloudflare using Playwright for Java to use ChatGPT API.


Also support official API (the way which using API key):

  • Chat completion

Default is to use both ChatGPT mode and API mode, if you want to use API mode only, set CHATGPT=false.

Support proxy setting, need to specify http or socks5 manually.

services:
  java-chatgpt-api:
    container_name: java-chatgpt-api
    image: linweiyuan/java-chatgpt-api
    ports:
      - 8080:8080
    environment:
      - CHATGPT=true
      - PROXY=
    restart: unless-stopped

If your IP is blocked, like "Access denied", try this (with Cloudflare WARP):

services:
  java-chatgpt-api:
    container_name: java-chatgpt-api
    image: linweiyuan/java-chatgpt-api
    environment:
      - CHATGPT=true
      - PROXY=socks5://chatgpt-proxy-server-warp:65535
    depends_on:
      - chatgpt-proxy-server-warp
    restart: unless-stopped

  chatgpt-proxy-server-warp:
    container_name: chatgpt-proxy-server-warp
    image: linweiyuan/chatgpt-proxy-server-warp
    restart: unless-stopped

Client

Java Swing GUI application: ChatGPT-Swing

Golang TUI application: go-chatgpt

About

Unofficial API in Java (bypass Cloudflare 403).

License:MIT License


Languages

Language:Java 98.8%Language:Dockerfile 1.2%