MCPcopy
hub / github.com/Dooy/chatgpt-web-midjourney-proxy

github.com/Dooy/chatgpt-web-midjourney-proxy @v2.26.5 sqlite

repository ↗ · DeepWiki ↗ · release v2.26.5 ↗
834 symbols 2,060 edges 120 files 33 documented · 4%
README

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

  • [x] Support Kling for text-to-video, image-to-video, and drawing.
  • [x] Support Ideogram for drawing.
  • [x] Support Runway for text-to-video and image-to-video.
  • [x] Support Luma for text-to-video and image-to-video.
  • [x] Support Viggle for dance.
  • [x] Support Suno for audio-to-audio generation.
  • [x] Support for the standalone Suno module, with adjustable lyrics and music style
  • [x] All original ChatGPT web features
  • [x] ChatGPT web supports custom API keys and base_url
  • [x] Midjourney text-to-image
  • [x] Midjourney blend image + text-to-image
  • [X] Midjourney image variations U1 to U4, V1 to V4, and redrawing
  • [X] Midjourney partial redrawing
  • [X] Midjourney 1.5x and 2x zoom
  • [X] Midjourney 2x and 4x HD
  • [X] Midjourney extensions to the left, right, top, and bottom
  • [X] Midjourney supports both midjourney-proxy and midjourney-proxy-plus
  • [X] Midjourney text from images
  • [X] Local image storage using localforage
  • [X] Support for different bots like midjourney and niji
  • [X] Support for InsightFace face replacement
  • [X] Midjourney image blending
  • [X] Midjourney get seed
  • [X] DALL-E-3 image generation
  • [X] ChatGPT front-end model selection
  • [X] ChatGPT front-end supports custom models, context number, and reply count
  • [X] ChatGPT supports image uploads for GPT-4-Vision-Preview
  • [X] ChatGPT supports file backend uploads (for models like GPT-4-All, GPT-4-Gizmo-xxx) by default off, can be enabled with environment variable API_UPLOADER=1
  • [X] ChatGPT supports reverse models like GPT-4-All, GPT-4-V, GPT-4-Gizmo-(gizmo_id)
  • [X] ChatGPT supports hyperlink model switching https://vercel.ddaiai.com/#/m/gpt-4-all https://vercel.ddaiai.com/#/m/gpt-4-gizmo-g-2fkFE8rbu
  • [X] ChatGPT supports ChatGPT-style hyperlink model switching https://chat.openai.com/g/g-2fkFE8rbu modified to https://vercel.ddaiai.com/#/g/g-2fkFE8rbu
  • [X] ChatGPT supports GPTs multimodal
  • [X] ChatGPT supports TTS whisper
  • [X] Instant voice recognition (browser's built-in ASR) v2.15.7 and above
  • [X] Support hyperlink change settings, suitable for one-api and new-api deployments https://vercel.ddaiai.com/#/s/t?OPENAI_API_BASE_URL=https://abc.com&OPENAI_API_KEY=sk-xxxxx&MJ_SERVER=https://abc.com&MJ_API_SECRET=sk-xxx&UPLOADER_URL=
  • [X] Support one-api and new-api deployments https://vercel.ddaiai.com/#/?settings={%22key%22:%22sk-abc%22,%22url%22:%22https://www.abc.com%22} (v.2.14.3)

Serverless - Personal Desktop Installation

  • [x] Please download the latest version from https://github.com/Dooy/chatgpt-web-midjourney-proxy/releases (choose the version suitable for your operating system)
  • [x] Choose an appropriate proxy service (preferably one that supports gpt, gpts, midjourney, claude, suno)
  • [x] 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

  • Cloudflare R2 storage 10 GB/month free https://www.cloudflare.com/zh-cn/developer-platform/r2/
  • Configuration reference https://zhuanlan.zhihu.com/p/658058503
  • Vercel does not support 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 - [x] Vercel is not supported; only Docker deployment is supported - [x] If NGINX is mounted in front, configure proxy_set_header X-Forwarded-For $remote_addr; - [x] 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
  • [x] 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

    <img src="https://github.com/Dooy/chatgpt-web-midjourney-proxy/raw/v2.26.5/docs/wxpay.jpg"  style="width:200px">

WeChat Donation

    <img src="https://github.com/Dooy/chatgpt-web-midjourney-proxy/raw/v2.26.5/docs/alipay.jpg"  style="width:200px">

Alipay Donation

Extension points exported contracts — how you extend this code

RequestProps (Interface)
(no doc)
service/src/types.ts
WebDAVConfig (Interface)
(no doc)
src/utils/webdav.ts
gptConfigType (Interface)
(no doc)
src/store/homeStore.ts
ScrollReturn (Interface)
(no doc)
src/views/chat/hooks/useScroll.ts
pixverseRep (Interface)
(no doc)
src/api/pixverseStore.ts
Window (Interface)
(no doc)
src/typings/global.d.ts
IconConfig (Interface)
(no doc)
src/hooks/useIconRender.ts
ChatContext (Interface)
(no doc)
service/src/types.ts

Core symbols most depended-on inside this repo

read
called by 154
src/lib/wavtools/lib/wav_recorder.js
ee
called by 103
src/static/mitf/assets/mj.js
mlog
called by 84
src/api/mjapi.ts
e
called by 60
src/static/mitf/assets/mj.js
n
called by 58
src/static/mitf/assets/mj.js
toString
called by 55
src/static/mitf/assets/mj.js
t
called by 53
src/static/mitf/assets/mj.js
ae
called by 48
src/static/mitf/assets/mj.js

Shape

Function 557
Method 161
Interface 70
Class 46

Languages

TypeScript100%

Modules by API surface

src/static/mitf/assets/mj.js326 symbols
src/api/openapi.ts33 symbols
src/api/mjapi.ts30 symbols
src/lib/wavtools/lib/wav_recorder.js22 symbols
src/store/modules/chat/index.ts16 symbols
src/utils/is/index.ts14 symbols
src/api/runwayStore.ts13 symbols
src/api/sse/types.ts12 symbols
src/api/lumaStore.ts12 symbols
src/api/Recognition.ts12 symbols
src/api/mjsave.ts11 symbols
service/src/middleware/auth.ts11 symbols

Dependencies from manifests, versioned

@antfu/eslint-config0.35.3 · 1×
@commitlint/cli17.4.4 · 1×
@commitlint/config-conventional17.4.4 · 1×
@ffmpeg/ffmpeg0.12.10 · 1×
@ffmpeg/util0.12.1 · 1×
@iconify/vue4.1.0 · 1×
@openai/realtime-api-betagithub:dooy/openai-r · 1×
@openai/realtime-wavtoolsgithub:dooy/openai-r · 1×
@tauri-apps/cli1.5.11 · 1×
@traptitech/markdown-it-katex3.6.0 · 1×
@types/crypto-js4.1.1 · 1×
@types/express4.17.17 · 1×

For agents

$ claude mcp add chatgpt-web-midjourney-proxy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact