Overview
Azure OpenAI Service provides access to OpenAI’s models through Microsoft Azure infrastructure. Zerox supports Azure OpenAI deployments for document processing with enhanced security and compliance features.Credentials
Azure OpenAI requires both an API key and an endpoint URL:Your Azure OpenAI API key. Found in the Azure Portal under your OpenAI resource’s “Keys and Endpoint” section.
Your Azure OpenAI endpoint URL. Format:
https://your-resource-name.openai.azure.comEnvironment Variables
Supported Models
Azure OpenAI supports the same vision models as OpenAI, but they must be deployed in your Azure resource:| Model | Deployment Name | Description |
|---|---|---|
| GPT-4.1 | gpt-4.1 | Latest GPT-4.1 model with vision capabilities |
| GPT-4.1 Mini | gpt-4.1-mini | Smaller, faster GPT-4.1 model |
| GPT-4o | gpt-4o | Optimized GPT-4 model with vision |
| GPT-4o Mini | gpt-4o-mini | Smaller, cost-effective GPT-4o model |
The
model parameter in Zerox should match your Azure deployment name, not the base model name. For example, if you deployed gpt-4o with the name my-gpt4o-deployment, use that deployment name.Configuration
Basic Example
With Custom Deployment Name
LLM Parameters
Azure OpenAI models support the following optional parameters:Controls randomness in the output. Values range from 0 to 2. Lower values make output more focused and deterministic.
Maximum number of tokens to generate in the completion.
Nucleus sampling parameter. An alternative to temperature sampling. Values range from 0 to 1.
Number between -2.0 and 2.0. Positive values penalize tokens based on their frequency in the text so far.
Number between -2.0 and 2.0. Positive values penalize tokens based on whether they appear in the text so far.
Whether to return log probabilities of the output tokens. Useful for confidence scoring.
Example with Parameters
Data Extraction
Azure OpenAI models support structured data extraction using JSON schemas:API Version
Zerox uses Azure OpenAI API version
2024-10-21 by default. This is automatically configured and does not need to be specified.Error Handling
Azure-Specific Considerations
Deployment Requirements
You must create a deployment in your Azure OpenAI resource before using it with Zerox:- Navigate to Azure OpenAI Studio
- Create a new deployment
- Select a vision-capable model (GPT-4o, GPT-4o-mini, etc.)
- Use the deployment name (not the model name) in Zerox configuration
Regional Availability
Vision models may not be available in all Azure regions. Check the Azure OpenAI Service regions documentation for current availability.Quota Management
Azure OpenAI uses tokens-per-minute (TPM) quotas. Monitor your usage to avoid rate limiting:Best Practices
- Use managed identities instead of API keys for production deployments
- Monitor your Azure costs through the Azure Portal
- Set appropriate
concurrencyvalues to stay within quota limits - Use
gpt-4o-minideployments for cost optimization - Enable diagnostic logging in Azure for troubleshooting

