Skip to content

Latest commit

 

History

History
228 lines (197 loc) · 10.9 KB

README_EN.md

File metadata and controls

228 lines (197 loc) · 10.9 KB

ChatGPT Web Midjourney Proxy

中文 | Русский язык | Français | 한국어 | Tiếng Việt | Türkçe

Disclaimer

  • This project is only released on GitHub under the MIT license, free and open-source for learning purposes. There will be no form of account selling, paid services, discussion groups, etc. Beware of scams.
  • This open-source project is developed based on ChenZhaoYu; it uses the midjourney API provided by midjourney-proxy and Suno-API as the backend.

cover

Supported Features

Serverless - Personal Desktop Installation

  • Please download the latest version from https://github.com/Dooy/chatgpt-web-midjourney-proxy/releases (choose the version suitable for your operating system)
  • Choose an appropriate proxy service (preferably one that supports gpt, gpts, midjourney, claude, suno)
  • Recommended proxy service https://www.openai-hk.com a key and api interface address support gpt, midjourney, claude, suno simultaneously, mj-fast as low as 0.12 RMB/image multimodal

Vercel One-Click Deployment

Deploy with Vercel

env Environment Variables

Environment Variable Description Default Value Docker Deployment Vercel Deployment
OPENAI_API_BASE_URL OpenAI API interface address https://api.openai.com
OPENAI_API_KEY OpenAI API key sk-xxxxx
OPENAI_API_MODEL Default model gpt-3.5-turbo
MJ_SERVER MJ proxy interface address Reference for setup
MJ_API_SECRET MJ proxy secret Empty
SUNO_SERVER SUNO API interface address Reference for setup
SUNO_KEY SUNO API key Empty
AUTH_SECRET_KEY Access authorization password None x
API_UPLOADER Support upload Disabled x
HIDE_SERVER Hide server UI on the front end x
CUSTOM_MODELS Custom selectable models None
TJ_BAIDU_ID Baidu Analytics ID None
TJ_GOOGLE_ID Google Analytics ID None
SYS_NOTIFY System notifications, supports HTML None
DISABLE_GPT4 Disable GPT-4 None
GPT_URL Custom GPT_URL=/gpts.json None or your external link
UPLOAD_IMG_SIZE GPT4V upload image size 1
SYS_THEME Default theme light or dark dark
MJ_IMG_WSRV Enable wsrv image bed None (disabled)
AUTH_SECRET_ERROR_COUNT Brute force prevention: Number of verification attempts NGINX please set proxy_set_header X-Forwarded-For $remote_addr None x
AUTH_SECRET_ERROR_TIME Brute force prevention: Wait time in minutes None x
CLOSE_MD_PREVIEW Do not close input preview None
UPLOAD_TYPE Specify upload method [R2 R2 upload] [API Follow UI front-end relay] [Container Local container] [MyUrl Custom link] Empty x
MENU_DISABLE Disable menu options: gpts, draws, gallery, music Empty
VISION_MODEL Default recognition model Options: gpt-4o, gpt-4-turb, gpt-4-vision-preview, etc. Empty
SYSTEM_MESSAGE Custom default role message Empty
CUSTOM_VISION_MODELS Custom vision models separated by , Empty

Docker Deployment

docker run --name chatgpt-web-midjourney-proxy  -d -p 6015:3002 \
-e OPENAI_API_KEY=sk-xxxxx \
-e OPENAI_API_BASE_URL=https://api.openai.com  \
-e MJ_SERVER=https://your-mj-server:6013  \
-e MJ_API_SECRET=your-mj-api-secret  \
-e SUNO_SERVER=https://your-suno-server:8000  \
-e SUNO_KEY=you-suno-key  ydlhero/chatg

pt-web-midjourney-proxy

Access http://ip:6015

File Upload:

docker run --name chatgpt-web-midjourney-proxy  -d -p 6015:3002 \
-e OPENAI_API_KEY=sk-xxxxx \
-e OPENAI_API_BASE_URL=https://api.openai.com  \
-e MJ_SERVER=https://172.17.0.1:6013  \
-e API_UPLOADER=1  -v /data/uploads:/app/uploads \
-e MJ_API_SECRET=abc123456  ydlhero/chatgpt-web-midjourney-proxy

If the front-end UI sets OPENAI_API_KEY and OPENAI_API_BASE_URL, the image upload will also follow the OPENAI_API_BASE_URL.

curl -X POST -H "Content-Type: multipart/form-data" -F "file=@/path/to/file" http://OPENAI_API_BASE_URL/v1/upload

Return format

{
"url":"https://xxxxxxx.jpg"
}

Midjourney-proxy API Docker Deployment

For more references, go to midjourney-proxy open-source project.

docker run -d --name mj6013  -p 6013:8080  \
-e mj.discord.guild-id=Discord Server ID  \
-e mj.discord.channel-id=Discord Server Group ID   \
-e mj.queue.timeout-minutes=6 \
-e mj.api-secret=abc123456 \
-e mj.discord.user-token=**********  \
--restart=always novicezk/midjourney-proxy:2.5.5

More Demonstrations

Custom Server API Key, Base_URL:

base_url

GPTS GTP Store

multimodal multimodal

Suno Music Creation

suno

Recording Whisper and TTS

whisper--tts

Partial Redraw:

Partial Redraw

Face Replacement

Face Replacement

Image Blending

Image Blending

Support for Image Upload for GPT-4-Vision-Preview

Image Blending Mobile:

File Upload Support for Cloudflare R2 Storage

R2_DOMAIN=
R2_BUCKET_NAME=
R2_ACCOUNT_ID=
R2_KEY_ID=
R2_KEY_SECRET=

File Server Request Priority

R2 > Front-end UI set file service > Backend file service > Follow proxy

Brute Force Prevention Settings

Brute Force Prevention

  • Vercel is not supported; only Docker deployment is supported
  • If NGINX is mounted in front, configure proxy_set_header X-Forwarded-For $remote_addr;
  • Parameters: 3 failed verification attempts, can only reattempt after 10 minutes
# Secret key Note: Only alphanumeric characters
AUTH_SECRET_KEY=my888god
# Brute force: verification attempts Note: Number; NGINX please set proxy_set_header X-Forwarded-For $remote_addr;
AUTH_SECRET_ERROR_COUNT=3
# Brute force: wait time in minutes Note: Number
AUTH_SECRET_ERROR_TIME=10
  • Script:
docker run --name chatgpt-web-midjourney-proxy  -d -p 6015:3002 \
-e OPENAI_API_KEY=sk-xxxxx \
-e OPENAI_API_BASE_URL=https://api.openai.com  \
-e MJ_SERVER=https://172.17.0.1:6013  \
-e MJ_API_SECRET=abc123456 \
-e API_UPLOADER=1  -v /data/uploads:/app/uploads \
-e AUTH_SECRET_KEY=your-english-password -e AUTH_SECRET_ERROR_COUNT=3 \
-e AUTH_SECRET_ERROR_TIME=10 ydlhero/chatgpt-web-midjourney-proxy

License

MIT © Dooy

Others

If you find this project helpful, please consider giving it a star or donating to us.

Star History Chart

Donations

If my open-source project is helpful to you, please consider sponsoring me through any of the following methods:
Payment remarks with your contact information

WeChat Donation
Alipay Donation