01
Identity first
A session or a scoped API key is required. The provider key stays on the server and never reaches the browser.
Use case · Metered chat
One bounded prompt goes through the same endpoint the starter ships: identity, budget admission, credit reserve, provider call, settlement and a usage row. If this deployment has no provider, the demo says so instead of inventing a reply.
No AI provider is configured
The endpoint needs an OpenAI-compatible base URL, key and model. Until they are set, no model call is made and no reply is invented.
AI_BASE_URLAI_API_KEYAI_MODEL
No response yet
This panel only shows text returned by a configured provider. It does not generate a placeholder answer.
What one request proves
The scope is deliberately narrow: one bounded chat completion, not an image or video workbench.
01
A session or a scoped API key is required. The provider key stays on the server and never reaches the browser.
02
Per-user daily and monthly credits, request and minute limits, and concurrency leases are admitted in one D1 statement before the charge.
03
Credits are reserved, the provider is called, and the ledger records the result. A definitive rejection refunds; an unknown outcome is kept for reconciliation.
The demo keeps the honest edges of the starter visible.
Only when the deployment has a working OpenAI-compatible provider, credits are enabled and you are signed in. Otherwise the form is disabled and the page states which configuration is missing. It never shows a fabricated model reply.
The feature guide and docs cover provider configuration, credit budgets, API keys, settlement and the Cloudflare deployment.