Make an AI Discord bot
It chats with your members and makes images from a prompt.
Connect ChatGPT to your bot and members can ask it questions with /respond, have it rewrite text with /edit-text, or @mention it to chat. Turn on Image Generation and /imagine posts a picture of whatever they type. You set it all up in BotGhost, the no-code Discord bot maker, and BotGhost hosts the bot for you.
The AI modules need Premium and your own OpenAI API key. OpenAI bills you for what your bot uses.

A ChatGPT Discord bot with chat mode and slash commands
The ChatGPT module sends your members' messages to OpenAI and posts the answers. Paste in your OpenAI key, pick a model (like GPT 4-o Mini), and press Enable.
- Chatmode
@mention the bot in the channel you pick and it chats back. You can give each channel a different personality, so #help is polite and #memes isn't.
- /respond
Members type a question into the /respond command and the bot answers in the channel.
- /edit-text
Paste some text and say how to change it, like making it shorter or fixing the typos.
You can limit each command to certain channels or roles. They're made of normal builder blocks, so you can open them and change anything.
The ChatGPT module in the docsAI image generation in Discord with /imagine
The Image Generation module adds an /imagine command. Someone types "a ghost eating pizza", DALL-E draws it, and a few seconds later the picture's in the channel.
Default size is up to you: 1024, 512, or 256 pixels square.
Switch on multiple variations and members flip through them with buttons.
It runs on the same kind of OpenAI key as ChatGPT, so you can use one key for both.
Example picture. Your bot posts the image DALL-E makes.
Use your own OpenAI API key
BotGhost doesn't sell AI credits. Each AI module has an OpenAI API Key field, and your bot uses that key for every reply and every picture.

- 1Sign in to the OpenAI platform, open API keys, and create a new secret key.
- 2Paste the key into the module's OpenAI API Key field. Collaborators on your bot can't see it.
- 3Add billing to your OpenAI account. OpenAI charges you for what your bot uses, separately from BotGhost.
- If your bot answers with a 429 error, the key has run out of credit. Add billing on OpenAI and try again.
- Get an OpenAI key, step by step
Build your own AI commands with Claude, Gemini, or ChatGPT
For a different AI model or your own prompt, use the Send an API Request block. Every bot has it, and its AI templates fill in the request for you. Search the block list for "chatgpt" or "claude" to find them.
- Ask ChatGPT
- Ask Claude
- Ask Gemini
- Ask any AI model (OpenRouter)
- Generate an image (DALL·E 3)
- Does this break the rules? (AI judge)
Save your key once in Secrets and the template reads it as {SECRET_OPENAI_API_KEY}. We encrypt it, and nobody sees it again after you save it (you included).
The answer comes back as a variable marked AI reply, ready for a message, an embed, or a Comparison Condition.
The block works on the free plan too, inside your 3 custom commands.
Every block is in the Discord bot command builder. Send an API Request has its own docs page.
AI on the free plan and on Premium
The two AI modules need Premium, and the Send an API Request block works on the free plan. OpenAI bills you for your usage on both.
| Feature | Free | Premium |
|---|---|---|
| ChatGPT module: Chatmode, /respond, and /edit-text | Not included | Included |
| Image Generation module: /imagine | Not included | Included |
| Send an API Request block with AI templates | Included | Included |
| Secrets for your API keys | 5 | 50 |
| Custom commands | 3 | Unlimited |
| Servers | 5 | Unlimited |
Premium is $12.50 a month for one bot, or $75 a year. Premium on every bot you own is $25 a month. A free bot switches off after 2 days without activity; Premium bots stay on.
AI Discord bot questions
If your question isn't here, ask in the BotGhost Discord or read the docs for the ChatGPT module.
It's a bot that sends what members say to an AI model and posts the answer back, so it can reply to questions nobody wrote an answer for. On BotGhost you get one from the ChatGPT and Image Generation modules, or by building your own commands with the Send an API Request block.
See the ChatGPT moduleMake a bot on BotGhost and invite it. Then, on Premium, open ChatGPT under Modules, paste your OpenAI key, choose a model, and press Enable. To make it chat when people @mention it, turn on Chatmode.
Read the ChatGPT module docsPartly. The ChatGPT and Image Generation modules need Premium. The Send an API Request block, AI templates included, works on the free plan. Either way, OpenAI bills you for what your bot uses on your own key.
Compare Free and PremiumYes. BotGhost doesn't include AI credits, so you make a key on the OpenAI platform and paste it into the module. If the bot shows a 429 error, your key's out of credit. Add credit on OpenAI's billing page and it'll work again.
How to get an OpenAI keyYes, with the Send an API Request block. There are ready templates for Claude, Gemini, and anything on OpenRouter. Get a key from the one you want and save it in Secrets.
Build your own AI commandsYes. The Image Generation module adds /imagine, which sends the member's prompt to DALL-E and posts the picture. Pick 1024, 512, or 256 pixel images, and whether people get a few versions to flick through.
Read the Image Generation docsYes, it can check messages for you. The Check a message for harmful content template asks OpenAI's moderation model, and the AI judge template answers YES or NO against your rules. Put a Comparison Condition after it, then Delete a Message or Timeout a Member.
See the Discord moderation botKeys saved in Secrets are encrypted, never shown again, and can be locked to the sites they're meant for. The key in an AI module's settings is hidden from collaborators on your bot.
About your OpenAI keyRelated pages
- No-code Discord bot makerHow BotGhost works: make commands from blocks, or switch on ready-made modules.
- Discord bot command builderHow to make slash commands by joining blocks, including ones that post an AI reply.
- Discord moderation botHow to set up bans, warnings, and logs for your server.
- Custom Discord botHow to give your bot its own name, avatar, banner, and status.
Add AI to your Discord bot
Making the bot is free. The ChatGPT and Image Generation modules need Premium.
Create your bot for free