How to use your own OpenAI key in a workflow
Run a flow's AI steps on your company's own AI provider account: add the connection, set each block's Model, and know what is sent, what is billed where and what stays.
Part of the guide AI employees
To use your own OpenAI key in a workflow in xMap Flows, add an AI provider connection with the key and a model name, press Test, then set the Model setting of each AI block (xMap LLM, the Place classifier, the AI agent and the AI router) to that connection. From then on, what those blocks read goes to your OpenAI account under your agreement with OpenAI, and that step's AI is billed by your provider rather than by xMap. Every other step of the flow works as before.
This article is for teams whose security, legal or procurement rules say AI calls must go through the company's own provider account, and for teams that already have a negotiated rate or a preferred model. It covers why teams do it, the setup step by step, what changes and what does not, a made-up example, the mistakes that stop a flow, and how admins control it.
Why companies bring their own AI account
- One agreement. The company has already reviewed a provider's data terms and does not want a second one.
- Data handling rules. Some policies require that business data sent to an AI model goes only to an approved account, sometimes in a chosen region.
- A model of their choice. A team may want a particular model for a language or a task.
- Their own usage limits and bills. AI spend appears on the provider's invoice with everything else the company uses.
OpenAI is not the only option. The same Model setting accepts connections to Anthropic (Claude), Gemini, Azure OpenAI, or any server that speaks the OpenAI-compatible format, such as a model a company hosts itself.
Setting it up
- Open Connections and add a connection. Under AI provider, pick OpenAI (or another provider).
- Paste the API key and type the model's name; suggestions are offered as you type.
- Press Test. A tiny question is sent to the model, and the answer says whether the key and model work.
- Open the flow, select the AI block, and set Model to the new connection. Repeat for each AI block that should use it. A block left on xMap AI keeps using xMap's own models.
- Run a test run and read the step: it says the block ran on your own provider account.
What changes and what does not
| With xMap AI | With your own model | |
|---|---|---|
| Who receives the data | xMap's AI provider | Your provider, on your account |
| Who bills the AI step | xMap, as part of your usage | Your provider |
| Other paid steps (data, sending, an agent's tools) | Charged as usual | Charged as usual |
| The AI agent's web search | Available | Not available |
| Jev decision | Its own model | Its own model, unchanged |
How a block behaves on each kind of model.
What the block reads is what gets sent: the items reaching it, its instructions, and any reference notes or files you attached. Nothing else in the flow goes to your provider.
A made-up example
This example is invented. A bank in Singapore uses an AI employee to score new merchants near its branches as candidates for card terminals. Its policy says business data may only go to the bank's own OpenAI enterprise account. The analytics team adds a team connection with that account's key, sets the flow's xMap LLM block (which scores each merchant and writes a reason) to it, and leaves the rest of the flow as it was: Nearby places still finds the merchants, Filter still keeps the strong fits, Email still sends the list to the regional managers. The bank's security team reviews one thing, the provider account, instead of a new vendor.
A logistics firm in Sao Paulo does the same with an Azure OpenAI deployment in its preferred region for an AI agent that answers drivers' questions in Portuguese.
Mistakes that stop the flow
- A personal connection in a team flow. A personal AI connection works only in flows the person owns. For a flow several people run, make it a team connection.
- A model name typed wrong. The test catches it; run the test after every change of model.
- Forgetting a block. Each AI block has its own Model setting. A flow with an xMap LLM block and an AI router needs both set.
- Expecting web search from the agent. On your own model, the agent's Search the web is off; give it tools such as Nearby places instead.
- A key with low limits. A large run sends many requests; check your provider's rate limits before running thousands of items.
Control for admins
Organization admins can switch own AI keys off in Settings, Advanced, AI providers. Then no AI connection can be added, and a block set to its own model stops with a message: nothing is quietly sent to xMap AI instead. That makes the setting safe for strict policies in both directions.
An AI employee on your own model
Any AI employee works this way. A typical one, built like the new businesses routed by size template:
- Schedule and Nearby places find new businesses in your area.
- AI router, Model set to your connection, sends each to Key accounts, Standard or Not a fit.
- xMap LLM, on the same connection, writes a short reason for each key account.
- Email or Slack delivers each route's list.
What lands in the inbox looks exactly the same as before; only the account behind the AI changed. The help article on your own AI provider has the details, and the AI employees guide explains how the AI steps fit into a flow. For conversations, the AI agent and Place classifier take the same setting.
Questions
Which AI providers can I connect?
OpenAI, Anthropic (Claude), Gemini, Azure OpenAI, or any OpenAI-compatible server, as long as the model supports structured JSON answers.
Which blocks can run on my own model?
xMap LLM, the Place classifier, the AI agent and the AI router each have a Model setting. Jev decision keeps its own model.
Is my data sent to xMap's AI as well?
No. A block set to your own model sends what it reads only to your provider, and if your own model is switched off by an admin the block stops rather than falling back.
Do other steps still use xMap?
Yes. Data, sending and an agent's tools are charged as usual; only the AI step of a block set to your model is billed by your provider.
Templates that do this
Read next
More on ai employees and automation · Every article · Templates