# OpenAISettings

- Kind: `class`
- Package: [Aspire.OpenAI](/reference/api/csharp/aspire.openai.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.OpenAI`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Components/Aspire.OpenAI/OpenAISettings.cs)

The settings relevant to accessing OpenAI.

## Definition

```csharp
namespace Aspire.OpenAI;

public sealed class OpenAISettings
{
    // ...
}
```

## Constructors

- [OpenAISettings](/reference/api/csharp/aspire.openai/openaisettings/constructors.md#constructor)

## Properties

- [DisableMetrics](/reference/api/csharp/aspire.openai/openaisettings/properties.md#disablemetrics) : `bool` `get; set` -- Gets or sets a boolean value that indicates whether the OpenTelemetry metrics are enabled or not.
- [DisableTracing](/reference/api/csharp/aspire.openai/openaisettings/properties.md#disabletracing) : `bool` `get; set` -- Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is disabled or not.
- [EnableSensitiveTelemetryData](/reference/api/csharp/aspire.openai/openaisettings/properties.md#enablesensitivetelemetrydata) : `bool` `get; set` -- Gets or sets a boolean value indicating whether potentially sensitive information should be included in telemetry.
- [Endpoint](/reference/api/csharp/aspire.openai/openaisettings/properties.md#endpoint) : `Uri?` `get; set` -- Gets or sets a `Uri` referencing the OpenAI REST API endpoint. Leave empty to connect to OpenAI, or set it to use a service using an API compatible with OpenAI.
- [Key](/reference/api/csharp/aspire.openai/openaisettings/properties.md#key) : `string?` `get; set` -- Gets or sets a the API key to used to authenticate with the service.
