OpenAI API from A to Z · Lesson 11
Function calling: the full cycle
Function calling in the Responses API: a flat function definition with strict, function_call items in output, JSON.parse of arguments, the result as a function_call_output item with call_id, and a second request for the answer. Plus tool_choice, tool search, MCP and the same cycle in Chat Completions. Full TypeScript example.
One trial lesson is open without sign-up: what a large language model is →


