OpenAI usage and costs
Usage by day, model, project, key and person. The bill, by line. Tokens, cached tokens, AI calls, batch or priority, and transcription minutes. Project and key names, and your data retention setting, where the key may read them. Never prompts, replies or member names.
Access
- Kind
- A read-only key you paste
- What to give
- Admin API key
- Why that one
- An organization Admin key created as Restricted with only Usage API Scope set to Read (Settings, Organization, Admin keys), not a project key and not an All-permissions key. Tested first, then stored encrypted for this organization; shown only as its last four characters.
What it attributes on its own
- From the source
- api key; project; model; line item; training runs, with the project key
- Needs a rule or a trace
- workflow; agent; outcome — needs a rule or a trace join
The addresses it calls
- https://api.openai.com/v1/organization/admin_api_keys
- https://api.openai.com/v1/organization/usage/
- https://api.openai.com/v1/organization/costs
- https://api.openai.com/v1/organization/projects
- https://api.openai.com/v1/organization/data_retention
- https://api.openai.com/v1/fine_tuning/jobs
Valistry calls only these addresses. It blocks any other call and logs every call.
Connecting it
- Create an admin key. Admin keys → Create new Admin key Open ↗
A key created with Permissions: All also works, but it can manage your organization. The connect test tells you if the key you pasted is broader than needed.
Settings worth turning on in OpenAI
- One project per team or app. A project keeps its own keys, limits and spend. Spend then splits by project with no rule. Valistry reads it.
- One API key per app. Name each key, or use a service account for each app. A shared key cannot be split later. Valistry reads it.
- Set a budget on each project. OpenAI emails you when a project passes its budget. Valistry shows the same spend against your own budgets.
Questions about OpenAI
What access does Valistry need?An Admin key that can only read usage. A project key cannot read your organization's usage.
Does it cover ChatGPT Enterprise and Codex?Yes. ChatGPT Enterprise seats and their use, and Codex usage, each as its own connector. Codex sits beside Claude Code in Dev productivity.
We already use projects. What changes?Nothing. Each project keeps its spend, and Valistry adds owners, budgets and outcomes on top.