Blog Post

AI - Azure AI services Blog
3 MIN READ

Introducing GPT-4o-2024-08-06 API with Structured Outputs on Azure

Allan_Carranza's avatar
Sep 03, 2024

We are excited to announce the release of the API for GPT-4o-2024-08-06, the newest and most advanced AI model from OpenAI, now available via the Azure OpenAI Service. This model brings significant advancements to AI capabilities, including the game-changing JSON Structured Outputs feature, which enhances developer productivity and application versatility. Starting today, you can harness the full power of GPT-4o-2024-08-06 in your generative AI applications.


Three Key Highlights of GPT-4o-2024-08-06


GPT-4o-2024-08-06 is a groundbreaking step forward in  GenAI model technology, boasting several remarkable new features and improvements.

1. New Feature: JSON Structured Outputs

JSON Structured Outputs enable developers to specify the desired output format from the AI model by defining a JSON Schema. This feature ensures that outputs are well-structured and consistent, simplifying the generation of structured data and reducing the need for post-processing. It also provides significant cost savings, with up to 50% savings on input costs and up to 33% savings on output costs compared to the previous model, GPT-4o-2024-05-13.

2. Improved Cost Efficiency

The GPT-4o-2024-08-06 model offers substantial cost savings for developers:

  • Input Costs: Reduced by up to 50% ($2.50 per 1M input tokens)
  • Output Costs: Reduced by up to 33% ($10.00 per 1M output tokens)

3. Expanded Availability

The GPT-4o-2024-08-06 API is now available globally through Global and Regional Standard deployments in every US region plus Sweden Central.


Why Choose GPT-4o-2024-08-06?


The GPT-4o-2024-08-06 model is designed to perform a wide range of tasks with minimal cost and latency, making it perfect for applications that require fast, real-time text responses. With the introduction of JSON Structured Outputs, it delivers 100% reliability in evaluations, ensuring outputs perfectly match the defined output schemas. This innovation enhances the efficiency and accuracy of AI-powered applications across diverse use cases.


Structured Outputs: Revolutionizing AI Development

 

What are Structured Outputs? Structured Outputs allow developers to define the exact output format using a JSON Schema, making it easier to generate data in the desired structure for various applications. This feature is ideal for seamless integration with other systems.


Key Benefits for Developers:

  • Consistent Data Formats: Outputs adhere to a defined JSON Schema, minimizing the need for manual post-processing.
  • Flexible Tool Integrations: Supports specific function signatures, enabling precise outputs for tool integrations.
  • Streamlined Application Development: Simplifies the creation of data payloads, enhancing the overall user experience.

Example Use Case: A customer support chatbot can use Structured Outputs to generate responses formatted specifically for logging and analytics. This approach allows for seamless data integration, simplifying the process of logging, analyzing, and taking action based on the data.


Getting Started with Structured Outputs: 
To leverage the benefits of Structured Outputs, follow these three simple steps:

  1. Define Your JSON Schema: Determine the structure of your AI outputs.
  2. Configure the AI Model: Utilize the Structured Outputs feature in your API call.
  3. Integration and Testing: Integrate the output into your application and test thoroughly.


Availability and Pricing


Pricing Options: 
The GPT-4o-2024-08-06 API offers significant cost reductions compared to its predecessor, GPT-4o-2024-05-13. Inputs are priced at $2.50 per 1M tokens, and outputs are $10.00 per 1M tokens. For detailed pricing, please refer to the Azure OpenAI Service pricing page.


Regional Availability:

We are happy to make the API available in all US regions + Sweden Central as part of Global and Regional Standard deployments.


Comparing GPT-4o-2024-08-06 to Other Models


Compared to GPT-4o-2024-05-13: The new model offers advanced features like Structured Outputs for more precise and structured outputs across various applications, enhancing performance and reliability.


Compared to GPT-4o Mini: While both models share multimodal capabilities, GPT-4o Mini is optimized for cost efficiency, making it an ideal choice for testing and applications where cost is a critical factor.


Next Steps for Customers


Learn more about the model in our documentation and try out the model in the Azure AI Studio. If you're currently using GPT-4o-2024-05-13, you can easily upgrade to GPT-4o-2024-08-06 if both models are available in your region and offer type. At this time, there are no plans for automatic upgrades to the new model, but we will keep you informed of any future changes.

Updated Sep 03, 2024
Version 1.0
  • yparwani's avatar
    yparwani
    Copper Contributor

    According to OpenAI documentation structured outputs are supported with 4o-mini as well..

    https://platform.openai.com/docs/guides/structured-outputs/introduction

     

    But the Azure Documentation limits the support to only GPT4o : https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python#supported-models

     

    The same can be observed while making the calls. Is there a reason for not supporting 4o-mini for structured outputs on Azure ?

     

  • Does the new version release on 2024-08-06 support assistants? I encountered an error while using the assistant feature in the latest version, GPT-4o.

     

  • chrisjohnstone's avatar
    chrisjohnstone
    Copper Contributor

    Great news! This one is a game changer.
    Looking forward to global rollout. AU East next please 😎

  • joshhayes's avatar
    joshhayes
    Copper Contributor

    algalxdean I get the same error using Assistants API in my app. The "What's New" says this requires API version 08-01-2024-preview but this version doesn't exist yet in Rest API Specs. When trying to use this API version and the structured pydantic tool call it doesn't recognize the required "strict" field.

     

    BadRequestError: Error code: 400 - {'error': {'message': "Unknown parameter: 'tools[0].function.strict'.", 'type': 'invalid_request_error', 'param': 'tools[0].function.strict', 'code': 'unknown_parameter'}}
  • behnam354's avatar
    behnam354
    Copper Contributor

    I used to be able to follow the python code under "Native SDK support" section of this article using gpt-4o-2024-05-13 model (and using AzureOpenAI class instead of the OpenAI one). However, after Sept 3rd release, I get the following error:

     

    openai.BadRequestError: Error code: 400 - {'error': {'message': "Invalid function definition for 'Query': unexpected parameter 'strict' parameter supplied.", 'type': 'invalid_request_error', 'param': None, 'code': None}}

     

    It seems that under the hood of the function calling option for gpt-4o-2024-05-13 model has changed. Am I right? Any thoughts?

  • aasso1340's avatar
    aasso1340
    Copper Contributor

    Its seems like it still has many errors, when do you think the developer's will finish getting rid of the bugs? In the mean time we can stick to the older version's and continue using then until GPT-4o-2024-08-06 API has all the bugs and errors fixed.

  • Agazoth's avatar
    Agazoth
    Copper Contributor

    Like geoliang I'm also not able to work with the assistant API on model 2024-08-06. Is the assistant endpoint being abandoned or is support comming at some point in time?

    We use our GPT-4o deployment for 2 diffferent tasks. One services our webapp and the other is using the assistant functionality. Running 2024-05-13 allowed us to run both workloads, but we had to upgrade to 2024-08-06 to mitigate edge cases where the chat completion payload omittede the content parameter from answer messages.