Provider Sync
OpenAI Provider Sync
Sync OpenAI organization costs to a variable expense.
Pull platform spend from the OpenAI Organization Costs API.
Credentials
| Field | Where to find it |
|---|---|
| Admin API key | OpenAI platform → Settings → Admin keys (sk-admin-…) |
| Project ID | Optional — leave blank for whole-org costs |
API
GET https://api.openai.com/v1/organization/costs
Daily cost buckets, paginated. Recurex sums spend for the calendar month UTC.
Setup
- Create a variable USD expense (e.g. "OpenAI API")
- Open Actuals → Connect provider → OpenAI
- Enter admin key and optional project ID
- Sync validates against the current month
Scope
- Blank project ID = entire organization
- With project ID = costs for that project only
Troubleshooting
| Error | Fix |
|---|---|
| 401 Unauthorized | Use an admin key, not a project key |
| No costs returned | Verify the org has usage in the period |
| Currency mismatch | Expense must be USD |
