How it works

Reserve. Allow or block. Close the tab.

The money path is the whole product: every call is held against the agent's tab before the provider sees it. Here it is, one call at a time.

Without / with

Same chat call. One side has a $5 tab.

Both panes are OpenAI-compatible /v1/chat/completions. Left talks to OpenAI with the provider key and keeps spending past $5. Right talks to FlockTab; remaining counts down from $5, then the tab closes and OpenAI is never called again.

Nothing to install: proxy.flocktab.com. Your provider key is stored encrypted and opened per call with the unlock your agent sends. Same price as self-hosted.

Without FlockTab · same agent
overnight-batch
OPENAI_API_KEY=sk-••••
spent
$0.00
$ python run.py
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $1.25
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $2.50
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $3.75
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $5.00
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $6.25
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $7.50
POST api.openai.com/v1/chat/completions
200 billed $1.25 spent $8.75
still running. past $5.00. no kill.
With FlockTab · same agent
overnight-batch
FLOCKTAB_KEY=ft_live_•••• UNLOCK=••••
remaining of $5.00
$5.00
$ python run.py
POST proxy.flocktab.com/v1/chat/completions
ALLOWED reserved $1.25
200 settled $1.25 remaining $3.75
POST proxy.flocktab.com/v1/chat/completions
ALLOWED reserved $1.25
200 settled $1.25 remaining $2.50
POST proxy.flocktab.com/v1/chat/completions
ALLOWED reserved $1.25
200 settled $1.25 remaining $1.25
POST proxy.flocktab.com/v1/chat/completions
ALLOWED reserved $1.25
200 settled $1.25 remaining $0.00
POST proxy.flocktab.com/v1/chat/completions
BLOCKED 402 tab_closed cap.day
stop. OpenAI never called.

The call · without

Direct to OpenAI. Provider key in the agent. Spend has no tab, so it runs past $5.

import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
chat = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarize the batch."}],
    max_tokens=128,
)

The call · with

Same OpenAI SDK. base_url is the hosted proxy. ft_live_ is the tab. x-flocktab-unlock opens your stored provider key for this call. After $5 the next call is 402 and never reaches OpenAI.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://proxy.flocktab.com/v1",
    api_key=os.environ["FLOCKTAB_KEY"],
    default_headers={
        "x-flocktab-unlock": os.environ["FLOCKTAB_UNLOCK"],
    },
)
chat = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarize the batch."}],
    max_tokens=128,
)
  1. 01

    Open a tab

    Name the agent. Set a hard cap and a window. Issue ft_live_... The tab is open.

  2. 02

    Run the agent on it

    Install tab, log in once per machine, then run tab claude, tab codex, tab grok or tab kimi in the project folder. A subscription Agent uses the harness's own login; an API Agent uses your provider key. Any other OpenAI- or Anthropic-compatible client works by pointing its base URL at FlockTab.

  3. 03

    Reserve

    FlockTab estimates the call's cost from the model and max_tokens and holds it against the tab. If the ledger cannot be reached, the call is refused.

  4. 04

    Allow or block

    Checked in order, first refusal wins: the tab is open, the cap has room, velocity, the model, irreversible tools, tool caps. A refused call never reaches the provider.

  5. 05

    Settle

    After the reply, the call settles at the tokens the provider reported, not the estimate, and the rest of the hold is released. One ledger line per decision.

  6. 06

    Close

    At the cap, or when you close it, the tab closes and the next call gets 402 tab_closed with the reason. It reopens at the next window, by hand, or never: your choice per Agent.