Connect OpenAI
oncost tracks your OpenAI API usage at the model and token level. Setup takes about 2 minutes.Prerequisites
- An OpenAI account with API access
- An API key
Setup
- Go to Settings > Connections > New Connection > OpenAI
- Paste your OpenAI API key
- Click Test Connection to verify access
- Click Save
What oncost collects
- Daily cost by model (GPT-4o, GPT-4, GPT-3.5, etc.)
- Token counts (input and output) per model
- Cost-per-token trends over time
Subscription plan (optional)
After connecting, you can configure your OpenAI subscription plan so oncost tracks subscription costs alongside API usage. Go to Settings > Connections, click your OpenAI connection, and fill in the Subscription Plan section. Available plans:
For Team and Enterprise plans, enter the number of seats. For Enterprise, enter your custom monthly cost.
When configured, oncost generates a subscription cost row each month and shows the full picture — subscription cost plus API usage — on the OpenAI provider detail page.
This step is optional. If you skip it, oncost still tracks all API usage costs.
Tips
- Separate API keys per project to get per-project cost breakdown
- oncost shows cost-per-token trends in the AI Cost view under Spend