OpenAI
Chat Completions
Sync Type: Incremental
Overview
The OpenAI Chat Completions input fetches stored chat completion records from the OpenAI API for monitoring model usage, token consumption, and content policy events. Only completions created with store: true are returned. This integration enables tracking of AI model utilization, cost analysis through token consumption metrics, and auditing of chat interactions across your OpenAI organization.
Prerequisites
1. OpenAI Organization Access
- Active OpenAI organization account
- API key with access to the Chat Completions API
2. Stored Completions Enabled
Chat completions must be created with the store: true parameter to appear in the API response. Completions created without this flag will not be fetched by this connector. Learn More
API Key Setup
-
Access Settings
- From the OpenAI platform home page, click the Settings icon in the top-right corner.
-
Navigate to API Keys
- In the left navigation panel, select API Keys.
-
Create New Key
- Click the Create new secret key button.
-
Configure Key Settings
- Name: Provide a descriptive name (e.g., "Monad Chat Completions").
- Permissions: The key needs read access to the Chat Completions API.
-
Save and Store Key
- Copy the generated API key immediately.
- Store it securely - it cannot be retrieved later if lost.
Configuration
Settings
| Setting | Type | Required | Description |
|---|---|---|---|
| Model | string | No | Filter completions by model (e.g. gpt-4o). Leave empty to fetch all models. |
Secrets
| Secret | Type | Required | Description |
|---|---|---|---|
| API Key | string | Yes | The API key generated from the OpenAI platform. |
Related Articles
Sample Record
Code
Last modified on