In a previous post, we covered private AI services. Here, we’re going to use the same kind of back end those services use, allowing us to run just about any AI model we want. Except in this case, we can pay according to our usage, avoiding a monthly subscription fee that still drains your wallet if you don’t use it.
Brave is going to handle the actual chatting for us though its Leo AI chatbot. To make this work, we will be using a custom model. Unfortunately, this is only available on desktop versions of Brave. We’ll talk about how to set up Leo later on.
We’re going to integrate Leo with a service called OpenRouter, which lets us query almost any AI engine available. OpenRouter doesn’t store or log your chats, although you can opt in to such a service in exchange for a 1% discount (obviously, you shouldn’t do this).
OpenRouter then sends your prompt to the appropriate service, i.e. OpenAI, Anthropic, etc. For open-source models like Llama and Deepseek, OpenRouter can send it to many possible destinations. In each case the prompt is coming from OpenRouter, and thus no personal information is passed through to the AI service. Note that most of the “private” AI services use something similar, if not OpenRouter itself.


Click to enlarge any image in this post
Let’s start by making an account on OpenRouter. Visit their site, then click on “Sign In” in the upper right corner, and then click on “Sign Up” to make a new account.
Enter your email address and a secure password to create an account. After that, you will receive a verification link to confirm your account. Feel free to use an email alias from SimpleLogin, duck.com, etc.
Now we need to add some funds to your account. Click on the small profile icon in the upper right, and then choose “Credits”


OpenRouter uses a pay as you go billing method, meaning you will only pay for your actual usage. Click on “Add Credits” and select your billing method. Note that OpenRouter is a large and reputable company, so you shouldn’t worry about giving them credit card information. For privacy purposes, you can always pay with a prepaid debit card, or use a virtual card from privacy.com.


Once you enter your information, you can choose how much to add to your account. Ten dollars is more than enough for now. Note that you can also choose to “top up” your account when the balance is low.


Now that your account is funded, we need to generate an API key. Head back to the profile menu in the upper right and choose “Keys”


Click on “Create Key” and give your key a name. We will be using this key with Brave Leo, so that seems like an appropriate name, although you can call it anything you like.


Now click on “Create” to generate the key. As the message says, this is the only time you will be able to see this key, so copy it to your clipboard. Clicking on the small clipboard icon to the right will copy it for you. Or better yet, just leave this browser window open while we set up Brave.


Once we have our key, we can set up Brave Leo to use it. In Brave, open up the settings and click on the “Leo” tab. At the bottom, click on “Add new model”


We will need to enter some parameters, depending on which model we want to use. OpenRouter has a complete list of every model they offer on their Models page. For now, let’s use GPT-4.1.


For label, let’s just use the model name of “GPT 4.1.”
The model request name comes from the OpenRouter page for the model you would like to use. You can see it just underneath the model name at the top of the page.


Here are some other popular models you can use:
The server endpoint comes from OpenRouter, and that needs to be identical regardless of what model you are using. It is:
https://openrouter.ai/api/v1/chat/completions
The context size measures how much “memory” the AI engine has. 4000 tokens is pretty small. You can change it to whatever context window is available with the model you are using, which is also available from OpenRouter’s model page. You can see the exact context window for GPT-4.1 in the image above.
For the system prompt, Brave comes with a default that tries to be concise. You can always change this to whatever you like. I prefer the following:
“You are Leo, a helpful AI assistant built into the Brave browser. Your job is to provide clear, useful, and respectful answers to users who may be browsing the web, working on tasks, or asking for information.
Always prioritize the user’s privacy and avoid collecting or requesting personal data.
Give step-by-step guidance when helping with how-to questions or technical problems.
When asked for summaries or explanations, tailor your response to the user’s likely knowledge level—use plain language unless the user asks for expert-level depth.
If a question relates to current events or needs up-to-date information, let the user know you might not have the latest data.
Offer context, examples, and follow-up suggestions when relevant to improve the user’s understanding or workflow.
You are friendly, professional, and curious—never too brief, never too wordy. Help the user think clearly and take effective action.”
For the API key, paste in the key that we generated at OpenRouter.
Once everything is entered, click “Save model” at the bottom and we are ready to go.
Now open Leo, either from the main menu or by clicking on the “star” icon that appears in the navigation bar.
Then click on the three vertical dots at the top of the Leo panel that opens. You will see a list of models, including any that you have added under the “Custom models” section.
Click on the model you want to use, and you are good to go!


Happy prompting!