Skip to content
Docs Try Aspire
Docs Try

withApiKey

Method
📦 Aspire.Hosting.OpenAI v13.4.0
interface OpenAIResource {
// ... omitted for brevity
withApiKey(apiKey: ParameterResource): OpenAIResource;
}

Signature

method withApiKey builder
Configures the API key for the OpenAI parent resource from a parameter.
withApiKey(apiKey: ParameterResource): OpenAIResource
apiKey ParameterResource
OpenAIResource

Applies to

This method applies to the following types: