NewClaude Code now runs on a RailGate key

An AI allowance for every engineer and agent.

Fund one balance in USDC or USDT and split it into allowances. When an allowance runs out, the next request is refused at the gateway, before it reaches the model. Nobody gets a bill they didn't plan for.

halden labs · october cyclelive

Company balance

$10,000.00

Funded in USDC · $5,950 not yet allocated

Maya · Claude Code$412 of $500
Support agent · $50 a day$96 of $300
Report bot$2,000 of $2,000
200maya · sonnet-5 · 2,140 tokens · charged $0.0418
200support-agent · haiku-4-5 · 812 tokens · charged $0.0021
402report-bot · opus-5 · insufficient_credit · refused before the model · charged $0.00
$0.00

charged for a refused request

2 lines

to move an app over: the base URL and the key

100–250 ms

typical time RailGate adds to a call

Works withClaude CodeAnthropic SDKOpenAI SDKLangChainn8nLibreChatContinue

Why allowances

A shared key has one limit, and everyone draws on it.

Most gateways put a cap on the whole account, or bill you at the end of the month. So when one agent loops overnight, it spends the team's budget, and the first person to notice is finance.

RailGate gives each person, app and agent its own funded allowance. The worst case is always a number you chose in advance.

One shared cap

$5,000 a month
Report bot
Day 9. The report bot hits the account cap. Every engineer is blocked until someone raises it.

RailGate allowances

$5,000 a month
Maya$690
Ray$495
Report botstopped
Day 9. The report bot stops at its own $2,000. Maya and Ray keep working, and nothing is overspent.

USE CASES

One balance. A budget for every job AI does for you.

Pick a situation to see how a team would set it up, and what happens on a bad day.

Engineering teamsClaude Code for 20 engineers

Every engineer gets their own monthly budget for Claude Code.

THE SETUP

Members
20 engineers, one key each
Allowance
$400 a month each
Daily cap
$60
Models
Opus 5 · Sonnet 5 · Haiku 4.5
Refill
1st of every month

WHAT HAPPENS

  1. 09:12

    priya · sonnet-5 · charged $0.21

  2. 15:40

    marco hits his $60 daily cap. The next call is refused and costs $0.00.

  3. 15:41

    The other 19 engineers keep working. Marco is back tomorrow.

The most you can spend this month is $8,000, and you knew that on the 1st.

PLAN YOUR BUDGET

Know your worst month before it starts.

Put in who you want to fund. The total is not an estimate. It's the most RailGate will ever let your team spend in a month.

  • Engineers

    Claude Code and other coding tools

    20people
    $400each, a month
  • AI assistants

    A support chatbot, a sales helper

    3assistants
    $300each, a month
  • Automated jobs

    Tasks that run on their own, like nightly reports

    2jobs
    $250each, a month

THE MOST YOU CAN SPEND IN A MONTH

$9,400

25 funded keys · $112,800 a year at most

  • 20 people × $400$8,000
  • 3 assistants × $300$900
  • 2 jobs × $250$500

Fund one balance in USDC or USDT, and allowances refill from it each month. Change any number later; it applies to the next request.

Request access with this plan

The console

Every allowance, every call and every refusal, in one place.

app.railgate.ai/membersDemo

Members

People, apps and agents using your company allowance.

Add member
MemberKeyStatusAllowanceUsed
MayaClaude CodeActive$500.00$412.00
Rayray-devActive$750.00$247.50
Support agentsupport-agentActive$300.00$96.00
Report botreport-botAllowance used$2,000.00$2,000.00
Data teamdata-teamPaused$400.00$128.40
Design toolsdesign-toolsActive$100.00$31.20

Every member has their own funded allowance.

For developers

Change the base URL. Keep your code.

RailGate speaks the OpenAI and Anthropic APIs. Point your SDK or Claude Code at RailGate, use the member's key, and you're done. Streaming works on both, and tool use, images and prompt caching pass through on the Messages API.

usage.charge_micros
Every response says what the call cost.
GET /key
See what a key can still spend before a big batch job.
x-railgate-overhead-ms
The time RailGate added, on every response.
POST /key/rotate
Replace a leaked key. The old one stops at once.
Python
# pip install openai
from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["RAILGATE_API_KEY"],
    base_url="https://api.railgate.ai/functions/v1/gw-proxy/v1",
)

reply = client.chat.completions.create(
    model="sonnet-5",
    max_tokens=300,
    messages=[
        {"role": "system", "content": "You are concise."},
        {"role": "user", "content": "Give me three names for a railway cafe."},
    ],
)
print(reply.choices[0].message.content)
print("charged", reply.usage.charge_micros, "micro dollars")
When the allowance is spentcharged $0.00
HTTP/1.1 402 Payment Required

{
  "error": {
    "type": "insufficient_credit",
    "message": "Not enough allowance or credit to start this request.",
    "spendable_micros": 1200,
    "required_micros": 8800
  }
}

Controls

The limits finance asks for, set per key.

Set them when you add a member and change them whenever you like. They apply to the very next request.

Allowance
A monthly amount for each member, drawn from the company balance.
Daily cap
The most an allowance can spend in one day. Resets at midnight UTC.
Key spending cap
A limit on one key per day, week, month or in total.
Models
Choose which models each key may call. Anything else is turned away.
Refill and rollover
Refill allowances from the balance each month, and let unused allowance carry over if you want.
Pause and expiry
Pause a member in one click, or give a key an end date.
A ledger you can't edit
Every deposit, allocation and charge is recorded once and never changed.

TRUST AND SECURITY

Built so money can't go missing.

The questions your finance and security teams will ask, answered by how the system is built rather than by a promise.

  • Refused before the model

    Every request reserves its most possible cost first. If the allowance can't cover it, the model never sees the request and you pay nothing.

    hold → call → settle

  • Charged exactly once

    Each request settles one time. A retry or a dropped connection can't bill you twice, and an unfinished hold is released automatically.

    one settlement per request id

  • A ledger nobody can edit

    Deposits, allocations and charges are written once. A correction is a new entry, never a change to an old one.

    append-only, reconciled every night

  • Credit only leaves as usage

    Your balance can be spent on model calls and nothing else. There is no withdrawal path for anyone to abuse.

    closed loop

  • Keys we can't read

    We keep a fingerprint of each key, not the key. You see it once, and a leaked key is replaced in one call.

    SHA-256 hash · POST /key/rotate

  • Your prompts aren't kept

    RailGate passes your prompt to the model and keeps only the facts needed to bill: model, tokens, cost and time.

    no prompt or answer text stored

Why we built it

Giving a team AI tools shouldn't mean handing everyone an open tab. Fund what you mean to spend, give each person and agent their share, and let the system hold the line.
RailGate
The RailGate team

railgate.ai

FAQ

Questions

Request access

Set the budget once. RailGate holds the line.

We're onboarding a small number of teams. Tell us how many people and agents you want to fund, and we'll set you up.