How to Setup Github Copilot CLI Using OpenRouter FREE API Key in Terminal to Build Unlimited Apps
Aug 14, 2026
@echo off
set COPILOT_PROVIDER_TYPE=openai
set COPILOT_PROVIDER_BASE_URL=https://openrouter.ai/api/v1
set COPILOT_PROVIDER_API_KEY=
set COPILOT_MODEL=openrouter/free
copilot
Watch My Visual Studio Code IDE Setup Video For Fonts,Themes & Extensions
https://youtu.be/Bon8Pm1gbX8
Hi Join the official discord server to resolve doubts here:
https://discord.gg/cRnjhk6nzW
Visit my Online Free Media Tool Website
Show More Show Less View Video Transcript
0:00
Uh, hello guys. In this video, I'll show
0:02
you how to set up a GitHub Copilot to
0:04
actually use free models which are
0:07
available in OpenRouter.
0:09
OpenRouter, if you don't know, it's a
0:10
free website providing a free API key.
0:13
So, GitHub Copilot is not free, as you
0:16
all know. It's a paid subscription CLI.
0:18
So, I will show you how to set it up
0:20
from scratch. So, first of all, create
0:23
an account on OpenRouter. It's totally
0:25
free. Simply log in
0:27
using your Google account.
0:29
I've already done that. And then you
0:31
need to go to the credits
0:33
inside your account.
0:36
And then go to API keys. So, right here,
0:40
just create a free API key.
0:42
So, if you see the models right here,
0:45
there are
0:47
10,000 plus models. So, every time a new
0:49
model is released by any company, it is
0:51
actually released on OpenRouter. So,
0:54
right in the search bar, you can search
0:55
for free models.
0:57
So, we will be using these free models
1:00
in GitHub Copilot CLI.
1:02
So, in the bracket, as you see, free
1:04
free. So, these are all the free models
1:06
which are there inside OpenRouter.
1:09
Uh, now to create the API key, it's very
1:11
simple. You simply give it a name and
1:13
click on create. So, this will actually
1:16
give you your API key right here. Simply
1:18
copy this API key.
1:20
And the next step that you need to do,
1:22
go to your terminal,
1:24
go to VS Code, and in whichever
1:27
directory you were actually making the
1:28
project, just create a file here,
1:31
start-copilot
1:33
.markdown.
1:35
It will be a simple markdown file,
1:37
start-copilot.md.
1:41
So, make sure that you have Git- GitHub
1:42
Copilot installed. So, I'm assuming that
1:45
you have installed this GitHub Copilot.
1:48
And I have given this code in the
1:50
description of the video.
1:52
So, simply
1:56
copy this code from the description of
1:58
the video.
2:00
And paste it inside this file. So, these
2:02
actually
2:03
we are setting the provider, some
2:05
environment variables to open AI.
2:07
Then we are setting this
2:09
base URL which is open router.
2:12
And right here in the third property,
2:14
you need to submit this API key.
2:17
This API key that you created, simply
2:19
copy this API key.
2:21
And directly paste it.
2:24
So, after you paste this API key
2:27
the configuration is complete. We are
2:28
using open router {slash} free.
2:31
And now restart your terminal. Simply
2:34
type
2:35
uh copilot.
2:37
And now the CLI will open.
2:41
So, as you see copilot has opened it.
2:45
Uh simply type a message, "Hi."
2:48
So, you will now see the copilot will
2:51
respond to you.
2:52
We are actually using free models from
2:56
open router.
2:58
As you type the message, it will respond
3:01
to you.
3:04
>> [snorts]
3:08
>> So, this will be the session which will
3:09
be 0% right here. It will get increased
3:12
as you use the model.
3:19
So, now as you see, it responded to us,
3:21
"How Hi, how can I help you today?"
3:25
So, I will simply say, "Build an
3:27
application, build a advanced
3:31
image to PDF web app with all options.
3:36
Uh create a index.html file."
3:40
So, I submitted a prompt right here. I
3:41
want a advanced image to PDF web
3:43
application with all the options. Create
3:45
a index.html file. So, I submitted this
3:48
prompt.
3:49
So, now it will create this application.
3:53
Uh once it completes, you will get a
3:55
notification. Your file will be created.
3:58
So in this easy way, this is a complete
4:00
setup that I showed you step by step. So
4:03
create your account on OpenRouter.
4:06
Create API key. Uh just create this
4:08
file.
4:09
Start copilot.markdown.
4:11
Simply paste the code. I have given the
4:13
code in the description.
4:17
So now as you can see, it is thinking
4:19
about this.
4:21
So I've given this code in the
4:22
description. Simply replace this API key
4:25
that you will get from OpenRouter.
4:28
And you can easily use GitHub Copilot
4:30
for totally free using OpenRouter
4:33
free models. So it is actually
4:37
planning it as you can see.
4:46
So it exactly lists out what the
4:49
application is all about. And it is
4:51
creating the file now.
4:59
So as you see guys, it created the
5:01
application. 352 lines of code. It
5:03
actually
5:04
created this index.html file as you see.
5:08
With this easy way, you can create any
5:10
kind of application. Just list out the
5:12
framework
5:14
in the prompt. This is your image to PDF
5:16
application which is built
5:20
using this free model of OpenRouter
5:23
directly in the terminal. So in this
5:25
easy way, you can set it up. GitHub
5:27
Copilot to actually use OpenRouter.
5:31
So this is a step-by-step video. Thank
5:33
you very much for watching this video.
5:35
Please hit that like button and
5:36
subscribe the channel.
#Jobs & Education
