DEV Community

Mahesh Sd
Mahesh Sd

Posted on

No OpenAI key? Build AI prototypes on the GitHub Copilot you already have

I wanted to try an AI feature at work. Summarise a ticket, pull fields out of an invoice, answer questions from our docs. The usual blocker came up straight away: no OpenAI key. Getting one meant a request, an approval and a budget conversation, all for an idea that might not survive the afternoon.

But I already had GitHub Copilot. Most developers do now, and even the free plan gives you capable chat models. So I asked a simple question: can my own prototype talk to the Copilot I'm already signed in to?

It can. I packaged the answer into one command.

npm create copilot-sdk-app@latest my-poc
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025

That creates a project, installs everything, signs you in to Copilot if needed and opens a working AI chat app in your browser.

One command to a working AI prototype

What you get

  • A React chat app (Vite) with streaming answers, a model picker and conversation memory.
  • Images and files in chat: PNG, JPEG, WebP and GIF images, plus PDF, Word and text files. Use the button, paste them in, or drag them onto the chat.
  • A one-line helper for your own React code:
import { askCopilot } from "./copilot";

const summary = await askCopilot(`Summarise this complaint in 2 lines:\n${text}`);
const fields = await askCopilot("Extract the invoice number and total", { files: input.files });
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025
  • A useCopilotChat() hook when you want a full streaming chat.
  • A local REST API at http://localhost:3001/api, so Python, Postman, Angular or anything else on your machine can use it too.

The part I like most: it speaks OpenAI

Plenty of us already have side projects or internal tools written against the OpenAI API. They just have no key to run with.

While the starter is running, it also serves an OpenAI-compatible endpoint. Point any existing app at it by changing two settings and nothing else:

OPENAI_BASE_URL=http://localhost:3001/v1
OPENAI_API_KEY=copilot   # any value, it's never checked
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "http://localhost:3001/v1", apiKey: "copilot" });

const res = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "What is a closure in JavaScript?" }],
});
console.log(res.choices[0].message.content);
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025

Python, LangChain, LlamaIndex and the Vercel AI SDK all work the same way, because they all let you set a base URL.

It supports /v1/models and /v1/chat/completions, including streaming, system messages, chat history and images. If your code asks for a model Copilot doesn't have (say gpt-4o-mini), it falls back to your default model, so existing apps run unchanged. It doesn't support embeddings, tool calling or JSON mode yet.

Quick check that it's alive:

curl http://localhost:3001/v1/models
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025

"My company turned off Copilot CLI"

That was my exact situation on my office laptop. The official SDK needs Copilot CLI, and my organisation had disabled it.

So the starter has a VS Code mode. It installs a small extension that uses Copilot through VS Code's own Language Model API, which is the same access Copilot Chat in your editor already has. The launcher detects this and offers it automatically. Same React app, same REST API, same OpenAI endpoint.

How it works

Your React app / any OpenAI client
            │
   localhost:3001  (/api and /v1)
            │
   ┌────────┴─────────┐
 Copilot SDK      VS Code extension
 (CLI mode)       (VS Code mode)
            │
   Your own GitHub Copilot
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025

Under the hood it uses GitHub's official @microsoft/copilot-sdk, not scraping and not an unofficial API.

Safe by default

  • The server listens on 127.0.0.1 only, so nobody else on your network can use your Copilot.
  • Copilot's tools are switched off: no shell commands, no file edits, no web fetches. It's plain question and answer.
  • It runs in an empty working folder, so it never reads your project files.
  • A built-in rate limit (20 requests a minute and 2 at a time by default, set in .env) stops a runaway loop from burning your quota.

Things to know

  • It's for prototypes. Your Copilot plan is for you, not for serving customers. When the idea works, move it to a proper API.
  • Check your company's policy before using it with work data. It uses your Copilot seat, so the same rules apply.
  • Premium models count against your Copilot premium-request allowance, like they do in the editor.

Try it

npm create copilot-sdk-app@latest my-poc
💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025 💬 ชาวเน็ตแห่แชร์: mahesh sd cceffab/no openai key build ai prototypes on the github copilot you already have b - Kapook Update 2025

It's MIT-licensed and open to issues and pull requests. If it saves you an approval ticket, a star on GitHub helps other people find it. And if you build something with it, tell me in the comments. I'd love to see it.

If you'd like to support the project: Buy me a coffee.

Top comments (0)