Overview
PromptGuard supports Azure OpenAI in passthrough mode, allowing you to use your own Azure OpenAI deployments with full security protection.No configuration needed on our end - simply provide your Azure credentials in each request.
Quick Start
To use Azure OpenAI with PromptGuard, you need three things:- Model name: Format as
azure/{deployment-name} - X-Azure-Resource header: Your Azure resource name
- Authorization header: Your Azure API key
Example Request
Finding Your Azure Details
Resource Name
- Go to Azure Portal → Your Azure OpenAI resource
- Under Keys and Endpoint, find your endpoint URL
- Format:
https://{resource-name}.openai.azure.com/ - Your resource name is everything before
.openai.azure.com
- Endpoint:
https://my-company-openai.openai.azure.com/ - Resource name:
my-company-openai
Deployment Name
- Go to Azure AI Studio → Your resource
- Click Deployments in the left sidebar
- Your deployment name is in the Deployment Name column
gpt-4-deploymentgpt-4o-minimy-custom-gpt4
API Key
- Go to Azure Portal → Your Azure OpenAI resource
- Under Keys and Endpoint, copy Key 1 or Key 2
SDK Integration
Python (OpenAI SDK)
Node.js (OpenAI SDK)
TypeScript
Supported Models
PromptGuard supports all Azure OpenAI models through passthrough:| Model Family | Example |
|---|---|
| GPT-4o | azure/my-gpt4o-deployment |
| GPT-4 Turbo | azure/my-gpt4-turbo |
| GPT-4 | azure/my-gpt4 |
| GPT-3.5 Turbo | azure/my-gpt35-turbo |
| Embeddings | azure/text-embedding-ada-002 |
| DALL-E | azure/my-dalle3 |
The model name is always:
azure/{your-deployment-name}Security Features
All PromptGuard security features work seamlessly with Azure OpenAI:Prompt Injection
Blocks jailbreak attempts and instruction hijacking
PII Detection
Redacts emails, SSNs, phone numbers automatically
Credit Cards
Luhn-validated credit card redaction
Data Exfiltration
Prevents “send to external email” attacks
Environment Variables
For cleaner code, use environment variables:Troubleshooting
Error: “Azure OpenAI passthrough requires X-Azure-Resource header”
Solution: Add theX-Azure-Resource header with your Azure resource name.
Error: “No provider found for model”
Solution: Make sure your model name starts withazure/ prefix.
Error: “Deployment not found”
Solution: Verify your deployment name in Azure AI Studio matches exactly.- Go to Azure AI Studio → Deployments
- Copy the exact deployment name
- Use it after
azure/prefix
Error: “Invalid credentials”
Solution: Make sure you’re using your Azure API key, not your Azure password.- Azure Portal → Your OpenAI resource
- Keys and Endpoint → Copy Key 1 or Key 2
- This is your API key (not your account password)
Next Steps
Security Policies
Configure custom security rules
Monitoring
Track usage and detect threats
Python Guide
Full Python integration guide
Node.js Guide
Full Node.js integration guide
Support
Need help with Azure OpenAI integration?- Email: [email protected]
- Azure Docs: Azure OpenAI Documentation
- Dashboard: app.promptguard.co