Skip to content

OpenAIOptions

Namespace: Vercel.AI.OpenAI

public sealed class OpenAIOptions : OpenAICompatibleOptions

OpenAI provider settings.

Inheritance: object → OpenAICompatibleOptions

View source

public OpenAIOptions()

Creates options aimed at https://api.openai.com/v1 unless OPENAI_BASE_URL is set.

View source

public string BaseUrl { get; set; }

API origin. An assigned value wins over OPENAI_BASE_URL. A blank value is rejected when the provider is created.

Value: string

View source

public BatchResultDownloads? BatchResultDownloads { get; set; }

Settings for downloading JSON Lines batch results.

Value: BatchResultDownloads

View source

public string? Organization { get; set; }

Value of the OpenAI-Organization header.

Value: string

View source

public string? Project { get; set; }

Value of the OpenAI-Project header.

Value: string

View source

public bool UseResponsesApi { get; set; }

When true, LanguageModel(string) uses the Responses API.

Value: bool

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product