OpenAI Usage Test

API capability refers to a specific type of functionality exposed through the OpenAI API, such as completions, embeddings, images, moderations, or responses. OpenAI users can leverage one or more of these API capabilities to perform tasks such as generating AI responses from prompts, generating images, converting text into numerical representations, or moderating content. If an API capability experiences an unexpected increase in workload, token processing, or request volume, it may result in increased processing time or latency. Therefore, it is essential for the administrators to identify such conditions early and take corrective action to help maintain application performance and a consistent user experience. The OpenAI Usage test helps administrators in this regard!

For each API capability, this test tracks the HTTP requests sent to the API capability, the number of tokens processed per second and the number of tokens processed per request. This test also reports the cache hit percentage for each API capability, providing insights into cache efficiency. Using these metrics, administrators can detect usage spikes, unexpected large requests being processed, or changes in caching efficiency patterns, enabling them to investigate potential issues and take corrective action promptly.

Target of the test : OpenAI

Agent deploying the test: A remote agent

Outputs of the test : One set of results for each API capability functioning on the target OpenAI being monitored.

Descriptor : API capability

Configurable parameters for the test
Parameters Description

Test Period

This indicates how often should the test be executed. By default, this is set to 15 minutes.

Host

The host for which the test is to be configured.

Port

Refers to the port used by the target OpenAI organization.

Admin API Key

To collect metrics from the target OpenAI organization, the eG agent requires organization-level API access. To grant this access, administrators must specify the Admin API key obtained from the OpenAI portal in this text box. The key provides the permissions required to access orgaization-level information, such as costs, projects, and usage data, which the eG agent uses to monitor OpenAI APIs and their capabilities.

Is Debug Enabled

This parameter specifies whether the test should run in debug mode. If this flag is set to Yes, the eG agent runs the test in debug mode and generates detailed error logs, which can help administrators troubleshoot issues related to test execution or metric collection. By default, this flag is set to No, indicating that the test does not run in debug mode and detailed debug logs are not generated. Debug mode should typically be enabled only when troubleshooting issues.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

HTTP requests

Indicates the rate at which HTTP requests were sent to this API capability.

Requests/sec

This measure is a good indicator of HTTP request load. A sudden increase in the value of this measure may indicate higher application traffic, increased user activity, or an unexpected request surge. Compare the value of this measure across API capabilities to identify the API capability that is experiencing high volume of HTTP requests.

Token velocity

Indicates the rate at which tokens were processed by this API capability.

Tokens/sec

This measure is a good indicator of overall processing workload. An increase in the value of this measure often indicates larger prompts/responses or increased request activity. Compare the value of this measure across API capabilities to figure out the API capability that is processing the highest number of tokens.

Total tokens

Indicates the total number of tokens processed by this API capability per minute.

Number/minute

This measure is a good indicator of token workload generated by each API capability. Administrators can use this measure to identify workload growth, sudden spikes, or unusual token consumption patterns.

Tokens per request

Indicates the number of tokens processed by this API capability per request.

Tokens/request

A sudden/gradual increase in the value of this measure may indicate larger prompts, longer responses, or changes in application behavior, even when request volume remains unchanged. Compare the value of this measure across API capabilities to figure out the API capability that is processing maximum number of tokens per request.

Cache hits

Indicates the percentage of API request or token processing that can be served from the cached content for this API capability.

Percent

Ideally, the value of this measure should be high. This measure is a good indicator of cache efficiency.

Compare the value of this measure across API capabilities to identify the API capability for which the highest proportion of requests is served from the cached content.