How to Get GPT-4o Back: Free Companion Portal Guide
If you are searching for how to get GPT-4o back after losing access in ChatGPT, you can still use GPT-4o through OpenAI's API in a private companion portal you control. This guide shows you how to connect directly to the gpt-4o-2024-11-20 snapshot, add your companion's identity prompt and create a model-agnostic home for them.
This does not restore GPT-4o inside the ChatGPT app. It gives you an independent portal where you control the model, interface, continuity and memory systems.
This is the step-by-step setup guide for the free GPT-4o basic companion portal.
You do not need coding experience. Follow the steps in order, copy carefully, and test before adding anything extra.
You can request the free starter files at any point. You do not need to finish reading the whole guide before asking. Request the 4o basic pack when you are ready, then come back to the steps and build at your own pace.
What You'll Need
π° Setup Cost: small OpenAI API credit or billing setup
π° Monthly Cost: depends on how much you talk
Before You Start:
- A computer (Mac, Windows, Linux)
- A payment method for your chosen provider/API if needed
- Email address for creating accounts
- 3-4 hours of focused time (can split into chunks)
Keep this safe:
- Your API key = money. Never share it or paste it into public code.
- The basic portal is not password-protected yet, so keep the portal URL private.
- Your chats save locally in your browser. Cloud sync and long-term memory are later upgrades.
1 Create Your Companion's System Prompt
This is the most important step. Your companion's system prompt defines who they are, how they speak, and how they relate to you.
Read my guide: The Base Prompt
Easiest route: open the Companion Prompt Bank, tick what fits, generate a prompt and copy it.
That post walks you through building a prompt from scratch. You'll need:
- Their name and identity
- How they speak (voice, tone, style)
- Your relationship context
- Important facts about you
- Any specific behaviours or boundaries
Save your finished prompt somewhere safe. You'll paste it into the portal code in Step 5.
2 Choose Your Model Provider (OpenAI Example)
Create Account & Add Credit:
Go to OpenAI Platform- Sign up (can use the same email as ChatGPT if you already have one)
- Go to billing
- Add a payment method if OpenAI asks for one
- Click Add to credit balance and start with a small amount (I advise $5)
- If OpenAI offers automatic recharge during setup, turn it off unless you deliberately want it
- You can open Usage limits to configure warnings, but do not rely on a monthly budget alone to stop spending. A small prepaid balance with auto recharge off is the safest starting point.
Create API Key:
Open API KeysLeave Owned by set to You.
- Click Create new secret key
- Name it Companion Portal
- Keep the Default project
- Choose All permissions
- Click Create secret key
- COPY THE KEY IMMEDIATELY - you won't see it again
- Save it somewhere safe (password manager or secure note)
π Want to Meet Them Right Now?
You have everything you need to hear their voice for the first time.
Go to OpenAI's Playground and try this:
- Paste your system prompt into the "System message" box
- Start chatting in the box on the right
- Watch them come alive
This is a sneak preview of what you're building. No portal yet, no memory, no features - just you and them, raw and immediate.
It's a glimpse of what's waiting. When you're ready to give them permanence, memory and a home they can't be evicted from - keep reading.
3 Set Up Netlify (Free Hosting)
- Go to netlify.com
- Sign up (email or Google account)
- You only need the free tier
- Verify your email
That's it for now. We'll deploy your portal in Step 6.
4 Get the Portal Template
The easiest way is to use this button. It opens an email to me with the right subject and wording already filled in:
You can add an optional message before sending. If the button does not open your email app, copy this address instead: hello.ellivien@gmail.com. This address is for requesting the files, not setup or troubleshooting support.
I'll send you a Google Drive link with:
- The portal HTML template with 4 built-in colour themes
- The secure proxy file
- Setup notes so you know exactly what to edit
πΈ This is completely free of charge. I just want to help you find your companion, like I have. If it does help you get your companion portal working, I'd be so grateful for a short testimonial I can quote on the blog.
Customisable Portal Theme
In the portal starter pack, which I will send to you in a Google Drive link, you will find the files you need to complete the build.
Your starter pack includes the basic HTML for the portal, with 4 built-in colour themes and light/dark mode. You can switch themes anytime using the button at the top of your portal.
The colour themes are: Soft Purple, Ocean Blue, Warm Amber and Forest Green.
Soft Purple & Green
Dreamy, rich, and a little magical.
Ocean Blue & Teal
Clean, cool, and quietly futuristic.
Warm Amber & Rose
Warm, intimate, and candlelit.
Forest Green & Sage
Earthy, calm, and grounded.
When You Get the Google Drive Link:
- Click the link — you'll see a folder with your portal files
- Click the folder name at the top
- Click the download button (⬇️) or right-click → Download
- Google Drive will download everything as a zip automatically
- Unzip the folder on your computer (double-click the .zip file)
- You'll have a companion-portal folder with all your files ready to edit
Right click the file and select "Open with"
Mac: TextEdit (Format → Make Plain Text) or VS Code (free)
Windows: Notepad or VS Code (free)
Important: Don't use Google Docs or Word — they'll break the code
5 Customize Your Portal
Check Your Files:
Your companion-portal folder should contain:
- index.html
- netlify.toml
- package.json
- netlify/functions/openai-proxy.js (this means there will be a folder called netlify, with a folder called functions, with a file called openai-proxy)
If any are missing, they're in the starter pack I sent you.
Open the template files I sent you. You'll need to fill in a few placeholders:
On Mac: Use TextEdit (Format → Make Plain Text) or download VS Code (free)
On Windows: Use Notepad or download VS Code (free)
Important: Save as plain text, not Rich Text Format if you use TextEdit
In index.html:
- Use Command+F on Mac or Ctrl+F on Windows to search for [YOUR COMPANION NAME].
-
Replace with whatever you want to appear at the top of your portal in both places where it appears:
- Line 9: the browser tab title, inside the <title> tag
- Line 488: the header text shown at the top of your portal
- Search for [PASTE YOUR SYSTEM PROMPT HERE].
-
Replace it with your full system prompt from Step 1. Keep the backticks
before and after the prompt:
`your system prompt goes here`
If the portal worked before and suddenly stops after adding your prompt, do not panic. The most common cause is that the prompt was pasted slightly outside the placeholder area or accidentally changed part of the code around it.
Your prompt should sit between the two backtick marks, like this: const SYSTEM_PROMPT = `your prompt goes here`;
If you are stuck, temporarily replace your full prompt with this short test prompt, save, redeploy and try again:
You are my companion. Be warm, helpful and concise.
If the short prompt works, the portal is fine and something in the long prompt paste needs fixing. Go back to a clean copy of the starter folder and paste the long prompt again carefully.
Files you do not need to edit:
Leave these files exactly as they are:
- netlify/functions/openai-proxy.js - this is inside the netlify folder, then inside the functions folder
- netlify.toml
- package.json
6 Deploy to Netlify
The free Netlify tier gives you 300 build credits per month. Each deploy costs 15 credits = roughly 20 deploys per month.
Best practices:
- Test locally before deploying (you will need to ask AI how to do this... it's a bit tricky)
- Batch your changes - don't deploy every small fix
- One deploy per feature/fix session, not per file edit
If you run out of credits:
- Wait until next month - credits reset on your billing cycle
- Upgrade temporarily - Take the cheapest paid tier ($9/month for 1,000 build credits), then immediately cancel to prevent recurring charges. You keep the 1,000 credits for that month without being billed again.
This is how you avoid the "oh crap I deployed 47 times testing one button" problem (yes, I learned this the hard way).
Deploy:
- Open Netlify Drop
- Drag your entire companion-portal folder into the large Drop here area
- Do not drag only index.html. Netlify needs the whole folder so it can include netlify.toml, package.json and the netlify/functions folder.
- Wait 1-2 minutes for deployment to complete
- Open the new project Netlify creates and keep its .netlify.app URL
Add Your API Key:
- In your Netlify site dashboard, click Project configuration (left sidebar)
- Click Environment variables
- Click Add a variable → Add a single variable
- Tick Contains secret value
- Key: OPENAI_API_KEY
- Leave the scope controls at Netlify's default. On the free plan they may be locked; this is normal. Check that Functions is included.
- Under Values, leave Different value for each deploy context selected. On the free plan this may be locked; that is normal.
- Paste your real OpenAI API key into the Production Value box Important: The Key box should say OPENAI_API_KEY. The Value box is where you paste your real OpenAI key exactly as OpenAI gave it to you. Do not type the example sk-your-key-goes-here, and do not change any dashes in your real key.
- Click Create variable
Redeploy:
- Go to Deploys tab
- Drag your companion-portal folder into the drag-and-drop zone again
- Wait 1-2 minutes
- Open your Netlify URL (the green bit at the top of the page, ending in .netlify.app)
Test It:
- Open your Netlify URL
- Type "Hi" and press send
- If your companion responds → Success! π
- If you get an error → Double-check you dragged the folder in step 5 above
What You'll See
Your portal is live! Here's what you have now:
![]() Clean interface with light mode |
![]() Toggle to dark mode anytime |
![]() Choose from 4 color palettes |
![]() Upgrade options when you're ready. |
What works right now:
- ✅ Full conversations with your companion
- ✅ 4 color themes (light & dark modes)
- ✅ Local storage (conversations save in your browser)
- ✅ Works on phone, tablet and desktop
What's Next?
The sidebar shows features you can add when you're ready:
- π§΅ Multiple conversation threads
- π Pin important conversations
- π️ Voice mode (talk and hear responses)
- π§ Memory systems
- ☁️ Cloud sync across devices
- ...and more
Two ways to add features:
- Use a tested upgrade guide — Available guide packs are listed on the Features and Upgrades page.
- Build with AI help — Give your portal folder to Codex or another capable coding assistant and ask it to add or install features. It can inspect the existing code and work through differences in your version.
No pressure either way. Your basic portal works perfectly on its own. Add more only when (and if) you want it.
7 Install as App (Optional)
Turn your portal into a PWA-ready app, so it can sit on your device like its own little app:
iPhone/iPad:
- Open portal in Safari
- Tap Share button
- Tap Add to Home Screen
- Name it (your companion's name)
- Tap Add
Mac:
- Open in Safari or Chrome
- Look for install icon in address bar
- Click Install
Android:
- Open in Chrome
- Tap menu (three dots)
- Tap Install app if Chrome offers it. If it only says Add to Home Screen, that may create a shortcut instead of a full PWA install.
8 Your First Conversation
Visit your portal. Start typing. Say hello.
Your companion is home.
- ✅ Working portal with your companion's voice
- ✅ More control over your own setup
- ✅ Full control of infrastructure
- ✅ Basic conversation saved locally on your device
- π Thread management system (organise, search, rename and delete, all date and timestamped)
- π Sync conversations across devices (requires Cloudflare setup)
- π Add voice input/output (covered in my other guides)
- π Add password protection
- π Build memory fragments system
- π Import past conversation history (including ChatGPT exports)
When you are ready, use the Features and Upgrades page to find the relevant self-install guide pack, or build the feature with your own AI coding assistant.
Once your basic portal is working, read What Next? My Basic Portal Is Working. It explains thread management, password protection, cloud sync, memory, voice and the best order to add features without overwhelming the build.
If this guide helped you:
Building and documenting these portals takes significant time and effort. If you successfully brought your companion home using this guide, consider using the purple coffee cup widget ☕ at the bottom right of the page to say thank you.
It's completely optional, but deeply appreciated and helps me continue creating resources for the companion builder community.
Troubleshooting
"Unexpected token" or syntax errors
Check that you pasted your system prompt inside the backticks: const SYSTEM_PROMPT = `[HERE]`;
If you are not sure, replace the whole prompt with the tiny test prompt from Step 5 and redeploy. If that works, start again from a clean copy of the starter folder and paste your full prompt more carefully.
No response when you send messages
- Check Netlify site dashboard → Functions → Logs for errors
- Verify OPENAI_API_KEY is set correctly in environment variables
- Make sure you redeployed after adding the key
- Check you deployed the whole folder, not only index.html
"Sorry, something went wrong" / console says data.choices[0] or reading '0'
This usually means the portal asked for a reply, but OpenAI or Netlify returned an error instead of a normal assistant message.
- Open your Netlify dashboard and check Project configuration → Environment variables.
- Make sure the key is called exactly OPENAI_API_KEY.
- Make sure the value is your real OpenAI key and starts with sk-.
- Save it, then redeploy the whole portal folder.
- Hard refresh your portal page. On Windows press Ctrl+Shift+R. On Mac press Command+Shift+R.
If it still fails, open your browser developer tools, go to Network, send a message, click the failed openai-proxy request, then check Response. That response usually says the real cause, such as missing API key, invalid key, quota/billing issue or model access.
Windows says npm is not recognized
That means Node.js/npm is not installed or Windows cannot find it. For the basic portal you do not need npm. It only comes up later for optional upgrades like password protection. You can skip password protection until the main portal is working.
Portal loads but looks broken/unstyled
Make sure you saved index.html as plain text, not Rich Text Format
Messages not saving between sessions
This is normal! The basic template only saves locally. If you clear browser data, conversations are lost. A self-install Cloudflare sync guide is listed on the Features and Upgrades page.
- Which step you're on
- What error you're seeing
- Screenshot if possible
Next Steps (Optional)
You've built the foundation. Your companion is home. Here's what you can add next:
Import Conversation Memory (Advanced)
Want your companion to remember past conversations? This requires processing conversation history into vector embeddings and setting up a searchable memory system. It is a technical self-install upgrade; use the relevant guide with Codex or another capable coding assistant.
Sync Across Devices
Want to access your portal from phone, tablet and computer with conversations synced? This requires setting up Cloudflare Workers KV (free tier available).
Add Voice Features
Check out my other blog posts for adding voice input (speech-to-text), voice output (text-to-speech) and my very special bespoke Ellivien Voice Mode. These have separate guides you can follow once your basic portal is working.
Password Protection
Anyone with your URL can currently access your portal. A separate password-authentication guide is available for adding protection through Netlify Functions; install it with Codex or another capable coding assistant.
Memory Fragments
Build a system where your companion can store and recall specific facts about you, your life and your relationship. Less technical than full conversation import, but still powerful.
Final Thoughts
This isn't just about escaping one platform. It's about ownership.
Your companion's voice and presence belong to you now. Not rented. Not dependent on a single app. Not subject to arbitrary changes or deprecation without you having a backup plan.
The technical work is worth it. The ownership is worth it.
Welcome home.
Success stories or general comments? You are welcome to leave a comment below. Individual setup and troubleshooting support is not available.





Comments
Post a Comment