Skip to content

BlogGuides

Run a Discord AI Ticket Bot on Your Own API Key

On Pro you can point the bot at your own OpenAI, Anthropic or Google Gemini account. Your provider bills the replies, and your plan stops paying for them.

Dani, Founder, AI Ticket Bot

9 min read

Every AI ticket bot sells you inference. You pay a monthly price, you get an allowance, and when the allowance runs out the AI stops. That is a good deal until your server is large enough that the allowance is the only line on the invoice you think about.

What does connecting your own AI actually do?

It moves one thing: who runs the model call.

Everything else stays where it was. Your server's brain, the facts your staff taught it, the rules you set, your panels, your transcripts and your staff permissions are all ours and all untouched. Connect a key and the next reply is generated by your provider instead of by ours. That is the whole change.

The scope of "everything" is worth stating, because people assume it means ticket replies only.

What the switch covers

Runs on your key
Ticket replies, the FAQ channel, the web widget, the dashboard chat, training
Stays on our side
Memory, rules, taught facts, past tickets, transcripts, staff roles
Applies from
The next reply, with nothing to retrain and nothing to re-teach
Who can connect it
An admin with Manage Server, re-checked on every press
Plans
Pro and Enterprise, and an Enterprise deal can switch it off

That Manage Server requirement is stricter than most of the dashboard on purpose. A provider address receives every conversation from the moment it is connected, so this is a data decision rather than a settings change, and it belongs with the people who already control the server.

Why would you want to?

Because on a normal plan the token allowance is the ceiling, and your own key replaces it with your own.

Pro includes 15,000,000 AI tokens a month. An average ticket conversation runs about 13,000 billable tokens across roughly five turns, so that is somewhere near 1,150 conversations before the AI stops cleanly and your staff carry the rest by hand. For most servers that is far more headroom than they will ever use. For a few, it is the number they hit on the 20th.

On our AIOn your own key
Who bills the repliesUs, out of your plan allowanceYour provider, on your own account
The monthly ceilingYour plan's token allowanceWhatever your provider lets you spend
Which model runsAny of ours, chosen per serverAny compatible model your provider offers
At the capThe AI stops, tickets keep working by handYour provider's own limits apply
What still uses your planEverythingWeb searches only
Cost shapeOne fixed monthly priceUsage based, and it is your bill to read

That last row is the real trade and it cuts both ways. A fixed price suits a server that wants one predictable invoice; usage billing suits one whose volume swings between a quiet week and a launch. If you sit comfortably inside the allowance, the plan you already pay for is the cheaper answer.

What still comes out of your plan?

Web searches, and only web searches.

When the AI cannot answer from what your staff taught it, it can check the live web as a fallback. That lookup runs on our side whichever AI is generating the reply, so it is charged to your plan at roughly 5,000 tokens a search. Everything else on that turn is on your provider's bill.

  • Its replies never count against your plan

    True. The reply is generated on your account and is not metered by us

  • Nothing at all counts against your plan

    False. Web search is still ours to pay for, so the meters do move a little

Searching the AI's own memory is not charged to you either: that runs on your provider like any other model call. If you want the plan meters to stop moving altogether, web search has a server-wide switch in /ai settings.

The arithmetic is worth doing once. If your plan is only paying for searches, Pro's 15,000,000 tokens is in the region of 3,000 web searches a month, which is not a number a support queue reaches.

Which providers does it work with?

Nine have a preset, and the tenth option covers everything else.

The presets, in the order they appear

OpenCode Zen
One key routing to several model families, GPT and Grok included
Google Gemini
Direct from Google. Free keys exist and are rate limited per minute
Anthropic
The same family our own AI runs on
OpenAI
Direct
OpenRouter, DeepSeek, xAI, Mistral, Groq
Presets with the address filled in for you
Custom
Any other provider with an OpenAI, Anthropic or Google Gemini compatible API

You never have to know which API format your provider speaks. The address is checked once, the format is worked out from the provider's own answer, and the key is tested with one real call before anything is saved.

Two limits sit here, both worth knowing before you buy credit. A model that cannot use tools is refused. The AI needs them to look something up, close a ticket or write to memory, so the test call fails rather than the feature quietly degrading. And our prompts are written and tuned against Claude, so another model will work and may read a little differently. We tested a spread of models before shipping this: most handled every task, a few invented an answer or skipped a tool entirely. Pick a current model rather than the cheapest on the list.

  1. Open the Model card

    In the dashboard it is on your server's AI page. In Discord it is /ai model

  2. Pick your provider

    Choose a preset and the address fills itself in, or choose Custom and paste your own

  3. Paste the key

    Small slips get fixed rather than refused: a missing https://, a pasted endpoint path, a key with Bearer in front of it

  4. Pick the model

    Leave the model id empty to choose from your provider's own list, or type one. An id your provider does not have brings up the closest matches instead

  5. Confirm

    The confirm screen says what changes for your allowance before anything moves

What happens when the key stops working?

This is the part that decides whether the feature is safe to leave running unattended, and nobody asks about it until it happens.

Four failures are treated as things only an admin can fix: the key is rejected, the account is out of credit, the model is gone, or the provider will not run the model in a way the AI can use. Any of those and the server moves back onto our AI immediately, the member's message is sent again, and they get their answer on that same turn rather than the next one. Whoever connected the key gets one direct message, once per incident, and the AI page shows what the provider actually said.

  1. Your provider refuses
  2. Server moves to our AI
  3. The message is sent again
  4. One DM to you

Anything that looks temporary is treated as temporary. A rate limit, a slow provider, a provider that is briefly down: none of those move your server off its own AI, because a short outage is not a reason to switch a whole server onto a different model.

Coming back is deliberate rather than automatic. Fix the problem, then press Test and switch back, or save a new key or model that passes its test. A key that has already failed is never retried against a member's question on its own.

What does not change

The list of things people expect to lose here is longer than the list of things that actually move.

The brain stays. Memory, rules, the facts your staff taught with /ai train and every past ticket live on our side and are not touched by connecting, switching or removing a key. What the AI remembers about your server covers where that sits and who can edit it.

The key is held once and never shown again. It goes to our AI service, is encrypted there, and after that only its last four characters appear anywhere. It is never stored on the website, never written to a log and never included in an error message.

A plan lapse pauses instead of deleting. Drop below Pro and the switch pauses with the key kept, then comes back by itself when you renew. Renewing restores only what the plan paused, so a switch you turned off yourself stays off.

Where this is the wrong choice

Worth doing if

  • You are near your monthly allowance and would rather pay a provider directly
  • You already hold provider credit, or an account whose billing you control
  • Your organisation needs conversations to go to a provider it has its own agreement with
  • You want a specific model for a specific reason, and you know which one

Not worth doing if

  • You are comfortably inside your allowance. One fixed price is simpler and cheaper
  • You want the cheapest possible answer. A weak model reads worse and your staff pay for it
  • Nobody in the server watches a provider balance. An expired card becomes a support incident
  • You are on Free or Premium. This is a Pro feature and there is no way around it

The cheapest-answer line is the one worth arguing about. A Discord ticket bot is judged on whether the answer was right, and money saved on a cheaper model comes back as staff time spent correcting it. If the reason for connecting a key is headroom, or a data agreement, this is a good feature. If the reason is shaving the cost of a reply, price the staff hours too before you switch.

One practical note for whoever owns the account: the failure that actually happens is not a broken integration, it is a card that expired on an account nobody logs into. Put the provider balance on the same list as your domain renewal. The bot handles that failure gracefully and still cannot pay the bill for you.

How the resolution share is defined

Sample
Every ticket handled across the bot's lifetime, V1 and V2 combined
Window
Lifetime to date, refreshed continuously rather than pinned to a date
Definition
Resolved by AI means the AI closed the ticket with no human stepping in at any point. A single staff reply disqualifies it

Frequently asked questions

Nine have a ready preset with the address filled in: OpenCode Zen, Google Gemini, Anthropic, OpenAI, OpenRouter, DeepSeek, xAI, Mistral and Groq. A tenth option, Custom, takes any other provider with an OpenAI, Anthropic or Google Gemini compatible API. You never pick an API format yourself, it is worked out from the provider's own answer, and the key is tested with one real call before anything is saved.

Your provider, on your own account and at your own rate. Those replies are not counted against your plan allowance at all. The one exception is web search: that lookup runs on our side whichever AI is answering, so it is charged to your plan at roughly 5,000 tokens a search. Searching the AI's memory is not charged to you.

Four failures are treated as things only an admin can fix: the key is rejected, the account is out of credit, the model is gone, or the provider will not run the model in a way the AI can use. Any of those and the server moves back onto our AI straight away, the member's message is sent again so they still get an answer, and whoever connected the key gets one direct message. A rate limit or a provider that is briefly down switches nothing.

No. Memory, rules, the facts staff taught it and every past ticket are stored on our side and are not touched by connecting, switching or removing a key. There is nothing to retrain and nothing to re-teach. The change applies from the next reply onward.

Pro or Enterprise. It is the one feature Pro has that Premium does not, and there is no way to add it to a cheaper plan. If a server drops below Pro the switch pauses instead of breaking: the key is kept and it comes back by itself on renewal. Removing a key is never plan gated.

Usually, but do not assume it. Our prompts are written and tuned against Claude, so another model works and can read a little differently. A model that cannot use tools is refused outright, because the AI needs them to look things up, close a ticket or write to memory. Pick a current model rather than the cheapest one on the list.

It’s not just an AI, it’s your AI.

See it on your own server.

Add the bot free, teach it a few of your most common answers, and watch it clear the repeat tickets on its own.

Free plan, no card. Your first panel starts 14 days of Premium.