Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesOpenAI API from A to ZFunction calling: the full cycle
Retries after a 429 error: each pause is twice as long, then successA workflow map: a Telegram message branches into command, voice and text and reaches the agentA form request lands in a spreadsheet row labelled “Complaint”
Course

OpenAI API from A to Z

Module 1 · API Basics
01SDK install and first call02Choosing an OpenAI model03Tokens, context, and cost
Module 2 · Chat Completions
04Developer messages, reasoning effort and sampling parameters05Structured Outputs and JSON Schema06Multimodality: vision, speech-to-text and voice
Module 3 · Assistants API v2
07From Assistants to Responses: conversation memory08File Search and vector store09Code Interpreter10Combining tools and tool_choice
Module 4 · Function Calling
11Function calling: the full cycle12Parallel function calls13Patterns: designing reliable functions
Module 5 · Production
14Streaming responses15Embeddings and semantic search16Production: limits, retries, monitoring
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.

32 min readUpdated Nov 9, 20263 questions in quizReady prompt included
🔒

Full lesson access

Function calling: the full cycle opens after free sign-up: 7 days of full access to every course, no card needed.

Start 7-day free trial
Then Pro: $9/mo or $79/yr

View plans →

One trial lesson is open without sign-up: what a large language model is →

In this lesson
How a function call worksDefining a functionThe call cycleKey rulesStrict modeControlling callsExternal systems through MCPThe same cycle in Chat CompletionsPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free