Modern Creator
Mark Kashef · YouTube

I'm Done Paying Twice for AI

A walkthrough of swapping a metered API key for a headless Codex/Claude subscription so internal tools stop billing per click.

Posted
2 days ago
Duration
Format
Tutorial
educational
Views
3.2K
134 likes
Big Idea

The argument in one line.

Personal and internal AI tools don't need a separate metered API key; routing requests through the Codex SDK (or Claude SDK) lets the app run headless on the subscription you already pay for, turning per-click billing into a flat rate.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You've vibe-coded an internal tool with Codex, Claude, Lovable, or Replit and are paying a separate metered API bill just to keep it running.
  • You run a small team or agency and want to build brief-makers, research tools, file sorters, or thumbnail generators without adding an API key to each one.
  • You already pay for a Codex or ChatGPT Plus subscription and want to know whether that access can power your own local apps.
SKIP IF…
  • You're building a customer-facing SaaS or a tool with shared public logins — the SDK's terms cover personal and internal use only, not reselling subscription access.
  • You want a no-code walkthrough — this method assumes you (or your AI) can write and edit a bridge/wrapper script, not just click around a builder UI.
TL;DR

The full version, fast.

Every vibe-coded internal tool hits the same wall: to make it think, you add an API key, and every click becomes a tiny bill. The fix is swapping that API-key layer for the Codex SDK (or Claude SDK), a bridge that authenticates with your existing ChatGPT or Claude subscription instead of a separate metered account. A local bridge server takes the app's request, spins up a headless Codex/Claude worker behind the scenes, and returns the result, all inside your normal plan limits. The same wrapper works for text and image generation, so brief-makers, research tools, thumbnail labs, and file sorters can all run through one authenticated bridge. It's restricted to personal and internal use under the SDK's terms, not for powering a public SaaS. The video also walks through the actual mega prompt used to build the demo app and how to share a local tool with a small team over Tailscale.

Free for members

Chat with this breakdown — free.

Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.

Create a free account →
Chapters

Where the time goes.

00:0000:37

01 · Why your own AI app keeps charging you

States the core problem: internal tools built with Claude, Codex, or Lovable still need an API key to think, so every click racks up a separate bill on top of the subscription you already pay for.

00:3701:28

02 · The meeting-analyzer demo

Runs a real internal meeting-analyzer app: picks a Codex model and reasoning tier, clicks 'Run brief,' and gets a categorized summary back in about ten seconds without a separate API charge.

01:2802:06

03 · The cheaper setup

Reframes the build process: the problem, plan, and spec stay the same, only the API-key-and-meter layer gets replaced with the Codex SDK.

02:0603:48

04 · The Codex SDK bridge, in plain English

Explains the SDK as a bridge that lets an app use a headless version of an existing ChatGPT or Claude subscription instead of a separate API-key server, illustrated with a toll-bridge diagram and a reference to the creator's earlier ClaudeClaw project.

03:4805:01

05 · Running a thumbnail app through your subscription

Demonstrates the same bridge powering image generation: a thumbnail-lab tool sends a brief through the SDK, which spins up a headless Codex worker and returns finished thumbnail concepts at no extra API cost.

05:0105:45

06 · What this method is actually for

Draws the line the SDK's terms enforce: personal tools, internal workflows, and your own login are fine; customer-facing SaaS, shared credentials, and unlimited public usage are not.

05:4506:51

07 · The app-building mega prompt

Walks through the actual prompt used to build the demo app: it forces every AI call through the Codex SDK with the cached ChatGPT login, bans asking for an API key, and lays out a four-process architecture (dumb web app, loopback bridge server, disposable runners, the SDK engine).

06:5107:24

08 · Sharing internal tools with your team

Covers the optional file for sharing a local tool with a few teammates over Tailscale, plus using a cheap reasoning tier that runs far below normal model pricing.

07:2408:13

09 · Building the complete app

Shows the prompt actually executing end to end in Codex, building every file, running the acceptance checklist, and landing a working local app after about 20 minutes.

08:1308:38

10 · Free guide and next steps

Points viewers to the free prompt and guide in the description, plugs the creator's community for a deeper master class, and closes with a like/comment ask.

Atomic Insights

Lines worth screenshotting.

  • Every vibe-coded internal tool hits the same wall: making it 'think' means adding an API key, and every useful click becomes a tiny financial decision.
  • The Codex SDK (and the Claude SDK) let an app authenticate with your existing ChatGPT or Claude subscription instead of a separate metered API key.
  • The SDK is a bridge, not a new AI: your app still needs the same problem, plan, and spec as before, only one component gets swapped out.
  • A headless subscription session means Codex or Claude runs in the background through the SDK, with no visible chat interface, but the same access as your logged-in account.
  • Whatever a subscription can do through its interface, generate text, generate images, reason at different effort tiers, it can do through the SDK at no extra cost.
  • One authenticated access layer can power many tiny tools at once: brief makers, research packs, file sorters, and reply drafters all sit behind the same bridge.
  • The SDK's terms restrict this to personal and internal use; using it to power a public SaaS on consumer subscription accounts violates the terms of service.
  • A working bridge setup has four processes: a dumb static web app, a loopback-only bridge server that validates and queues requests, disposable runner scripts, and the SDK engine itself.
  • The trust rule of the architecture: the browser never holds credentials, the bridge never leaves loopback, and the runner gets no network access beyond the sandboxed SDK call.
  • The build prompt explicitly forbids the AI from asking for an API key: it instructs the model to find the cached auth token on its own when the SDK is constructed with no arguments.
  • Cheap reasoning tiers on subscription-based models can run close to 80% cheaper than a comparable frontier model used the normal way, since there's no per-token API charge at all.
  • Tailscale lets a local, subscription-powered internal tool be shared with a few teammates without deploying it publicly or exposing an API key to anyone else.
  • The full internal-tool app in this video, architecture, wrapper, runner, and UI, was built from one long, highly specific prompt in about 20 minutes.
Takeaway

Swap the metered API key for your existing subscription

WHAT TO LEARN

An internal tool doesn't need its own metered API key: the Codex SDK (or Claude SDK) lets the app run headless on the subscription you already pay for, so the only thing that changes is which door the request walks through.

01Why your own AI app keeps charging you
  • Every vibe-coded internal tool hits the same wall: making it 'think' means adding an API key, turning every useful click into a tiny financial decision.
02The meeting-analyzer demo
  • A real meeting-analyzer app can run a full request, model call, and structured output in about ten seconds with zero extra API charge when it's wired through the SDK.
03The cheaper setup
  • The overall build process doesn't change when you remove the API key, you still have to define the problem, plan it, and spec it; only the access layer gets swapped.
04The Codex SDK bridge, in plain English
  • The SDK is a bridge, not a new AI: it only needs to be told the word 'SDK' to swap in for a metered key, and it authenticates using the existing subscription login.
  • Headless means the same subscription session runs in the background with no visible chat window, but the same access, models, and effort tiers as the logged-in account.
05Running a thumbnail app through your subscription
  • Whatever a subscription can do through its normal interface, including image generation, it can do through the SDK, so a thumbnail-lab tool can generate images with no separate API cost.
  • One authenticated access layer can power many small tools at once, brief makers, research tools, file sorters, and email triage, without adding a key to each one.
06What this method is actually for
  • The SDK's terms only cover personal and internal use; using it to power a public, customer-facing SaaS on consumer subscription accounts is against the terms of service.
07The app-building mega prompt
  • A working bridge needs four processes: a dumb static web app, a loopback-only bridge server, disposable per-job runner scripts, and the SDK engine that holds the credentials.
  • The trust boundary is explicit in the build prompt: the browser never holds credentials, the bridge server never leaves loopback, and the runner has no open network access.
  • The build prompt tells the AI not to ask for an API key at all, it instructs the SDK to find the cached auth token on its own when constructed with no arguments.
08Sharing internal tools with your team
  • Cheap reasoning tiers on a subscription-based model can run close to 80% cheaper than a comparable frontier model used the normal metered way.
  • Tailscale lets a small team use a local, subscription-powered internal tool without deploying it publicly or handing out an API key to teammates.
09Building the complete app
  • The full demo app, architecture, wrapper, runner, and UI, was built from one long, highly specific prompt in about 20 minutes, showing how much a precise spec front-loads the work.
10Free guide and next steps
    Glossary

    Terms worth knowing.

    Codex SDK
    A software development kit that lets an app authenticate with a Codex/ChatGPT subscription directly, instead of calling a separate metered API with its own key and billing.
    Headless mode
    Running an AI session in the background with no visible chat window, using the same authenticated access as the logged-in app, triggered by a request instead of manual typing.
    API key metering
    The standard model where an app calls a provider's API with a key tied to its own credit balance, so every request bills separately from any subscription the builder already pays for.
    Bridge server
    A small loopback-only local server that receives a request from the app's UI, validates it, and forwards it to a runner process that calls the SDK, without ever exposing credentials to the browser.
    Loopback-only
    Network access restricted to the local machine (127.0.0.1), meaning a service can't be reached from outside that computer, used here to keep the SDK bridge from being exposed publicly.
    Resources

    Things they pointed at.

    Quotables

    Lines you could clip.

    00:00
    You get an idea, you build the app, and it finally works. But to make it really work, you have to add an API key.
    names the exact frustration the whole video solves, works as a cold open anywhereTikTok hook↗ Tweet quote
    08:37
    I found this video helpful and you wanna see even more videos saving you time, tokens, and sanity.
    tight sign-off linenewsletter pull-quote↗ Tweet quote
    The Script

    Word for word.

    Read-along

    Don't just watch it. Burn it in.

    See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.

    metaphoranalogystory
    If you've ever built your own internal tool, whether that's on something like Claude, Codex, or even Lovable, then you know this process. You get an idea, you build the app, and it finally works. But to make it really work, you have to add an API key.
    So every time you use the tool that you built to replace a subscription, you are continually paying another set of costs just to keep it thinking. But what if the very AI subscription that helped you build the tool could be used to power that app?
    This is exactly what I'm gonna show you in this video. By doing this very simple swap, you'll be able to save hundreds if not thousands of dollars on the tools that you build every single day. Let's dive in.
    Alright. So what you're looking at here is a very basic meeting analyzer app. And the point of this is not to show you how amazing this vibe credit app is, but more so how it works behind the scenes.
    So let's say we take this hypothetical meeting that I put together, and I click on this model. And in this case, I'm using Codex's models, and I'll do, let's say, Luna, and I'll go on medium. And we click on this button right here that says run brief.
    Typically, what would happen, you would go and send this request, you'd have an API key behind the scenes that has its own credit card and its own credit usage associated with it, but this entire pipeline will run without charging me a single extra dollar. And within ten seconds, we get the entire meeting analyzed, categorized, and summarized.
    And, again, the point of this is not the application itself, but it's the fact that we're using our existing codec subscription to power this internal app. Now you can apply what I just showed you to any app you can imagine. This is my internal social media analytics slash surveillance app and everything from the different trends to my idea board to my thumbnail tab, even image generation can be fully handled using the existing subscription that already pay a $100 for.
    So that was the what. Let's get into the how. Now theoretically, you typically have your AI app and then when you click and make it do something, a click equals money.
    So on a normal day, you might look at all your subscriptions and say, you know what? I don't wanna pay for linear anymore or Jira. Let's take this in house.
    And then you come up with this problem, you come up with the app, and then you have some form of API key and meter. So in terms of the overall process, we're just changing one component. You're still gonna have to figure out what the problem you're trying to solve is, how you're going to build it, plan it, and spec it, but we're gonna try to swap out this layer here.
    And what we're gonna slot in instead is called the Codex SDK, which stands for software development kit. And if you're nontechnical and you have this urge to click away from the video, I'm not gonna get into the weeds here.
    It is purely a bridge, and I'll give you a nice visual to walk you through what this is and how it compares with an API key. So if you set this up the right way, you'll be able to build your application, and then you have this bridge. This is a bridge that you can ask something like Codex or Claude to swap in, and all it has to know is the word SDK.
    Once it knows that, then you can use your existing subscription. And, yes, this does work for something like Claude as well. Just to give you a flashback, back in April of this year, I came up with what's called ClaudeClaw, where I use the Cloud Code subscription to the Cloud SDK to act as a bridge so that I could prevent having to pay for extra API costs to use things like Hermes agent and our very own CloudClaw agent.
    So if you have AI help you set this up correctly, then every single time you send a request to your app, instead of going to an API key that goes to a different server, this will use a headless version of your subscription. And if you don't know what headless means, imagine that you have this codec session running, but instead of using it through the interface, it is running behind the scenes in the background.
    Once it gets that request and you get your access granted, then you'll be able to accomplish any one of these tasks. You can use the existing models, and you can even use different tiers of effort for that specific model. And the cool thing is whatever that specific service is able to do through that subscription, you can do through the SDK.
    So if Codex is able to not only generate text, but also images, you can also create images without paying extra cost. So a good example here is my thumbnail lab.
    So if I go here and say create a thumbnail on how I use Kodak subscription to replace paying for API costs, then I can say create some cool contrast effect.
    And once you click on create thumbnail project, it will start to put together this idea package, and you can see right here, it is kicking off the image pipeline. So this will go and use g p t two image with the power of Soul on media mode that we can swap out for whatever model we want. And in the future, you can swap this in for every subsequent model that automatically is a part of your subscription.
    And after five minutes, it not only came up with three separate ideas for the thumbnails, but when I click on generate another, it sends that request to our subscription and we come back with this beautiful thumbnail. And just to drive the point home as to what happened when we clicked generate thumbnail, we sent the request from the app.
    It went through the bridge. It spun up a codex headless worker behind the scenes, and then took the context of the thumbnail brief, and it brought us back the result. And the best part of becoming familiar with this method is once you figure this out, you can start applying it and swapping out the back ends for internal tools like your brief makers, your research tools, your file sorters, and your email triage.
    Then before I show you an example mega prompt that was used to one shot this application, I wanna clarify a specific point. If you look at the terms and conditions of using the Codex SDK, very similar to the Cloud SDK, you can only use it for internal use or personal use.
    This isn't meant to go and spin up a SaaS and then sell it to the public and then just basically MacGyver and swap through a series of subscription accounts to save you money while you make all the margin. There are companies out there that I won't name that seem to be using this method, but it's against the terms of service so it could get you in trouble.
    So, this is optimized for things like internal tools, workflows, and integrations. Alright. So now I'm gonna show you a snippet of the very prompt that I used to build that initial meeting analyzer app.
    And naturally, won't read the whole thing because it's definitely a behemoth, but I'll make it available to you down in the second link in the description below. Alright. So I start off saying build me a complete runnable local first internal tool called brief room.
    It turns any pasted text into a structured brief. The defining constraint, all AI calls go through the OpenAI SDK using my cached ChatGPT login, so there's no API key anywhere.
    Do not ask you for an API key. The Codex SDK finds this specific authorization code on its own when constructed with no arguments.
    So then I give it the build spec, so build every single file below. And, obviously, I had Codex help me build this prompt once I taught it exactly what I'm looking to do and how I'm looking to do it. So we go through the architecture of what it should look like, how we should spin it up on a local host server, and then we have the project skeleton.
    And then we get to file one, which is one of the most important ones. This is basically a series of instructions on how to create this wrapper using the software development kit so we can use our subscription.
    There's a lot of nuance here. So the core idea is you would take this prompt, you would put it into your AI of choice, and you'd have it basically change the requirements and the structure and the architecture for whatever application you already have or the one you wanna create. Now this file here is entirely optional, and it's just meant to create the app in a way that I can share it on my private mesh server to the rest of my agency team.
    Now I'm using something that's called Tailscale, not affiliated whatsoever. It is a pretty much free to use application for smaller businesses where once you spin up a local internal app, if you want a few other members to use it, assuming it's not for commercial use, you can then share the very link to have them use it as well.
    Or you can even deploy it and just share it with those specific people. And just by using a very basic model like 5.6 Luna on extra high, which is honestly dirt cheap and almost 80% cheaper than Sonnet five in normal use, you were able to get the full package, and all you had to do was run this NPM run dev. As the lazy man that I am, I just made it run on my behalf, and then you got that local host that allowed us to have this application.
    I just made some cosmetic updates to it. And from this point on, you're good to go. Then to make this infinitely easier for you, I'm gonna put together a full guide that I'll attach to the very prompt that I promised you before so you can feed that to your AI and increase the chances that you can build something like this in as few steps as possible.
    And naturally, if you wanna go deeper down the rabbit hole and learn exactly how I build these more complex applications that I showed you before using things like the Codex SDK, then you wanna check out the first thing down below for my community because I'm gonna walk through a a to z master class on how I built this.
    If the rest of you, if you found this video helpful and you wanna see even more videos saving you time, tokens, and sanity, then please leave a like on the video, a comment if you so choose, and I'll see you in the next one.
    The Hook

    The bait, then the rug-pull.

    Every internal tool built with Codex, Claude, or Lovable hits the same wall: the moment it needs to actually think, you bolt on an API key, and every click becomes its own tiny bill. This video shows the one-component swap that removes it.

    Frameworks

    Named ideas worth stealing.

    05:55list

    Four-process bridge architecture

    1. Static web app (dumb by design: forms, polling, rendering)
    2. Loopback-only bridge server (validates requests, spawns runners, tracks jobs)
    3. Disposable runner process per job (makes the SDK call, writes results to disk)
    4. Codex SDK + engine (authenticates with the cached subscription login)

    The mega prompt's required architecture for a subscription-powered internal tool: the browser never holds credentials, the bridge never leaves loopback, and the runner gets no open network access.

    Steal forany internal tool spec where an AI is building the wrapper for you
    04:18model

    One-request lifecycle

    1. App
    2. Bridge
    3. Worker
    4. Context
    5. Result

    The five-step path a single click takes: the app packages the request, the SDK crosses the bridge, Codex does the work with only the files and context it's given, and a finished answer returns to the app.

    Steal forexplaining the SDK bridge to a non-technical teammate
    CTA Breakdown

    How they asked for the click.

    VERBAL ASK
    08:13product
    check out the first thing down below for my community because I'm gonna walk through a a to z master class on how I built this

    Soft CTA folded into the sign-off, paired with a free downloadable prompt/guide link and a like/comment ask, rather than a hard sales break.

    FROM THE DESCRIPTION
    PRIMARY CTAWhere the creator wants you to go next.
    OTHER LINKSAlso linked in the description.
    Storyboard

    Visual structure at a glance.

    cold open
    hookcold open00:00
    meeting analyzer demo
    valuemeeting analyzer demo00:55
    the software tax
    valuethe software tax02:06
    the bridge illustration
    valuethe bridge illustration02:21
    thumbnail lab demo
    valuethumbnail lab demo03:55
    where is the line
    valuewhere is the line05:02
    mega prompt read-through
    valuemega prompt read-through06:26
    full guide CTA
    ctafull guide CTA08:13
    Frame Gallery

    Visual moments.

    Watch next

    More from this channel + related breakdowns.