3. Account, usage and billing

[!ref] New-user tutorial: a step-by-step first sign-in walk-through is in the Quick Start Guide, "Install and sign in"; this chapter details each sign-in method, quotas and usage billing.

AVL Code uses a unified administration backend for sign-in; signing in automatically provisions a shared quota for this machine. No manual API key configuration is needed.

3.1 Sign-in methods

The unauthenticated section of the account page is a two-segment switcher: Phone (default) | Password.

Method Flow
SMS verification code (default, fastest) Enter phone number → receive SMS code → submit. If the account doesn't exist it auto-registers. 60-second resend countdown; risk control swaps in a CAPTCHA when needed
Username + password Settings → Account → Password tab → enter credentials → submit
SSO single sign-on Settings → Account → SSO Sign In → browser → callback → app receives credential

The three methods give identical quotas (key issuance and state stay in sync) and only differ in the sign-in step itself.

3.2 Shared vs personal quota

After signing in the system provisions a shared quota. The shared quota is centrally managed and billed by your organisation — you don't have to track balance. If your organisation has a personal quota it shows up on the points-balance panel in Settings → Account.

If you want to use your own model API key (e.g. a personal OpenAI / Anthropic / Aliyun subscription), add it under Settings → Models. AVL Code uses your key first and falls back to the shared quota.

3.3 Usage monitoring

The Settings → Account panel shows three usage windows:

  • 24 hours
  • 7 days
  • 30 days

Refreshed every minute. If something anomalous happens — e.g. a burst of calls — the points-balance panel highlights it in a warning colour to make the anomaly easy to spot.

3.3.1 Quota prompts now tiered by usage and reset time

Pre-exhaustion prompts are no longer one-size-fits-all — they tier by current usage percentage + time until reset:

  • Light hint: usage not high yet, reset still far away → only the status dot changes colour, no interruption.
  • Medium hint: usage near the cap or reset coming up soon → an info bar above the input box shows "N points left · resets in M minutes".
  • Strong hint: usage almost exhausted and reset still distant → banner / card prompt with suggestions (switch to backup provider, redeem a coupon).

The prompt text shows the reset time in your local timezone (e.g. "resets today at 18:00") instead of a vague "running out".

3.4 Credential expiry

The sign-in credential is valid for about 24 hours.

  • Within an hour of expiry the sidebar status dot turns amber.
  • Once expired, the next action triggers a "session expired" message and the sign-in page.
  • Re-signing in does not lose sessions or config.

3.4.1 Redemption codes and vouchers

Settings → Account has a new Redemption Code section:

  1. Enter a redemption code → click "Redeem".
  2. Result feedback in place (12 localised outcomes covering success / invalid / used etc.).
  3. Below it is My Usage Coupons — face value, expiry, with permanent vouchers explicitly tagged "Permanent".

3.5 Sign out

Settings → Account → Sign Out. This clears the local credential and the ability to use the shared quota, but preserves all local workspaces, sessions, skills and settings — signing back in resumes seamlessly.