OpenAIClient

constructor(apiKey: ApiKey = ApiKey.fromEnv("OPENAI_API_KEY"), baseUrl: String = "https://api.openai.com/v1", httpClient: KoryHttpClient? = null)

Parameters

apiKey

The API key for authentication.

baseUrl

The base URL of the API (default: "https://api.openai.com/v1").

httpClient

The HTTP client to use. Defaults to a platform-appropriate client: on JVM, the available engine is loaded via ServiceLoader; on Native, the default system engine is used. Bearer authentication is automatically applied.