# OpenAICompatibleHttpOptions

Options for connecting to an OpenAI-compatible HTTP endpoint (for example a local model server).

Class 

`IntelligenceX.OpenAI.CompatibleHttp`

**Namespace**

`IntelligenceX.OpenAI.CompatibleHttp`

**Assembly**

`IntelligenceX`

**Source**

[OpenAICompatibleHttpOptions.cs:19](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L19)

**Modifiers**

sealed

Options for connecting to an OpenAI-compatible HTTP endpoint (for example a local model server).

## Inheritance

- object
- OpenAICompatibleHttpOptions

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Property [EasySessionOptions.CompatibleHttpOptions](/api/intelligencex-openai-easysessionoptions/#property-compatiblehttpoptions)
- Property [IntelligenceXClientOptions.CompatibleHttpOptions](/api/intelligencex-openai-intelligencexclientoptions/#property-compatiblehttpoptions)

Filter members 

Show inherited

## Constructors

`public OpenAICompatibleHttpOptions()` [#](#constructor-ctor)

[OpenAICompatibleHttpOptions.cs:19](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L19)

## Methods

`public void Validate()` [#](#method-validate)

[OpenAICompatibleHttpOptions.cs:60](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L60)

Validates the configuration and throws on invalid values.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string? BaseUrl { get; set; }` [#](#property-baseurl)

[OpenAICompatibleHttpOptions.cs:14](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L14)

Base URL for the OpenAI-compatible API. Example: http://127.0.0.1:11434/v1 or http://localhost:1234/v1.

`public OpenAICompatibleHttpAuthMode AuthMode { get; set; }` [#](#property-authmode)

[OpenAICompatibleHttpOptions.cs:19](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L19)

Auth mode for compatible-http requests.

`public string? ApiKey { get; set; }` [#](#property-apikey)

[OpenAICompatibleHttpOptions.cs:25](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L25)

Optional API key used with [OpenAICompatibleHttpAuthMode.Bearer](/api/intelligencex-openai-compatiblehttp-openaicompatiblehttpauthmode/). Local providers often ignore this.

`public string? BasicUsername { get; set; }` [#](#property-basicusername)

[OpenAICompatibleHttpOptions.cs:30](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L30)

Optional username used with [OpenAICompatibleHttpAuthMode.Basic](/api/intelligencex-openai-compatiblehttp-openaicompatiblehttpauthmode/).

`public string? BasicPassword { get; set; }` [#](#property-basicpassword)

[OpenAICompatibleHttpOptions.cs:35](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L35)

Optional password used with [OpenAICompatibleHttpAuthMode.Basic](/api/intelligencex-openai-compatiblehttp-openaicompatiblehttpauthmode/).

`public bool Streaming { get; set; }` [#](#property-streaming)

[OpenAICompatibleHttpOptions.cs:40](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L40)

Whether to request streaming responses when supported by the provider.

`public bool AllowAutoRedirect { get; set; }` [#](#property-allowautoredirect)

[OpenAICompatibleHttpOptions.cs:42](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L42)

Whether HTTP redirects may move requests away from the configured endpoint.

`public bool UseProxy { get; set; }` [#](#property-useproxy)

[OpenAICompatibleHttpOptions.cs:44](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L44)

Whether system proxy settings may route requests through a proxy.

`public bool AllowInsecureHttp { get; set; }` [#](#property-allowinsecurehttp)

[OpenAICompatibleHttpOptions.cs:49](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L49)

When true, allows insecure http:// URLs (loopback only).

`public bool AllowInsecureHttpNonLoopback { get; set; }` [#](#property-allowinsecurehttpnonloopback)

[OpenAICompatibleHttpOptions.cs:54](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/CompatibleHttp/OpenAICompatibleHttpOptions.cs#L54)

When true, allows insecure http:// URLs for non-loopback hosts (dangerous).

<!-- PowerForge markdown artifact sha256:673C3A6479A1BADE21EE2EC9F85055DACB2344A64F064CBFC16C224DFE2CA4D4 -->
