AI Instructor Live Labs Included

OpenAI: Tool Calling & Structured Outputs

Build production-grade tool-calling systems with JSON Schema definitions, parallel execution, Pydantic structured outputs, and role-based permission enforcement.

Intermediate
9h 55m
10 Lessons
OPENAI-201
OpenAI Tool Calling Developer Badge

View badge details

About This Course

Build reliable tool-calling systems using the OpenAI function calling API with parallel execution, permission boundaries, and production-grade error handling. Learn to define JSON Schema tool definitions, orchestrate parallel tool calls, enforce structured outputs with Pydantic, implement role-based tool permissions, and build a production tool orchestration runtime with retry logic and execution logging.

Course Curriculum

10 Lessons
01
AI Lesson
AI Lesson

JSON Schema Tool Definitions

30m

Learn how function calling works in the OpenAI Responses API. Covers defining tool schemas with JSON Schema, strict mode, tool_choice parameter, and designing reliable tool interfaces with clear names, descriptions, and parameter definitions.

02
Lab Exercise
Lab Exercise

Weather Lookup Tool - Lab Exercises

1h 25m 1 Exercises

Build a weather assistant with a get_weather(location, unit) tool. Implements the complete tool invocation loop: model decides to call the tool, arguments are parsed and executed, the result is fed back, and the model generates a natural language response. Demonstrates JSON Schema tool definition, tool_choice=auto, and non-tool fallback.

03
AI Lesson
AI Lesson

Parallel Tool Calls & Tool Execution Loops

30m

Learn how to handle multiple simultaneous tool calls from the model, build retry-safe execution loops, handle tool errors gracefully, map tool call IDs to results, and understand the difference between deterministic and non-deterministic tools.

04
Lab Exercise
Lab Exercise

Multi-Source Aggregation Pipeline - Lab Exercises

1h 25m 1 Exercises

Build a research aggregator that calls weather, news, and stock price tools in parallel — assembling a combined briefing from concurrent results. Demonstrates parallel tool execution, collecting multiple tool call IDs, executing all tools, and feeding all results back in a single follow-up request.

05
AI Lesson
AI Lesson

Structured Outputs with Pydantic

30m

Learn to use response_format with JSON Schema to guarantee output structure, use Pydantic models as the schema source, enforce strict mode, handle refusals, and build data extraction pipelines that turn unstructured text into typed objects.

06
Lab Exercise
Lab Exercise

Data Extraction Pipeline - Lab Exercises

1h 30m 2 Exercises

Extract structured contact information from unstructured email text and line items from invoice text into typed Pydantic models. Uses client.responses.parse() with ContactInfo and InvoiceData Pydantic schemas. Covers handling Optional fields, nested models, and refusal detection.

07
AI Lesson
AI Lesson

Tool Permission Boundaries & Output Verification

30m

Learn to restrict tool access by context, build tool access sandboxes with allowlists and denylists, enforce schema validation on tool outputs, guard against tool abuse with rate limits, and design least-privilege tool sets.

08
Lab Exercise
Lab Exercise

Tool Permission Sandbox - Lab Exercises

1h 30m 2 Exercises

Build a role-based tool permission system where admin, editor, and viewer roles each have different tool access. The model only receives the tool schemas allowed for the current role, and all tool calls are verified against role permissions before execution.

09
AI Lesson
AI Lesson

Capstone Briefing: Production Tool Orchestration Runtime

20m

Reviews all Course 201 concepts: tool schemas, parallel calling, execution loops, structured outputs, and permissions. Previews the capstone project architecture — a production-grade tool orchestration runtime with retry logic, permission enforcement, schema validation, and structured logging.

10
Lab Exercise
Lab Exercise

Capstone Project: Tool Orchestration Runtime - Lab Exercises

1h 45m 3 Exercises

Build a production-grade tool orchestration runtime with a tool registry, role-based access control, parallel tool execution, retry logic with exponential backoff, JSON Schema output validation, and a structured execution log tracking tool name, arguments, result, latency, and success/failure per invocation.

This course includes:

  • 24/7 AI Instructor Support
  • Live Lab Environments
  • 5 Hands-on Lessons
  • Completion Badge
OpenAI Tool Calling Developer Badge

Earn Your Badge

Complete all lessons to unlock the OpenAI Tool Calling Developer achievement badge.

Skill Level Intermediate
Total Duration 9h 55m
OpenAI Tool Calling Developer Badge
Achievement Badge

OpenAI Tool Calling Developer

Awarded for completing Tool Calling and Structured Outputs. Demonstrates ability to define JSON Schema tool definitions, orchestrate parallel tool calls, enforce structured outputs with Pydantic, implement RBAC tool permissions, and build production orchestration runtimes.

Course OpenAI: Tool Calling & Structured Outputs
Criteria Complete all lessons and exercises in OPENAI-201: Tool Calling and Structured Outputs
Valid For 730 days

Skills You'll Earn

Tool Calling JSON Schema Parallel Execution Pydantic Structured Outputs RBAC Retry Logic

Complete all lessons in this course to earn this badge