For the complete documentation index, see llms.txt. This page is also available as Markdown.

OpenAI

Connect OpenAI to bring your large language model (LLM) spend into Cloud & AI Cost Management alongside your cloud costs.

Connecting OpenAI brings your OpenAI spend into Harness Cloud & AI Cost Management alongside your cloud costs. The connector uses an Admin API key with read-only access to pull usage and cost data from your OpenAI account. You can analyze AI spend in Cost Explorer, attribute it with Views and Cost Categories, and govern it with budgets and anomaly detection, the same way you manage cloud costs.

Before you begin

OpenAI Admin API key: An Admin API key with read-only access from your OpenAI account. The key lets Harness ingest billing and usage data. Go to the OpenAI Admin API keys reference to create one.

Set up the OpenAI connector

To connect OpenAI, go to Cloud & AI Cost Management > Account Settings > AI Providers. Click AI Provider, then select OpenAI.

Step 1: Name the connector

  1. On the Overview panel, enter a Name for the connector.

  2. Optionally, add a Description and Tags to organize and filter connectors.

OpenAI connector Overview panel
Click to view full size image
  1. Click Continue.

Step 2: Add the connector details

On the Connector Details panel, confirm the API endpoint and provide the OpenAI Admin API key as a Harness secret. Do the following:

  1. In the URL field, do not change the default https://api.openai.com/v1 unless you have a custom endpoint.

    OpenAI connector URL field
    Click to view full size image
  2. In the API Key field, click Create or Select a Secret.

    • To use an existing secret, select it from the list, then click Apply Selected.

    • To add a new secret, click New Secret Text, enter a Secret Name, and provide your OpenAI Admin API key as the Secret Value.

      New Secret Text panel for an OpenAI API key
      Click to view full size image

      Go to Add and reference text secrets to review all secret creation options.

  3. Click Continue.

Step 3: Verify the connection

On the Connection Test panel, Harness validates the API key against your OpenAI account. Once the verification is successful, click Finish to create the connector.

OpenAI connector Connection Test panel
Click to view full size image

Last updated

Was this helpful?