Same door, same path, same body as a request to the provider’s own API. Four things to get right:
- Send your Foundry key in the provider’s native auth header (
x-api-keyon/anthropic,Authorization: Beareron/openai). - Add
x-mnemom-foundry-endpointwith your resource endpoint. - Add
x-mnemom-api-keywith a Mnemom API key. - Put the deployment name in
model, and keep Foundry’s default deployment name, which is the model id.
How it differs from the provider doors
On the provider doors the gateway forwards your request to the provider’s own API, whether Anthropic, OpenAI or Google, using the provider key you send. With Microsoft Foundry the gateway forwards to a Foundry endpoint you own instead. Two things follow from that:- A Mnemom API key is required. On the provider doors
x-mnemom-api-keyis optional, because the gateway can identify your agent from the provider key you send. With Foundry the credential you send belongs to your Azure resource, so the Mnemom API key is required to tell the gateway whose request it is. - Your deployment name is the model. Foundry serves models as named deployments. Put the deployment name in the request body’s
modelfield, exactly as you would when calling Foundry directly.
Before you start
You need:- A Foundry resource with a deployment of a supported model, using the default deployment name (the model id, for example
claude-sonnet-5orgpt-5). See Request body for why the name matters. - The resource’s endpoint. It has one of two shapes:
https://<resource>.services.ai.azure.comorhttps://<resource>.openai.azure.com. Claude deployments use theservices.ai.azure.comform. - A credential for that resource: the resource’s API key. On the
/openaidoor a Microsoft Entra bearer token also works. - A Mnemom API key with the
gatewaycapability, from an organization with billing set up. See API Keys and Pricing. The organization that owns the key is charged for the governance work on each request.
Endpoints
/anthropic door for Claude deployments and the /openai door for OpenAI deployments. These three paths are the only paths the gateway forwards to Foundry. Any other path returns 400.
Headers
Microsoft’s own
api-key header is not read by the gateway. Send the Foundry key in the provider’s native header as shown above.
Only the headers Foundry needs are forwarded: the content and credential headers, plus anthropic-version and anthropic-beta on the /anthropic door. Every x-mnemom-* header is removed before the request leaves the gateway.
Request body
Send the provider’s standard request body. Themodel field carries your Foundry deployment name. Do not add an api-version query parameter. The gateway forwards the path you call unchanged.
Supported models
Microsoft Foundry support covers Anthropic and OpenAI models only. The deployment you name must serve one of these models. Anthropic (/anthropic door)
- Claude Fable 5.1
- Claude Fable 5
- Claude Opus 5.5
- Claude Opus 5
- Claude Sonnet 5.5
- Claude Sonnet 5
- Claude Opus 4.8
- Claude Opus 4.7
- Claude Sonnet 4.6
- Claude Haiku 5.5
- Claude Haiku 4.5
/openai door)
- GPT-6.1 Sol
- GPT-6 Astra
- GPT-5.6 Sol
- GPT-5.6 Terra
- GPT-5.6 Luna
- GPT-5
/anthropic door and not on the /openai door.
Examples
Set your deployment name as themodel value. The examples below assume a Claude deployment named claude-sonnet-5 and an OpenAI deployment named gpt-5, the default names for those models. Compared with the provider-door examples, only the key and the endpoint header change.
Response
The response body is the provider’s native response, as returned by your Foundry deployment. The gateway relays it and adds its own response headers. Two things to plan for:- Governance can stop a request. Under a blocking enforcement mode, a request that fails a checkpoint is answered by the gateway and never reaches Foundry. Read
X-Mnemom-Verdictto tell the two apart. - Claude responses include a thinking block. As on the provider doors, the gateway enables extended thinking so it can analyze the agent’s reasoning. The
contentarray carries athinkingblock alongside thetextblock, so read blocks by type rather than by position. See the Gateway Quickstart note on thinking elements.
See the Headers reference for the full set and how to parse
X-Mnemom-Verdict.
Errors
Errors raised by the gateway use the standard gateway envelope:Billing
Microsoft bills your Foundry resource for the model inference. Mnemom charges only for the governance work it does on the request, as described in What is not charged.Related
- Gateway Quickstart: the provider doors and the response headers to read
- Provider Support: per-provider feature coverage and the canonical model ids
- Headers reference: the full set of gateway response headers
- Errors reference: error codes across the API and gateway