Docs · Core concepts

API key handling.

An API key lets any OpenAI-compatible tool spend your daily budget. Keys start with ubc_sk_ and are bound to your verified session.

Minting

Mint a key.

Verify, then open API keys

After verifying with Self, go to the API keys page. Minting is bound to your verified session — you can only mint keys for yourself.

Generate and label it

Click Generate new key and give it a label like “Cursor on laptop” so you can tell keys apart later.

Copy it once

The full key is shown a single time. Copy it into your tool's config immediately; ubc now only stores a hash, so it can't show the key again.

Using a key

Point a tool at the endpoint.

Every OpenAI-compatible client needs two values: the base URL and your key. Then call the API exactly as you would OpenAI's.

Any OpenAI-compatible tool
OPENAI_BASE_URL=https://ubcnow.ai/v1
OPENAI_API_KEY=ubc_sk_…
A chat completion
curl https://ubcnow.ai/v1/chat/completions \
-H "Authorization: Bearer ubc_sk_…" \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id>",
"messages": [{"role": "user", "content": "Hello"}]
}'
Managing keys

Handling keys safely.

How is the budget shared?

All keys plus browser chat draw from one daily budget. A key doesn't get its own allowance — it spends the same pool, which resets at 00:00 UTC.

I lost a key. What now?

Keys can't be shown again after minting. Revoke the old one on the API keys page and mint a replacement. Anything using the revoked key will get a 401.

Is the key a secret?

Yes — treat it like a password. Keep it server-side, never commit it, and revoke it if it leaks. It's a bearer credential for your budget.

401 Unauthorized

The key must be active and sent as a Bearer token. If you revoked it or it was mistyped, mint a fresh one.

Build with your own key.

Mint one in a click and point any tool at ubc now.