Billing and trials
Minor credits
Prism represents money as integer minor credits.
Avoid floating-point arithmetic when storing balances or request costs.
Welcome-credit trial
The welcome-credit policy reserves THB 20 (2000 minor credits) for an eligible
one-time grant. Signing up alone does not guarantee a grant. Prism classifies an
account as a trial only after its ledger contains a welcome_credit entry.
Until that key owner has made cumulative positive mPAY or Polar top-ups of at
least THB 100, the welcome-credit trial is restricted to:
- chat completions only
- models listed by
GET /v1/trial-policy
trial_scope_denied. A chat model outside the allowlist returns
trial_model_denied. Both errors include allowed_models.
policy_hash, a SHA-256 hash of the canonical policy.
Clients can use it to detect a policy change before onboarding step 4.
Payment required
Credit and budget failures use HTTP402:
action rather than matching the human-readable message:
top_up: send the account owner tohelp_urlcontact_org_admin: tell the user that an organization budget was reached
insufficient_credits, reservation_failed, and
budget_cap_exceeded.
อ่านภาษาไทย