
AI AzureOpenAI
CertifiedUse Azure OpenAI deployments
AI AzureOpenAI
Use Azure OpenAI deployments
Targets Azure-hosted OpenAI models via the resource endpoint and deployment name. Supports API key or AAD client credentials; set apiVersion when required by the deployment.
type: io.kestra.plugin.ai.provider.AzureOpenAIExamples
Chat completion with Azure OpenAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.AzureOpenAI
apiKey: "{{ secret('AZURE_API_KEY') }}"
endpoint: https://your-resource.openai.azure.com/
modelName: gpt-4o-mini
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Properties
endpoint *string
API endpoint
Azure OpenAI resource endpoint, in the form https://{resource}.openai.azure.com/. No default: this property is required.
apiKey string
API Key
Azure OpenAI API key. Provide either this key or the tenantId/clientId/clientSecret trio for Entra ID authentication; the API key takes precedence when both are set. Store it as a Kestra secret rather than inline.
baseUrl string
Base URL
Custom base URL overriding the provider's default endpoint. Useful for enterprise gateways, proxies, self-hosted deployments, or test doubles such as WireMock. Defaults to the provider's public endpoint.
caPem string
CA PEM certificate content
PEM-encoded certificate authority chain, as text, used to verify the TLS certificate presented by a custom endpoint. Not set by default, in which case the JVM's default trust store is used.
clientId string
Client ID
Microsoft Entra ID application (client) ID used for service-principal authentication. Required together with tenantId and clientSecret when apiKey is not set.
clientPem string
Client PEM certificate content
PEM-encoded client certificate and private key, as text, used for mutual-TLS authentication against enterprise AI endpoints. Not set by default, in which case the default HTTP client is used.
clientSecret string
Client secret
Microsoft Entra ID application client secret used for service-principal authentication. Required together with tenantId and clientId when apiKey is not set. Store it as a Kestra secret rather than inline.
modelName string
Model name
serviceVersion string
API version
Azure OpenAI REST API version to call. Not set by default, in which case the Azure SDK's latest supported version is used.
tenantId string
Tenant ID
Microsoft Entra ID tenant used for service-principal authentication. Required together with clientId and clientSecret when apiKey is not set.