Docs
An OpenAI-compatible endpoint that bills by the second. Create a key, point any SDK at it, and read the meter from the response headers. Every new key starts with 600 free credits — ten minutes of generation, no card.
01Get a key
# creates an account and returns one key, once
curl -s https://asphodel-sooty.vercel.app/api/keys \
-H 'content-type: application/json' \
-d '{"email":"you@example.com"}'
{"account":{"id":"acct_…","email":"you@example.com"},
"key":"asp_…","key_prefix":"asp_…",
"balance_credits":600,"granted_credits":600}
02Call it
curl
curl https://asphodel-sooty.vercel.app/v1/chat/completions \
-H "authorization: Bearer $ASPHODEL_KEY" \
-H 'content-type: application/json' \
-d '{"model":"gemini-flash-lite-latest",
"messages":[{"role":"user","content":"hello"}],
"stream":true}'
Python
from openai import OpenAI
client = OpenAI(
base_url="https://asphodel-sooty.vercel.app/v1",
api_key="asp_your_key",
)
stream = client.chat.completions.create(
model="gemini-flash-lite-latest",
messages=[{"role": "user", "content": "hello"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
Node
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://asphodel-sooty.vercel.app/v1",
apiKey: process.env.ASPHODEL_KEY,
});
const r = await client.chat.completions.create({
model: "gemini-flash-lite-latest",
messages: [{ role: "user", content: "hello" }],
});
console.log(r.choices[0].message.content);
model is optional. Omit it and the gateway picks the first provider that
answers. List the ones you can name at /v1/models or browse them at
/models.03Read the meter
Every non-streaming response carries the charge:
| header | meaning |
|---|---|
| x-asphodel-billed | Micro-credits charged for this call. 1,000,000 = one credit = one second. |
| x-asphodel-elapsed-ms | Wall-clock milliseconds from request accepted to response finished. |
| x-asphodel-remaining | Your balance after the charge, in micro-credits. |
| x-asphodel-session | The id of this call in the ledger. |
Streaming responses start at zero (nothing is known yet) and close with a comment line, which SSE clients ignore but a human can read:
data: [DONE] : asphodel session=w465b5814 elapsed=0.45s billed=0.44 remaining=598.98 credits
04Know when it stops
| status | type | what happened |
|---|---|---|
| 401 | authentication_error | No key, or a key that was revoked. |
| 402 | insufficient_credits | Balance is zero. The request never reached a model. |
| 429 | rate_limited | Too many requests from one address, or a demo session started too recently. |
| 502 | upstream_error | Every provider in the chain failed or is cooling down. Retry shortly. |
A stream can also end early with {"error":{"type":"escrow_exhausted"}} — the credit ran
out mid-answer, so the clock stopped the stream instead of letting it run past what was paid for.
05What it costs
One credit is one second at the base rate: 1,000,000 micro-credits per second. A call that takes 450 ms is billed 0.45 credits. There is no per-token arithmetic to check and no minimum charge — a fast answer is cheap because it was fast, not because a table said so.
During launch, credit is free and every key comes with 600 credits. When they run out, ask for more at jeremy@grindnewday.com.
06Limits
- One account is given 600 credits; three accounts per address per day.
- Demo sessions (no key) last 20 seconds and are rate-limited per address.
- Requests time out at 60 seconds of function time.
- Prompts and completions are not stored. See privacy.