Azure OpenAI in Azure AI Foundry Models API lifecycle

This article is to help you understand the support lifecycle for Azure OpenAI APIs.

Note

New API response objects may be added to the API response without version changes. We recommend you only parse the response objects you require.

The 2025-04-01-preview Azure OpenAI spec uses OpenAPI 3.1, is a known issue that this is currently not fully supported by Azure API Management

API evolution

Historically, Azure OpenAI received monthly updates of new API versions. Taking advantage of new features required constantly updating code and environment variables with each new API release. Azure OpenAI also required the extra step of using Azure specific clients which created overhead when migrating code between OpenAI and Azure OpenAI. Starting in May 2025, you can now opt in to our next generation of v1 Azure OpenAI APIs which add support for:

  • Ongoing access to the latest features with no need to update api-version each month.
  • OpenAI client support with minimal code changes to swap between OpenAI and Azure OpenAI when using key-based authentication.

For the initial preview launch we are only supporting a subset of the inference API. While in preview, operations may have incomplete functionality that will be continually expanded.

Code changes

Last generation API

import os
from openai import AzureOpenAI

client = AzureOpenAI(
    api_key=os.getenv("AZURE_OPENAI_API_KEY"),  
    api_version="2025-04-01-preview",
    azure_endpoint="https://YOUR-RESOURCE-NAME.openai.azure.com")
    )

response = client.responses.create(
    model="gpt-4.1-nano", # Replace with your model deployment name 
    input="This is a test."
)

print(response.model_dump_json(indent=2)) 

Next generation API

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("AZURE_OPENAI_API_KEY"),
    base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
    default_query={"api-version": "preview"}, 
)

response = client.responses.create(   
  model="gpt-4.1-nano", # Replace with your model deployment name 
  input="This is a test.",
)

print(response.model_dump_json(indent=2)) 
  • OpenAI() client is used instead of AzureOpenAI().
  • base_url passes the Azure OpenAI endpoint and /openai/v1 is appended to the endpoint address.
  • default_query={"api-version": "preview"} indicates that the version-less always up-to-date preview API is being used.

Once we release the GA next generation v1 API, we will support two values: latest and preview. If api-version is not passed traffic is automatically routed to the latest GA version. Currently only preview is supported.

Preview API releases

Azure OpenAI API latest releases:

Changes between v1 preview release and 2025-04-01-preview

  • v1 preview API
  • Video generation support
  • NEW Responses API features:
    • Remote Model Context Protocol (MCP) servers tool integration
    • Support for asynchronous background tasks
    • Encrypted reasoning items
    • Image generation

Changes between 2025-04-01-preview and 2025-03-01-preview

Changes between 2025-03-01-preview and 2025-02-01-preview

Changes between 2025-02-01-preview and 2025-01-01-preview

Changes between 2025-01-01-preview and 2024-12-01-preview

Changes between 2024-12-01-preview and 2024-10-01-preview

Changes between 2024-09-01-preview and 2024-08-01-preview

  • max_completion_tokens added to support o1-preview and o1-mini models. max_tokens does not work with the o1 series models.
  • parallel_tool_calls added.
  • completion_tokens_details & reasoning_tokens added.
  • stream_options & include_usage added.

Changes between 2024-07-01-preview and 2024-08-01-preview API specification

Changes between 2024-5-01-preview and 2024-07-01-preview API specification

Changes between 2024-04-01-preview and 2024-05-01-preview API specification

Changes between 2024-03-01-preview and 2024-04-01-preview API specification

Latest GA API release

Azure OpenAI API version 2024-10-21 is currently the latest GA API release. This API version is the replacement for the previous 2024-06-01 GA API release.

Updating API versions

We recommend first testing the upgrade to new API versions to confirm there's no impact to your application from the API update before making the change globally across your environment.

If you're using the OpenAI Python or JavaScript client libraries, or the REST API, you'll need to update your code directly to the latest preview API version.

If you're using one of the Azure OpenAI SDKs for C#, Go, or Java, you'll instead need to update to the latest version of the SDK. Each SDK release is hardcoded to work with specific versions of the Azure OpenAI API.

Next steps