Boise AI · proof of concept · 2026-10-23

One key per member.
One bill for the group.
Nothing to install.

A pooled inference gateway on Cloudflare. A member gets a virtual key with a monthly dollar cap; the key works in a plain chat box on this page, in any OpenAI-compatible app, and in Claude Code. The group pays one provider bill at list price. The organizers see spend per person and per model.

How it is wired

MemberChat box here, or an OpenAI SDK, Open WebUI, Cursor, Claude Code. Sends bac_live_….
→
Commons (Pages Functions + D1 + KV)Hashes the key, checks tier and monthly budget, enforces 30 req/min, swaps in the pooled key, meters tokens, logs cost.
→
Cloudflare AI GatewayOne pooled key. Workers AI models for the free tier; OpenAI and Anthropic at list price for builders. Logs, caching, provider fallbacks live here.
Talk to it

Web chat

Paste a key once, pick a model, chat. Streams. Spend meter updates after each reply.

Build with it

OpenAI-compatible API

POST /api/v1/chat/completions and GET /api/v1/models. Works with the openai SDK by changing base_url.

Claude Code

Anthropic Messages API

POST /api/v1/messages. Set ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY to your commons key.

Operate

Admin

Create members, set tier and budget, issue or revoke keys, see spend by member, model and day. Shared admin secret for the POC; real login is the next step.

What it costs, with the arithmetic shown

Prices are the providers' published list prices on 2026-10-23 (Workers AI from Cloudflare's models API; OpenAI and Anthropic from their pricing pages). The gateway adds no markup; Unified Billing adds 5% on credit top-ups if the group pays Cloudflare instead of each provider. Usage assumptions are illustrative, not measured.

ModelTier$ / M input$ / M outputA "heavy chatter" month*A Claude Code day**
Loading from /api/v1/models…

* 300 messages, 1,500 input + 400 output tokens each = 450k in / 120k out.   ** 40 agentic turns, 25k input + 1.5k output each = 1.0M in / 60k out. Shown for every model as a like-for-like token cost; only the Anthropic rows actually work in Claude Code today. No prompt caching counted; with caching, repeated-context input cost drops roughly 5x.

Fixed costs. Pages, Functions, D1, KV, AI Gateway: $0 at this scale (free tiers; Workers Paid is $5/mo if invocations pass 100k/day). Workers AI needs no GPU and bills per token. The thing to avoid is renting GPUs: a single mid-range GPU instance runs $400–$900 a month idle, which is more than 50 members on the free tier would spend. Keep it metered, not provisioned.

Member tier (default $5/mo cap)

Workers AI only: Llama 3.3 70B, gpt-oss-120b, Qwen coder. $5 buys about 2.5M output tokens on Llama 70B. Most people never hit it.

Builder tier ($20–$50/mo cap)

Adds GPT-5 mini, Claude Haiku 4.5 and Sonnet 4.5 for Claude Code. Cap is per person, enforced before each call, resets on the 1st.

What this replaces

"Ask" on the org site queuing on one person's consumer plan. A consumer subscription is for one human; serving a group through it is outside its terms and does not scale. Per-member API keys at list price fix both.

Try it

Enter a commons key. Keys are issued by an organizer; this page never stores the pooled upstream key. The key you paste stays in this browser tab only.

no key
Nothing yet. Ask something.

Use the same key elsewhere

Python, OpenAI SDK

from openai import OpenAI
c = OpenAI(base_url="/api/v1", api_key="bac_live_…")
r = c.chat.completions.create(model="llama-3.3-70b",
    messages=[{"role":"user","content":"hi"}])
print(r.choices[0].message.content)

Claude Code (builder tier)

export ANTHROPIC_BASE_URL=/api/v1
export ANTHROPIC_API_KEY=bac_live_…
export ANTHROPIC_MODEL=claude-sonnet-4-5
claude

Note: Claude Code calls /v1/messages; this POC forwards that shape. Tool-use streaming was spot-tested with curl, not with a full Claude Code session yet.

curl

curl /api/v1/chat/completions \
  -H "Authorization: Bearer bac_live_…" \
  -H "content-type: application/json" \
  -d '{"model":"llama-3.1-8b","messages":[{"role":"user","content":"hi"}]}'

Organizer panel

Needs the admin secret. Members never see this.

cents/mo

What is real and what is not

Real nowNot yet
Per-member keys (hashed at rest), monthly caps enforced before every call, 30 req/min per key, token metering from provider usage blocks, cost in integer microcents, streaming on both API shapes, model allowlist by tier, admin create/update/revoke/usage, this chat. Real organizer login (shared secret only). Member self-service signup. Prompt-cache accounting for Anthropic (counted as input). Monthly email of spend. Hosting and CI for member prototypes (that is the Pages + GitHub org half of Cam's ask; a separate, smaller POC). Rotation of the pooled key. Abuse review of prompts.