openai.create

Creates a new instance of OpenAI class with custom configuration.

The instance contains the same properties as the openai namespace.

Syntax

create(configuration?)

Parameters

Return value

An instance of OpenAI class.

Examples

const myapi = openai.create({ organization: "My org" })
myapi.listModels()