Does OpenAI support function calling?

Updated October 2026 · How we answer

Short answerYes, OpenAI supports function calling in its GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo models via the API. You define functions, and the model returns a structured call with arguments.

How It Works

OpenAI's function calling allows you to describe functions in a JSON schema. When you send a chat completion request, you include a list of functions. The model can then choose to output a JSON object with the function name and arguments to call. You execute the function and send the result back to the model to continue the conversation.

This is available in the Chat Completions API. The model doesn't execute the function itself; it only suggests the call. Your code handles execution.

  • Define functions in JSON schema.
  • Model returns function_call object.
  • You execute and return result.
  • Works with Chat Completions API.

Supported Models and Versions

Function calling is supported in GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo models. Specifically, models like gpt-4-0613, gpt-4-1106-preview, gpt-3.5-turbo-0613, and later versions. Older models like gpt-3.5-turbo-0301 do not support it.

OpenAI has also introduced parallel function calling, where the model can call multiple functions at once, in newer models. Check the OpenAI documentation for the latest model names and features.

  • GPT-4 and GPT-3.5 Turbo (0613 and later).
  • Parallel function calling in newer models.
  • Not in older versions.
  • Check docs for current model list.

Best Practices

When using OpenAI's function calling, provide clear descriptions for each function and its parameters. This helps the model choose correctly. Handle the model's function call output by executing the function and returning a message with the role "function" and the result.

Also, consider using the "tool" role in newer API versions, which is a more flexible alternative to functions. Always test with your specific use case to ensure reliability.

  • Write detailed function descriptions.
  • Validate arguments before execution.
  • Return results in the expected format.
  • Consider using the newer tools API.

Common mistakes

  • Thinking the model executes the function; it only suggests the call.
  • Using outdated model versions that don't support function calling.
  • Not handling errors when the model calls a function with invalid arguments.
From our studioDev1 AI — A free AI assistant for Windows that pools the free tiers of every major provider.