Azure OpenAI + SemanticGuard

Reduce Azure OpenAI costs.
Without breaking responses.

Add intelligent caching to your Azure OpenAI deployment. Your prompts stay with Azure. Your committed spend goes further. One line of code.

Azure OpenAI with SemanticGuard
import { createOpenAI } from "@ai-sdk/openai";
import { withSemanticGuard } from "@semanticguard/ai-sdk";
const azure = createOpenAI({
apiKey: "your-azure-api-key",
fetch: withSemanticGuard({
gatewayUrl: "https://semanticguard.dev",
apiKey: "sg-your-key-here",
extraHeaders: {
"x-sg-provider": "azure",
"x-sg-azure-resource": "your-resource-name",
"x-sg-azure-deployment": "gpt-4o",
},
}),
});
const result = await generateText({
model: azure("gpt-4o"),
prompt: "Summarize this quarterly report...",
});
$

Keep your Azure committed spend

Requests route through your Azure OpenAI deployment. SemanticGuard caches responses so identical or similar prompts never hit the API twice.

Measured cache correctness

Intelligent caching understands when two prompts mean the same thing. 100% measured correctness on our public benchmark — see /benchmark. Cache hits return in under 50ms.

Data stays with Azure

Your prompts never leave your contracted provider. Entity extraction uses your deployment's own models. Full data residency compliance.

How It Works with Azure

1

Add the wrapper

Add withSemanticGuard() with your Azure resource and deployment name. One line.

2

Requests flow through Azure

Your prompts go to your Azure deployment. SemanticGuard caches the responses using your Azure credentials.

3

Save on every duplicate

Similar prompts return cached responses in under 50ms. Your Azure spend drops without sacrificing response quality — 100% measured correctness on our public benchmark.

Built for enterprise Azure deployments

Drop-in integration

One fetch wrapper. No API format changes. Works with the Vercel AI SDK or direct API calls.

Same-vendor routing

All auxiliary calls use your Azure deployment. No data shared with other providers.

Full visibility

Real-time cost dashboard shows spend by model, project, and request. See exactly what you save.

Zero lock-in

Remove the wrapper and you are back to direct Azure calls. No migration, no format changes.

Start saving on Azure OpenAI today

Free tier includes 10K requests/mo with Shadow Mode. See your potential savings before enabling caching.