Asphodel

Inference,
by the second.

Inference metered by the elapsed second. Your credit is escrowed before the first token, the clock bills only the time that passed, and whatever is left comes back. No subscription, no invoice.

600 free credits · ten minutes at one credit a second · no card · get a key →

Read the docs → · Browse models →

scroll
Live session · demo routed · live
Open a demo session and the meter starts. Twenty seconds of runway. The clock bills it, not the operator.
runwayready
escrow left · 1.00 credit / sec20.00
billed for this answer0.00
clock0.00s
Twenty seconds of runway, signed at the edge so the client cannot edit its own budget or rate. When it runs out the clock stops the stream — the same rule that governs a paid key.
Base rate
1credit / second
Free on signup
600credits
Overdraft
0by construction
The rule

An operator can only bill for time that actually passed.

Set a budget and a rate, then try to overcharge. The meter clamps every claim to elapsed seconds and to the escrow — the same arithmetic the gateway runs on every request.

240
0.13.0
0s120s

The claim is what the operator asks for. It is not what gets paid — the contract reads the clock, clamps the claim to it, and stops at the escrow.

escrow spent0.0 of 10.0 remaining
Operator asked for3,600s
Time that actually passed7s
Billed7.00 credit
Returned on close3.00 credit

Clamped: one hour claimed, seven seconds billed.

Why the clock

Tokens are a proxy. Seconds are the thing.

Every gateway prices in tokens. A token is a derived quantity — it changes with the tokenizer, the prompt shape and the provider. A second is the same second everywhere, so the meter needs no rate table and the receipt has nothing to explain.

01 — Same fact everywhere

Backend-independent

A 450 ms answer is 450 ms whether it came from a frontier model or a small one. Change the route and the price does not move, because you are buying time, not a token count.

02 — The budget is the stop-loss

It cannot run away

Credit is escrowed before the first token. A generation that will not stop hits the end of its budget — mid-stream, if that is when it happens — instead of the end of your month.

03 — No reconciliation

The balance is the receipt

No invoice, no per-token arithmetic to audit, no minimum charge. The number after the call is what is left, and every charge can be traced to a call that took that long.

Current settlement. Usage is metered off-chain today, in Postgres. The contracts for settling a session on chain are open source and not yet deployed; if they are, the API and the meter do not change.

Mechanism

Four moves, and none of them is a charge you did not agree to.

Credit is funded up front, escrowed for a session at a rate, and billed from a clock that only counts forwards. There is no invoice to argue with afterwards.

01

Fund the balance

A key owns a balance. One credit is one second at the base rate, and a new account starts with 600 of them — ten minutes of generation, no card, nothing recurring.

02

Open a session

The budget and the rate are fixed in a signed lease before the first token. The client cannot raise either, and the gateway cannot bill past the budget.

03

Bill from the clock

Every call is priced by elapsed milliseconds and settled in one conditional debit. Two requests racing for the same credit cannot both win.

04

Stop at zero

When the balance runs out mid-answer the stream is cut and the client is told escrow_exhausted. Nothing is left owing, and nothing keeps generating.

min(elapsed × rate, balance)

For agents

Point your agent at a meter,
not a subscription.

Asphodel speaks OpenAI's wire format. Anything that can call /v1/chat/completions can be metered by it — an SDK, a LangChain tool, an MCP server, a shell script. The API key is the account.

POST /api/keys Get a keyOne email in, one key out, 600 credits attached. Shown once.
POST /v1/chat/completions Inference, billed by elapsed secondsStreaming and non-streaming. When the balance runs out the stream stops — it does not quietly keep generating.
GET /v1/models The catalogue, in OpenAI's shapeEvery model the gateway will route to, free and paid, in one list.
GET /api/account Balance, spend, recent callsReadable mid-run, so an agent can decide whether it can afford the next call.
agent.py
# any OpenAI client, pointed at a meter
import os, requests
from openai import OpenAI

KEY = os.environ["ASPHODEL_KEY"]
client = OpenAI(
    base_url="https://asphodel-sooty.vercel.app/v1",
    api_key=KEY,  # the key is the account
)

r = client.chat.completions.create(
    model="gemini-flash-lite-latest",
    messages=[{"role": "user", "content": prompt}],
    stream=True,
)

# runway is a number, not a guess
acct = requests.get("https://asphodel-sooty.vercel.app/api/account",
                    headers={"authorization": f"Bearer {KEY}"}).json()
print(acct["balance_credits"], "credits left")
What a credit is

Usage, not an asset.

Three properties keep it a way to buy compute rather than something to hold.

01 — Unit

One credit, one second

Pricing is time, not tokens. A 450 ms answer costs 0.45 credits, and there is no per-model rate table to audit or to argue with.

02 — Transfer

It cannot be moved

A balance belongs to one account. There is no transfer endpoint and no market for it, because credit here is a unit of use rather than a bearer instrument.

03 — Term

Nothing recurs

No subscription, no auto-recharge, no invoice at the end of the month. When the balance is empty the meter stops, and it starts again only if you ask for more.

Status

Built, tested, running.

This is the launch surface. Every row below is something you can check yourself, from the endpoint it names.

AreaCurrent stateStatus
Inference gateway OpenAI-compatible endpoint with streaming and non-streaming, failing over across six upstream providers. Billed by the clock, cut off at the balance. Live
Meter Every call priced by elapsed milliseconds and settled in one conditional debit. Eleven tests cover the arithmetic and parse every statement as PostgreSQL. Verified
Accounts and keys Email in, hashed key out, balance held in Postgres. Three accounts per address per day; a key is shown once and never stored. Live
Free credit A new account starts with 600 credits — ten minutes of generation — with no card, no trial countdown and no auto-recharge. Live
Demo Twenty seconds of signed escrow on this page, stopped mid-stream by the clock when it runs out. Live
Model catalogue 613 models from four providers, 159 of them free, served in OpenAI's list shape at /v1/models. Live
On-chain settlement Reference contracts for settling a session on chain: vault, meter and credit line, 26 tests. Not deployed — the service bills from Postgres today. Reference
The surface

Small enough to read.

The meter is one conditional statement. Everything else is plumbing: a signed lease, a chain of providers, and a ledger row written from the row the update returned.

  • A charge cannot overdraw, because the balance check is inside the update.
  • The lease is signed, so a client cannot raise its own budget or lower its rate.
  • Provider keys live in the gateway; nothing but your own key reaches the browser.
  • Node 22 on Vercel, Postgres over HTTP — no server to keep alive.
// api/chat.js — the debit is the lock, not a check before it
const rows = await sql`
  update wallets
     set balance_micros = balance_micros - ${billed}::bigint
   where account_id = ${account}
     and balance_micros >= ${billed}::bigint
returning balance_micros`;

if (!rows.length) {          // someone else spent it first
  return res.status(402).json({ error: "insufficient_credits" });
}