AI provider keys (bring your own key)
Use your own OpenAI, Anthropic or Google key so AI usage bills to you, or let comxbot manage a key for you.
What this is, in plain terms
Every answer your assistant gives is powered by an AI provider like OpenAI, Anthropic or Google. Someone has to pay that provider for the work. With bring your own key, or BYOK for short, you add your own provider key and the usage bills straight to your account with them. You stay in control of spend and you can see it on your provider's own dashboard.
If you'd rather not set up a provider account at all, comxbot can sort a key out for you instead. That's called a managed key, and we cover it further down.
Your assistants need a key to work. You either add your own, or ask comxbot to provide a managed one. Until a key is in place a live assistant won't answer and your sources won't ingest, so this is the first thing to set up. The only exception is the demo bot on our marketing site, which runs on our own key.
Where a key can live
A key can sit at one of two levels, and there's a safety net underneath. Think of it like a hierarchy.
Workspace level: one key that every bot in the workspace uses. This is the simplest setup and suits most people. Add it once and you're done.
Assistant level: a key for one specific bot. This overrides the workspace key for that bot only. Handy when one team or one project wants its usage kept separate.
The safety net: if a bot has no key of its own, it falls back to the workspace key. If there's no workspace key either, it falls back to the key comxbot provides. So a bot always has something to run on.
In short: a bot looks for its own key first, then the workspace key, then the comxbot fallback. The first one it finds wins.
Adding your own key
Go to Settings, then AI provider keys. You'll need to be a workspace owner or admin.
Pick the provider your key is from, choose whether it applies to the whole workspace or just one bot, paste the key, and save. We encrypt the key before storing it, and we only ever show you the last few characters afterwards. Nobody, including us, reads it back out in full.
Where do you get a key? From the provider. OpenAI keys start with 'sk-' and come from platform.openai.com. Anthropic keys start with 'sk-ant-' and come from console.anthropic.com. Google keys come from Google AI Studio. Copy the key as soon as you create it, because most providers only show it once.
To remove a key, open the same page and use the bin icon next to it. Your bots fall back to the next key down straight away.
A note about knowledge search
There's one wrinkle worth knowing. When you add a knowledge source, comxbot turns it into searchable numbers, a step called embedding. Anthropic doesn't offer embedding, so it can't do this part.
That means if your chat runs on Anthropic, you still need an OpenAI or Google key for the knowledge search. You choose the embedding model on the same settings page, under Knowledge search model.
If you switch embedding model later, your existing sources need re-ingesting, because the old and new models aren't comparable. The page reminds you when that's needed, and you re-ingest from the Sources page.
Letting comxbot manage a key for you
Not everyone wants to open accounts with AI providers and juggle keys. If that's you, comxbot can provide and manage a key on your behalf. You tell us which provider you'd prefer, we set the key up and add it to your account.
Managed keys work on pre-paid credit. You top up an amount from the start, for example £20, and your AI usage draws down from that balance as people chat. When the balance runs low you top up yourself from Settings then AI provider keys, where you'll see your balance and a Top up button that takes you through a secure Stripe payment. It's pay-as-you-go, with no surprises, because the bot simply pauses and asks for a top-up rather than running up a bill.
You'll see managed keys marked clearly on the AI provider keys page. You can't delete a managed key yourself, since we look after it, but you can add your own key at any time to take over.
If you'd rather never think about it, switch on automatic top-up. Once you've topped up once, we keep your card on file, and you set a threshold and an amount. When your balance drops below the threshold we charge your card for the top-up amount, so the assistant keeps running without you lifting a finger. Turn it off whenever you like.
To set this up, or to switch a preference, get in touch with comxbot support and we'll provision it for you.
Which option is right for me
Bring your own key if you have, or can open, an account with a provider. Usage bills to you, you get full visibility of spend, and you control the rate limits. This is the usual choice.
Choose a managed key if you'd rather comxbot handled the provider side entirely and you're happy to pre-pay credit. We provision the key and your usage draws down from your balance. The least setup for you, while still keeping your usage separate and metered.
Either way a key is required. There's no shared comxbot key for live assistants, so pick whichever of the two suits you and set it up before you go live.