Manage Shadow AI Capture sources#
Manage how connected sources save data, attribute usage, measure limits, and represent providers discovered from external gateways and coding tools.
Source management includes:
- Enabling or disabling Capture without disconnecting the sender.
- Renaming or disconnecting a source and regenerating its Shadow AI key.
- Assigning source-level fallback ownership and individual gateway key owners.
- Measuring source, provider, and gateway key usage with non-enforcing limits.
Manage source connections#
Manage a source's Capture state, Shadow AI key, and connection lifecycle from its details page.
To access these settings, go to Config → Shadow AI Capture and select a source in the Connected Sources table. The Connection Details section provides the following options:
- Name — Rename the source to make it easier to identify.
- Capture — Enable or disable saving incoming telemetry data.
- Shadow AI key — View, copy, or regenerate the key used to authenticate telemetry exports from the sender.
- Key assigned to — Assign an employee or agent as the fallback owner for requests associated with gateway keys that have no assigned owner.
Enable or disable Capture#
Disabling Capture temporarily stops saving telemetry data from a source without disconnecting it. This can be useful when a source is temporarily inactive, undergoing maintenance, or no longer needs to be monitored.
When Capture is disabled:
- Incoming data is accepted but not saved and cannot be recovered.
- Previously captured data remains available.
- The source stays connected and its Shadow AI key remains valid.
- The source is included in the Switched off summary card and is not counted as idle.
Enabling Capture resumes saving incoming telemetry data. This is useful when a source becomes active again or monitoring needs to be restored.
There are two ways to enable or disable Capture:
-
From the Connected Sources table. Go to Config → Shadow AI Capture and use the Capture toggle in the Connected Sources table for the corresponding source. This option is convenient when managing Capture settings for multiple sources.
-
From the source details page. Go to Config → Shadow AI Capture, select a source in the Connected Sources table, and use the Capture toggle in the Connection Details section. This option is useful when managing a single source and reviewing or updating its other settings, such as usage limits.
Regenerate the Shadow AI key#
Regenerate the Shadow AI key when you need to replace the existing key for security or access management reasons.
Common reasons include:
- Suspected compromise: The key may have been accessed or used by an unauthorized person.
- Accidental exposure: The key was accidentally included in a public repository, shared configuration file, logs, or other publicly accessible resources.
- Regular key rotation: Your organization's security policy requires keys to be replaced periodically.
- Access changes: You need to prevent previously configured senders or users with access to the old key from using it.
To regenerate the key:
- Open Config → Shadow AI Capture. In the Connected Sources table, click the source to open its details page.
- Under Connection Details → Shadow AI key, click the regeneration icon (circular arrows).
- Copy the new key and update the configuration of every sender that used the previous key.
- Send a test request and verify that new data is captured. For detailed steps, see Verify captured usage.
Warning
Regenerating the Shadow AI key immediately invalidates the previous value. Exports using the old key are rejected until the sender configuration is updated.
Make sure all affected senders are reconfigured to avoid interruptions in telemetry capture.
Disconnect a source#
Disconnecting a source permanently removes its connection settings, discovered providers, gateway keys, and associated configurations. These data cannot be recovered after disconnection.
If permanent removal is not necessary, consider disabling Capture instead. This temporarily stops saving new telemetry while preserving the source and its existing configuration.
Disconnecting a source may be necessary for several reasons:
- Source decommissioning: The gateway, proxy, or coding tool associated with the source is no longer in use.
- Source replacement: The source has been replaced by another source.
- Test environment cleanup: The source was created for testing or integration validation and is no longer required.
- Infrastructure changes: The source is no longer part of the organization's active infrastructure.
- End of monitoring: Capturing usage data from this source is no longer necessary.
To disconnect a source, open Config → Shadow AI Capture → Connected Sources and click the trash icon in the Actions column for that source.
Disconnecting a source:
- Revokes its Shadow AI key.
- Deletes its gateway keys and owner assignments.
- Removes its discovered providers, provider limits, and model prices.
- Keeps historical traces available.
Warning
The sender is not notified when a source is disconnected. Update or remove its telemetry configuration to prevent export errors.
A new source can be created with the same Installation ID, but it receives a new Shadow AI key and does not restore previous ownership assignments.
Attribute captured usage#
Assign gateway key owners#
For gateway key fields and sender-specific identities, see Review gateway keys.
To assign an owner to a gateway key:
- Open Config → Shadow AI Capture → Connected Sources → click the source → Gateway Keys.
- Find the key and click the pencil icon in its Owner column.
- In the form that opens, select a user from the list.
When exactly one identity matches the reported caller information or key name, OptScale AI can suggest an owner. Apply suggestions individually or with Link N keys.
Ownership changes affect:
- Usage and spend reports — Historical requests follow the current assignment.
- Budget counters — Each request retains the owner assigned when it arrived.
This behavior applies to both gateway key Owner and source-level Key assigned to changes.
Configure fallback ownership#
Fallback ownership ensures that AI requests and their associated costs are attributed to an employee or agent even when the gateway key has no assigned owner. This helps reduce unattributed usage, improve cost visibility, and maintain more accurate usage reports and budget tracking.
To configure fallback ownership, go to Config → Shadow AI Capture → Connected Sources → click the source → Connection Details section → Key assigned to and click the adjacent pencil icon to select an employee or agent.
The Key assigned to setting determines who receives usage and cost attribution when the reported gateway key has no owner. If a gateway key already has an assigned owner, that assignment takes precedence.
The Unassigned keys counter tracks gateway keys without individual owners, regardless of whether fallback ownership is configured.
Configure usage limits#
Usage limits help monitor AI consumption, track spending against budgets, and identify excessive or unexpected usage. Configuring limits at the source, provider, or gateway key level provides visibility into resource consumption and helps manage AI costs across different sources, providers, and users.
Usage limits are used for monitoring and reporting only. They do not enforce restrictions or block AI requests. External gateways and coding tools continue processing requests even when a configured limit is exceeded.
To open the limit settings for a specific object:
- Source (all requests captured by the source): Open Config → Shadow AI Capture → Connected Sources → click the source → Limits, then click the pencil icon next to Limits.
- Provider (requests from the source to one discovered provider): Open Config → Providers → Connected Sources → click the provider → Overview → Limits, then click the pencil icon next to Limits. Provider limit editing controls are also available under Config → Shadow AI Capture → Connected Sources → click the source → Providers, in the Limits column of the providers table.
- Gateway key (requests using the reported key): Open Config → Shadow AI Capture → Connected Sources → click the source → Gateway Keys, find the required key, and click the pencil icon in its Limits column.
In the Edit Limits form, configure the required limits:
- Budget — Maximum measured spending.
- Tokens — Maximum measured token consumption.
- Requests — Maximum measured number of requests.

For each configured limit, select a reset interval. Available reset intervals are measured in minutes, hours, days, weeks, or 1 month (30 days).
Click Save to apply the changes. To remove the configured limits, click Clear Limits.
A request counts toward every applicable limit. When measured usage exceeds the configured threshold, Limit exceeded appears next to the corresponding limit. However, OptScale AI does not stop requests, disable gateway keys, or modify the external sender's configuration. Unlimited next to a limit indicates that no limit is configured.
To enforce usage restrictions, limits must be configured directly in the external gateway or coding tool, where supported.
Manage connected providers#
Configure model pricing#
Model pricing helps calculate AI request costs when the connected source does not report spending information. This provides better visibility into AI consumption and costs across connected providers.
Request costs are calculated according to the following rules:
- Sender-reported cost takes precedence over configured model prices.
- When a sender does not report cost, OptScale AI uses the configured model price available at capture time.
- If neither a reported cost nor a matching model price is available, the request is captured without spend.
- Price changes apply only to future requests and do not recalculate historical costs.
Shadow AI Capture and Traces display the same captured request cost.
To configure model pricing:
- Go to Config → Providers → Connected Sources, click a provider in the Providers column, and find Model pricing on the Overview tab.
- Click the + icon in the Actions column next to the model.
- Specify the Input price, Output price, and Cache read price as applicable.
- Save.
Configure cost distribution#
Cost distribution helps allocate AI spending across cost centers, providing visibility into how costs are shared between teams or business units. This supports more accurate cost reporting, budgeting, and financial planning.
To configure cost distribution:
- Go to Config → Providers → Connected Sources, select a provider, and open the Distribution tab.
- Click the + icon next to the Distribution section heading.
- In the side panel, select a Cost center and specify the Included percentage.
- Click Add.
See also#
- Shadow AI Capture overview — Review capture concepts, metrics, and workflows.
- Start capturing AI usage — Create, configure, and verify a source.
- Providers — Review provider configuration and access.
- Traces — Investigate captured requests.