Function calling and other API updates

OpenAI Blog Products

Summary

OpenAI announces function calling capability for GPT-4 and GPT-3.5-turbo models, allowing developers to describe functions via JSON Schema and have models intelligently choose to output structured JSON for external tool integration. The update also extends support for older model versions until June 2024 and improves model evaluation methodology.

We’re announcing updates including more steerable API models, function calling capabilities, longer context, and lower prices.
Original Article Export to Word Export to PDF
View Cached Full Text

Cached at: 04/20/26, 02:51 PM

# Function calling and other API updates Source: [https://openai.com/index/function-calling-and-other-api-updates/](https://openai.com/index/function-calling-and-other-api-updates/) *July 20, 2023 update:* We previously communicated to developers that`gpt\-3\.5\-turbo\-0301`,`gpt\-4\-0314`and`gpt\-4\-32k\-0314`models were scheduled for sunset on Sept 13, 2023\. After reviewing feedback from customers and our community, we are extending support for those models until at least June 13, 2024\. When we release new model versions, our top priority is to make newer models smarter across the board\. We are targeting improvements on a large number of axes, such as instruction following, factual accuracy, and refusal behavior\. For instance, the`gpt\-4\-0613`model introduced last month resulted in significant improvement on calling functions\. We look at a large number of evaluation metrics to determine if a new model should be released\. While the majority of metrics have improved, there may be some tasks where the performance gets worse\. This is why we allow API users to pin the model version\. For example, you can use`gpt\-4\-0314`instead of the generic`gpt\-4`, which points to the latest model version\. Each individually pinned model is stable, meaning that we won’t make changes that impact the outputs\. We are working hard to ensure that new versions result in improvements across a comprehensive range of tasks\. That said, our evaluation methodology isn’t perfect, and we’re constantly improving it\. One way to help us ensure new models get better at domains you care about, is to contribute to[the OpenAI Evals library⁠\(opens in a new window\)](https://github.com/openai/evals/tree/main)to report shortcomings in our models\. We understand that model upgrades and behavior changes can be disruptive to your applications\. We are working on ways to give developers more stability and visibility into how we release and deprecate models\. --- Developers can now describe functions to`gpt\-4\-0613`and`gpt\-3\.5\-turbo\-0613`, and have the model intelligently choose to output a JSON object containing arguments to call those functions\. This is a new way to more reliably connect GPT's capabilities with external tools and APIs\. These models have been fine\-tuned to both detect when a function needs to be called \(depending on the user’s input\) and to respond with JSON that adheres to the function signature\. Function calling allows developers to more reliably get structured data back from the model\. For example, developers can: - Create chatbots that answer questions by calling external tools \(e\.g\., like ChatGPT Plugins\) Convert queries such as “Email Anya to see if she wants to get coffee next Friday” to a function call like`send\_email\(to: string, body: string\)`, or “What’s the weather like in Boston?” to`get\_current\_weather\(location: string, unit: 'celsius' \| 'fahrenheit'\)`\. - Convert natural language into API calls or database queries Convert “Who are my top ten customers this month?” to an internal API call such as`get\_customers\_by\_revenue\(start\_date: string, end\_date: string, limit: int\)`, or “How many orders did Acme, Inc\. place last month?” to a SQL query using`sql\_query\(query: string\)`\. - Extract structured data from text Define a function called`extract\_people\_data\(people: \[\{name: string, birthday: string, location: string\}\]\)`, to extract all people mentioned in a Wikipedia article\. These use cases are enabled by new API parameters in our`/v1/chat/completions`endpoint,`functions`and`function\_call`, that allow developers to describe functions to the model via JSON Schema, and optionally ask it to call a specific function\. Get started with our[developer documentation⁠\(opens in a new window\)](https://platform.openai.com/docs/guides/gpt/function-calling)and[add evals⁠\(opens in a new window\)](https://github.com/openai/evals)if you find cases where function calling could be improved Since the alpha release of ChatGPT plugins, we have learned much about making tools and language models work together safely\. However, there are still open research questions\. For example, a proof\-of\-concept exploit illustrates how untrusted data from a tool’s output can instruct the model to perform unintended actions\. We are working to mitigate these and other risks\. Developers can protect their applications by only consuming information from trusted tools and by including user confirmation steps before performing actions with real\-world impact, such as sending an email, posting online, or making a purchase\.

Similar Articles

GPT-3.5 Turbo fine-tuning and API updates

OpenAI Blog

OpenAI has released fine-tuning capabilities for GPT-3.5 Turbo, allowing developers to customize models for specific use cases with improved performance, steerability, and output formatting. The update enables fine-tuned GPT-3.5 Turbo to match GPT-4 performance on certain tasks while reducing prompt sizes by up to 90%.

Introducing GPT-4.1 in the API

OpenAI Blog

OpenAI launches GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano models via API with major improvements in coding (54.6% on SWE-bench), instruction following, and 1M token context windows at lower costs. GPT-4.5 Preview will be deprecated on July 14, 2025.

Introducing GPT-5 for developers

OpenAI Blog

OpenAI releases GPT-5 in their API platform, a state-of-the-art model achieving 74.9% on SWE-bench Verified and excelling at coding, agentic tasks, and long-context reasoning. The release includes three model sizes (gpt-5, gpt-5-mini, gpt-5-nano) and new API features like verbosity control, minimal reasoning mode, and custom tools.

GPT-4 API general availability and deprecation of older models in the Completions API

OpenAI Blog

OpenAI announced GPT-4 API general availability and deprecated older completion models (GPT-3 base models and text-davinci-003), requiring developers to migrate to new models like gpt-3.5-turbo-instruct or newer by January 4, 2024. Fine-tuned models will need to be retrained on new base models with priority access offered for GPT-3.5 Turbo and GPT-4 fine-tuning.

Introducing GPT-5.4

OpenAI Blog

OpenAI is releasing GPT-5.4 and GPT-5.4 Pro across ChatGPT, the API, and Codex, featuring native computer-use capabilities, 1M token context, improved reasoning and coding, and state-of-the-art performance on professional knowledge work benchmarks. It is described as OpenAI's most capable and token-efficient reasoning model to date.