Usage, Billing, and Security
Cost control requires visibility into model rates, request volume, and credential usage. Prices and model availability can change, so use the current Model Marketplace and console as the source of truth.
Routine cost management
- Confirm current input, output, and cache rates in the Model Marketplace.
- Review request counts, token usage, available balance or quota, and cost trends in the console.
- Prefer lower-cost models and smaller output limits during development.
- Validate batch jobs with a small sample before scaling them up.
- Pause the relevant key and investigate the caller when usage grows unexpectedly.
Billing differences
- Input, output, and cached tokens can have different rates.
- Standard and Recharge views can differ for the same model.
- Model pricing, availability, and routing can change over time.
- Normalize estimates to the same
/1Kor/1Mtoken unit.
API key controls
- Server-side only: load keys from environment variables or a dedicated secrets manager.
- One key per application: separate credentials make usage attribution and revocation easier.
- Least privilege: allow only the models and capabilities that an application needs.
- Regular rotation: verify that the old key is disabled after replacement.
- Immediate revocation: act when a key is exposed, unknown traffic appears, or cost spikes.
Never do this
- Never embed a key in browser-side code.
- Never commit a key to source control, container images, or public configuration.
- Never send a complete key through public chat, support screenshots, or recordings.
For support, provide only redacted identifiers, timestamps, model names, and error details.
