← all repositories
deanxv/coze-discord-proxy

Turning a Discord chatbot into an OpenAI-compatible API

A proxy that repackages Discord messages from Coze's free GPT-4 bot into standard OpenAI-compatible chat and image APIs.

coze-discord-proxy
Not currently ranked — collecting fresh signals.
star history

What it does

This Go service sits between your applications and a Coze bot running inside a Discord server. It translates standard OpenAI-style API requests—chat completions, image generation, vision tasks—into Discord channel messages, then parses the bot replies back into JSON responses. Tools like NextChat or LobeChat can point at it and treat a Discord-hosted Coze instance like a private GPT-4 endpoint.

The interesting bit

The project treats Discord as both transport layer and compute backend. You have to harvest your own Discord user authorization token from browser dev tools and juggle two separate bots—one managed by Coze, one self-hosted listener—just to keep the pipe open. That is a lot of plumbing, but it effectively unlocks Coze’s free tier for anything that expects a clean REST API.

Key highlights

  • Exposes v1/chat/completions and v1/images/generations endpoints that mimic OpenAI’s request and response shapes
  • Supports streaming responses, conversation isolation via separate Discord threads, and vision inputs (URL or base64)
  • Load-balances across multiple Discord user accounts and multiple Coze bots to work around daily rate limits
  • Includes a daily 9 AM cron job to ping the bot and keep it from going dormant
  • Optional Telegram alerts when tokens expire or Discord flags the listener bot

Caveats

  • Setup is elaborate: you must create two Discord bots, copy server and channel IDs, and extract a live Authorization header from your browser’s network tab
  • The README notes that each Discord user has a 24-hour call limit to the Coze bot, so production use requires rotating multiple accounts
  • Relies on Coze’s Discord integration remaining unchanged; if Discord or Coze tighten anti-automation measures, the proxy breaks

Verdict

Worth a look if you want to pipe Coze’s free GPT-4 access into existing OpenAI-shaped tools and don’t mind maintaining Discord infrastructure. Skip it if you need a stable, officially supported API with an SLA.

Frequently asked

What is deanxv/coze-discord-proxy?
A proxy that repackages Discord messages from Coze's free GPT-4 bot into standard OpenAI-compatible chat and image APIs.
Is coze-discord-proxy open source?
Yes — deanxv/coze-discord-proxy is open source, released under the GPL-3.0 license.
What language is coze-discord-proxy written in?
deanxv/coze-discord-proxy is primarily written in Go.
How popular is coze-discord-proxy?
deanxv/coze-discord-proxy has 3.8k stars on GitHub.
Where can I find coze-discord-proxy?
deanxv/coze-discord-proxy is on GitHub at https://github.com/deanxv/coze-discord-proxy.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.