OpenAI spend template

View as Markdown

You can use the OpenAI spend template to monitor your organization’s OpenAI API spend. If your OpenAI usage and cost data is stored in a data platform connected to Sigma, you can use the OpenAI spend template to review an executive cost overview — total spend, trend, and the line items, projects, and people driving it.

The template is set up with sample data, so you can explore the analysis before you connect your own data.

System and user requirements

The ability to use the OpenAI spend template requires the following:

  • You must be assigned an account type with the Create, edit, and publish workbooks permission enabled.
  • To use your own data, your organization must be connected to a data platform containing your OpenAI usage and cost tables (see Data sources). Otherwise, you can use the template with the provided sample data.
  • To use the department views, you must supply a users table that maps each user to a department.

Data sources

The template expects your organization’s OpenAI usage and cost data. The template uses sample tables in the Sigma Sample Connection, but you can change the source to your organization’s own data if it exists in your data platform.

Download the relevant data from the OpenAI API, then load it into your data platform:

The OpenAI usage and cost data doesn’t distinguish spend by product, such as ChatGPT versus Codex.

The OpenAI spend template expects the data in the following structure:

TableDetails
OPENAI_USAGE_COSTSOne cost line per project, user, line item, and time bucket — spend (AMOUNT_USD), metered quantity, line item, project, user email, and date. Used for every spend KPI, the trend, and the breakdowns.
OPENAI_ORG_USERSYour OpenAI organization roster (user name, email, and role), joined to the cost data on email to add names and roles to per-user spend.
Your users tableMaps each user to a department. Replaces the sample users table to power the spend-by-department view.1

1OpenAI identifies users but does not provide department or org-structure data. The cost and roster tables give you spend by user email, name, and role — but no department or team. To power the By department breakdown and department attribution, replace the sample users table in the template with a users table of your own. You can change the source to your table, or load your users into an input table with the same shape, keeping the column names identical so the join and elements continue to work.

Create a workbook from the template

To create a workbook from this template:

  1. Go to Home > Templates, then select the OpenAI Spend template to review its details.

  2. Click Use template. The template opens as an exploration named after the template using sample data.

  3. To use your own data, click Change sources:

    In the Swap data sources overview modal, Sigma attempts to match each source to your own tables. Because the column names match the OpenAI export, most sources match automatically.

    1. To replace a matched source, select the source drop-down menu, then select a new source.
    2. Match the sample users table to your own users table.
    3. Click Swap now, then explore the changes to confirm your data looks correct.
  4. In the Filters menu, set the Date Range to scope the page to the period you care about.

  5. To create an editable, publishable document, in the document header, click Save as, then name and save the workbook.

For more details, see Create documents from templates.

About this template

The template contains an Executive overview page, plus a hidden Data page for source data. The template also includes a README file to document the purpose of the template, source tables, and setup steps.

Executive overview

This page answers “How much are we spending on OpenAI?” and includes:

  • Monthly Spend, Cost Per User, and Monthly Active Users KPIs, each with the period-over-period change
  • A stacked bar chart of monthly spend by department
  • Top 5 Line Items by Spend, with a Show control for the number of results and a Spend By toggle for Line Item, Project, Department, or User
  • User Spend Details, a table of spend by individual user, including email, name, job title, and department