FlockTab

How it works

Reserve. Allow or block. Close the tab.

The money path is the product. If this page is longer than five minutes, we failed.

Without / with

The agent should not hold the provider key.

Same worker, two runtimes. Left: the agent has the ElevenLabs key and keeps billing. Right: it holds ft_live_ plus an unlock secret; FlockTab reserves, then kills at cap. v1's live proxy is OpenAI-compatible chat.

The call · without

Provider key in the agent. Close the process, not the spend.

import os
from elevenlabs.client import ElevenLabs

client = ElevenLabs(api_key=os.environ["ELEVEN_API_KEY"])
audio = client.text_to_speech.convert(
    voice_id="JBFqnCBsd6RMkjVDRZzb",
    text="The overnight batch finished.",
    model_id="eleven_multilingual_v2",
)

The call · with

ft_live_ authenticates the tab. x-flocktab-unlock unwraps BYOK.

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

    Point the SDK

    Same OpenAI client. base_url = https://proxy.flocktab.com/v1. Bearer ft_live_… plus x-flocktab-unlock. BLOCKED never reaches the provider.

  3. 03

    Reserve

    FlockTab estimates cents from model and max_tokens, then holds that against the tab. Fail closed if the ledger is down.

  4. 04

    Allow or block

    Policy order: tab state, cap, velocity, models, irreversible allowlist, tool caps. BLOCKED never reaches the provider.

  5. 05

    Settle

    After the response, unused reserve is released. Commit uses provider usage tokens, not the estimate. One line per decision.

  6. 06

    Close

    At cap, or by hand, the tab closes. Next call: 402 tab_closed, x-flocktab-reason: cap.day. Reopen on the window, manually, or never.