Skip to content
DocsTry Aspire
DocsTry

OpenAIResource.withApiKey

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

Signature

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

Defined on

This method is defined on the following type: