What AI Own API Key / Own AI Key (BYOK, Bring Your Own Key) for Odoo Enterprise AI does
AI agents, Ask AI chat, the AI composer, AI fields, AI server actions and knowledge embeddings run on your OpenAI, Claude, Gemini, Azure or local model account instead of Odoo AI credits. A key per company, a rule per feature, Odoo credits as a fallback and a usage log with tokens and cost.
Enterprise only: run Odoo Enterprise AI agents, Ask AI chat, the AI composer (write and rewrite with AI), AI fields, AI server actions and knowledge embeddings (RAG) on your own API key instead of Odoo AI credits (IAP). Own AI key per company, routing rule per feature with fallback to Odoo credits, test connection, usage log with tokens and cost, monthly budget.
Features
Your key, per company
OpenAI, Anthropic Claude, Google Gemini, Azure OpenAI or any OpenAI-compatible URL such as OpenRouter, Ollama or vLLM. Each company has its own keys.
A rule per AI feature
AI agents, Ask AI chat and the AI composer, AI fields, AI server actions, chat titles, website builder, ESG metrics, knowledge embeddings or your own pattern. First matching rule wins.
Odoo credits as safety net
If your provider fails or your budget is used up, the rule can pass the request to Odoo AI credits instead of showing an error.
Test connection
One click sends a tiny chat and embedding request with the key and shows the model answer or the exact provider error.
Usage and cost
Every request is logged with tokens, estimated cost, duration, key and rule. Graph and pivot by day, feature and key.
Tools, files and JSON
Agent tool calls, structured answers for AI fields, images and PDFs are translated to each provider's own API format.
Odoo asks
An AI feature in Odoo Enterprise prepares its request as usual: Ask AI chat, an agent, an AI field or an AI server action.
The rule decides
The add-on checks the routing rules of the current company. No matching rule: the request goes to Odoo AI credits as before.
Your provider answers
The request is translated for your provider, sent with your key and the answer comes back to Odoo in the same shape. Tokens and cost are logged.
How it works, step by step
01Your AI keys in one list
AI, Configuration, Own AI Keys, Keys: every key with its provider, models, routing rules, requests and estimated cost this month, and whether its last test worked.

02One key, its models and prices
Choose the provider and paste the key; the chat, think-longer and embedding models and the prices per million tokens are filled in for you and can be changed. The key is only visible to administrators.

03Test the connection
Test connection sends a short chat request, and an embedding request when an embedding model is set. Here a local model behind an OpenAI-compatible URL answers; a wrong key shows the provider's own error.

04Decide which features use which key
Routing rules per company: agents and chat on one key, AI fields and AI actions on another. Choose per rule whether a failure falls back to Odoo credits and what happens when a feature asks for live web search.
05Ask AI, answered with your key
Nothing changes for users: they open Ask AI or talk to an agent as before. The answer and even the chat title come from your provider.
06Usage by day and key
Own AI Keys, Usage opens on this month: estimated cost per day, stacked per key. Switch the measure to tokens or requests.
07Tokens and cost per feature
The pivot shows input and output tokens and the estimated cost per feature and key, ready to export to a spreadsheet.
08Every request on record
Each request keeps the user, feature, model, tokens, cost, duration, the key and the rule that sent it, and whether it was passed to Odoo credits.
Included apps
Odoo installs these Viyug Infotech apps together with AI Own API Key / Own AI Key (BYOK, Bring Your Own Key) for Odoo Enterprise AI.
Questions about AI Own API Key / Own AI Key (BYOK, Bring Your Own Key) for Odoo Enterprise AI
Is this for Odoo Community?
No. It extends the AI app of Odoo Enterprise, which Community does not have.
Why is this needed when earlier Odoo releases had an API key setting?
Earlier Odoo Enterprise releases let you enter your own OpenAI or Google key in the AI settings. The current Enterprise AI app removed those fields and sends every AI request through Odoo AI credits (IAP). This add-on brings your own key back, for more providers and with a rule per feature. On a release that still has the key fields you do not need it.
Which AI features use my key?
AI agents and Ask AI chat (also website live chat agents), the AI composer (Write with AI in emails, HTML fields and the chatter), AI fields, AI server actions and AI in automation rules, the web search tool, chat titles, the AI website builder passes, ESG metrics and knowledge embeddings for agent sources. You choose per feature.
Do voice transcription and image generation use my key?
No. Call transcription, live dictation and image generation keep using Odoo's service. A request that asks for image generation is passed to Odoo credits.
What about AI fields that ask for web search?
Each rule decides: answer from the model's own knowledge with your key, or pass web search requests to Odoo credits.
Can I run a local model?
Yes. Any server that speaks the OpenAI Chat Completions API works: Ollama, vLLM, LM Studio, LiteLLM, OpenRouter and similar. Tool calls need a model that supports function calling.
What happens to existing knowledge embeddings when I switch?
Vectors from two models cannot be compared, so the add-on clears them and Odoo's embedding job rebuilds them with the new key. The embedding model must return 1536 dimensions (for example text-embedding-3-small).
Where is my key stored?
On the key record, readable only by administrators, and sent only to the provider endpoint you set.
Who bills the AI usage?
Your provider, directly. The add-on estimates the cost from the prices you enter and can stop requests at a monthly budget per company.
