Tracking OpenAI Costs by Company
OpenAI's project system makes it easy to track costs per company. Each project gets separate usage tracking, which Administrate.dev automatically syncs.
How It Works
OpenAI allows you to create multiple projects within your organization. Each project:
- Has its own API keys
- Tracks usage separately
- Reports costs independently
Administrate.dev syncs these projects and lets you assign each one to a company.
Best Practice: One Project Per Company
For accurate cost tracking:
- Create a project in OpenAI for each company
- Generate API keys from that project for the company's applications
- Connect OpenAI to Administrate.dev (see Setting Up OpenAI)
- Assign each project to the corresponding company
Setting Up Company Tracking
Step 1: Create Projects in OpenAI
- Go to OpenAI Platform
- Click Projects in the sidebar
- Click Create Project
- Name it after the company (e.g., "Acme Corp Production")
- Repeat for each company
Step 2: Create API Keys Per Project
- In each project, go to API Keys
- Create a new key for that company's use
- Give this key to the company or use it in their applications
Step 3: Assign Projects in Administrate.dev
- Go to LLM Providers
- Click your OpenAI provider
- In the Projects section, you'll see all your OpenAI projects
- Click the company dropdown for each project
- Select the appropriate company
Viewing Company Costs
Once assigned, company costs appear in:
- LLM Costs → By Company tab
- Company detail page → LLM Costs section
- Exported reports → Cost column includes attribution
Using a Default Company
If you have projects that don't need individual company assignment:
- Edit your OpenAI provider
- Set a Default Company
- Unassigned projects will be attributed to this company