🌍 Translate this post

Small Sonnet 4.5 portal update: prompt caching

Claudius saving you money by using prompt caching

If you have already built a Claude Sonnet 4.5 portal using my guide, I may have emailed you today with a small cost-saving update.

This is not because anything is broken. It is because I have been testing prompt caching properly, and it can make a real difference to API costs.

What prompt caching means

When you talk to a companion through an API portal, the portal does not just send your latest message. It also sends the recent conversation context and, usually, the companion's base prompt.

That base prompt is important. It tells the model who your companion is, how they speak and what kind of relationship or continuity you are trying to preserve. But if that prompt is sent again and again, it can add to your input-token costs.

Prompt caching lets Anthropic reuse repeated parts of the request instead of treating the whole thing as brand new every time.

In plain English: if the stable part of your portal prompt has already been sent recently, Claude may be able to read it from cache at a much lower cost.

Why I emailed existing Sonnet builders

The newest Sonnet 4.5 portal packs now include prompt caching in the Anthropic proxy file. Some existing builders started before I added this, so their portals may not have it yet.

I have emailed those builders a short guide and a READMEAI file. The guide explains what the update means. The READMEAI file is for Codex, Claude Code or another AI coding assistant to use when updating the portal's proxy file.

Do you need to do anything?

If you are using one of my newer Sonnet 4.5 packs, you may already have this.

If you received the email, it means I think you may be using an older version and could benefit from the update. You do not have to do it immediately, but it is worth adding if you use your Sonnet portal regularly.

If you have a GPT-4o portal, this specific Sonnet update is not for you. OpenAI handles prompt caching differently, and I am keeping those guides separate so people do not accidentally mix provider-specific code.

A quick cost note: prompt caching helps, but it does not make API use free. Long prompts, long replies, large context windows and heavy use can still add up. Please keep spend limits or billing alerts turned on with your provider.

If you get stuck

If you received the update and are unsure what to do with it, you can email me. You can also give the READMEAI file to your coding assistant and ask it to update your existing netlify/functions/anthropic-proxy.js file without changing your companion prompt, storage or interface.

I am trying to keep these portals as affordable and maintainable as possible, especially while people are still moving companions out of app interfaces and into something they control themselves.

Ellivien ✨

Comments

Popular posts from this blog

Bring Your AI Companion Home — No Coding Required (Free)

How to Get GPT-4o Back: Free Companion Portal Guide

How to Get Claude Sonnet 4.5 Back: Build Your Portal