For Azure's v1 API, use the standard OpenAI client, an /openai/v1/ base URL and your deployment name as model. If your captured URL contains /openai/v1/deployments/…, check whether a dated-API AzureOpenAI configuration was combined with the v1 prefix.
Compare the actual request path
These three paths were captured from openai 7.43.0 using local, handwritten responses. The SDK constructed the requests; no Azure request was sent. The deployment and version labels below are synthetic.
| Setup | Captured path and client |
|---|---|
| v1 | /openai/v1/chat/completionsStandard |
| Mixed | /openai/v1/deployments/my-chat-deployment/chat/completions?api-version=example-dated-version
|
| Dated | /openai/deployments/my-chat-deployment/chat/completions?api-version=example-dated-version
|
A 404 alone does not identify this mistake. If the URL already has the intended shape, continue with the resource, deployment, operation and access checks. Keep the full status and response body rather than replacing keys repeatedly.
The model field is your deployment name
- v1 base URL
https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/- Model
- The exact deployment name in that resource, such as the fictional
my-chat-deployment. - Credential
- The matching Azure resource key or the documented Microsoft Entra token flow.
A public model name works only if you chose that same deployment name. Do not copy a model ID from another host and assume Azure created a matching deployment. Microsoft also documents the services.ai.azure.com resource-host format; keep the endpoint supplied for your own resource.
Configure the standard v1 client
Set AZURE_OPENAI_BASE_URL to the complete v1 base shown above, AZURE_OPENAI_DEPLOYMENT to your deployment name, and AZURE_OPENAI_API_KEY locally. This API-key example sends a real request if you run it; it requires your own supported deployment and account. Microsoft's v1 documentation also covers managed Entra authentication.
import OpenAI from "openai";
const baseURL = process.env.AZURE_OPENAI_BASE_URL;
const apiKey = process.env.AZURE_OPENAI_API_KEY;
const deployment = process.env.AZURE_OPENAI_DEPLOYMENT;
if (!baseURL || !apiKey || !deployment) {
throw new Error("Set the Azure v1 base URL, resource key and deployment name.");
}
const client = new OpenAI({
baseURL,
apiKey,
});
const response = await client.chat.completions.create({
model: deployment,
messages: [{ role: "user", content: "Reply briefly." }],
});
console.log(response.choices[0]?.message.content);The current SDK documentation keeps AzureOpenAI for dated API versions. Azure v1 does not require a dated api-version parameter. Changing the base URL does not convert an operation or add model features: use a deployment supporting the selected API. For a separate /responses routing problem, see the AI SDK or LangChain guide.
Check SDK routing without a key
Download the no-key route check
Save the file in an empty folder with Node.js 22 or later, then run:
npm install --ignore-scripts openai@7.43.0
node azure-v1-route-check.mjsInstallation downloads the SDK. The check itself supplies a synthetic key, reserved example.invalid host and injected responses, then asserts all three paths and the unchanged deployment-name body. It prints the capture; it does not test Azure eligibility, authentication acceptance or model output. Our recorded run additionally denied network access at the operating-system level.
What the original report establishes
Issue #1684 reported the mixed v1/deployment path with openai 6.3.0 in October 2025. It was closed when documentation/example PR #1692 merged on 23 June 2026. This is a configuration distinction supported by the current guide and our local capture; it is not an unresolved-bug claim about every installed version.
- Microsoft: v1 client, endpoint and API lifecycle
- Microsoft: deployment names and endpoint differences
- Pinned OpenAI Node SDK Azure guide
- Original 6.3.0 report · Merged documentation correction
Sources and no-key SDK capture checked 25 October 2026. No Azure account, deployment, real key or model request was used. ChinaGenAI's own free Chat Completions route uses separate settings and does not provide an Azure deployment.
Exact symptom wording and source
Use the quoted text to locate the relevant check. Providers and clients can phrase the same failure differently; compare the complete response before applying a fix.
Reported text:
Azure OpenAI v1 404: /openai/v1/deployments/{model}/chat/completionsCompare the client class and API contract; the current SDK guide uses standard OpenAI for v1 and AzureOpenAI for dated APIs. A 404 alone does not prove this cause.
POST {endpoint}/openai/v1/deployments/{model}/chat/completions?api-version=preview