Providers

Azure OpenAI proxy: track and cap Azure OpenAI spend per feature with accurate deployment pricing

Route Azure OpenAI deployments through an OpenAI-compatible gateway. Use the standard OpenAI SDK, map deployment names to the real model for accurate cost, and enforce budgets before the call.

Azure OpenAI serves OpenAI models from your own Azure resource. Cognocient AI sits in front of it, so your application uses the plain OpenAI SDK and gets the same attribution, budgets and kill switch as every other provider.

Setup

In Settings → AI Providers → Azure OpenAI enter:

FieldExampleNotes
API key3f9c...Key 1 or Key 2 from the Azure portal
Endpoint URLhttps://my-resource.openai.azure.comThe resource endpoint, without a path
Deployment nameprod-chatThe deployment calls are sent to
Underlying modelgpt-4oOptional, but needed for correct cost if the deployment name isn't the model name

Then call the gateway with the regular OpenAI client:

The gateway builds https://<resource>/openai/deployments/<deployment>/chat/completions?api-version=2024-10-21 and sends your key in Azure's api-key header. You don't use the AzureOpenAI client class or set an API version yourself.

Deployment names and accurate cost

Azure decides which model answers from the deployment name in the URL. The model field your app sends is not authoritative, and Azure ignores it for routing. If your deployment is called prod-chat, Cognocient AI can't tell from the request whether that is gpt-4o or gpt-4o-mini, a 16× price difference.

Fill in Underlying model once and every call is priced at that model's rate regardless of what the app sends. Leave it blank only if the deployment name is exactly the model name.

Routing between Azure and OpenAI

When an Azure key is configured, model names containing gpt-, o1 or o3 go to Azure; other names fall back to OpenAI. One Azure key maps to one deployment. To spread load across several deployments or regions, add more keys on Growth and above and use multi-key balancing, or put Azure and OpenAI behind one model name with load balancing.

Azure data residency

Prompts pass through Cognocient AI on their way to your Azure resource. Read Security & privacy for what is stored (metadata, not prompt content, by default) before routing regulated workloads.

Embeddings

/v1/embeddings works with Azure deployments of embedding models, priced per input token.

On this page