Simplify AI Schemas with Pydantic & OpenAI (No More Manual JSON!)

Leon van Zyl March 22, 2025
Video Thumbnail
Leon van Zyl Logo

Leon van Zyl

@leonvanzyl

About

Welcome to my YouTube channel! Here, you'll find step-by-step tutorials on building real-world solutions with AI. From AI agents and automation workflows to vibe coding and agentic coding, I cover it all - using both code and no-code tools like n8n, Claude Code, Codex, Cursor, and more. Whether you're a vibe coder building your first app with AI, or a developer integrating agents into your workflow, there's something here for you. I focus on practical, hands-on tutorials that you can follow along with and implement right away. New videos every week - thanks for stopping by, and I hope you enjoy the content! Let’s work together! - For brand, sponsorship, and business inquiries: [email protected]

Video Description

🚀 Access ALL video resources & get personalized help in my community: https://www.skool.com/agentic-labs/about?ref=3fd61190e13d426dbf4f3b38adc7de69 Learn how to use Pydantic with OpenAI's Responses API to simplify JSON schema creation. This tutorial shows you how to extract structured data from text without writing complex schemas manually, perfect for developers looking to streamline their AI data extraction workflows. 🙏 Support My Channel: Buy me a coffee ☕ : https://www.buymeacoffee.com/leonvanzyl PayPal Donation: https://www.paypal.com/ncp/payment/EKRQ8QSGV6CWW 📑 Useful Links: Watch the full Responses API Course here: https://www.youtube.com/playlist?list=PL4HikwTaYE0GgR36Px9iXb9bNgrLihCnG Responses API Docs: https://platform.openai.com/docs/api-reference/responses Code in Github: https://github.com/leonvanzyl/openai-responses-api-tutorial-python 🕒 TIMESTAMPS: 00:00 - Intro 01:19 - Creating Pydantic Class 03:09 - additionalProperties 03:57 - Passing Schema to API #openai #openaiapi #aiagents

AI Developers' Essential Tools

AI-recommended products based on this video

Loading...
10ft Rolling Library Ladder Hardware Kit, Sliding Track Kit with Floor Rollers, Loft Hardware for Home Bookshelf Warehouse (No Ladder)

10ft Rolling Library Ladder Hardware Kit, Sliding Track Kit with Floor Rollers, Loft Hardware for Home Bookshelf Warehouse (No Ladder)

(4)
$144.99
FREE delivery Sat, Jun 28
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
MSI Ultra-Slim Thin 15 VR-Ready High FPS Gaming Laptop, 15.6 FHD 144Hz, Intel Core i5-13420H, NVIDIA GeForce RTX 4060, 32GB RAM, 2TB SSD, Backlit KB, Wi-Fi 6, Bundle with PCO Notebook Fold Radiator

MSI Ultra-Slim Thin 15 VR-Ready High FPS Gaming Laptop, 15.6 FHD 144Hz, Intel Core i5-13420H, NVIDIA GeForce RTX 4060, 32GB RAM, 2TB SSD, Backlit KB, Wi-Fi 6, Bundle with PCO Notebook Fold Radiator

(0)
$4,697.44
FREE delivery Jun 23 - Jul 3Only 3 left in stock.
Loading...
MSI Stealth 18 HX AI 18” 240Hz QHD+ Gaming Laptop: Intel Ultra 9-275HX, NVIDIA Geforce RTX 5080, 32GB DDR5, 2TB NVMe SSD, Wi-Fi 7, Win 11 Home :Midnight Black A2XWIG-045US

MSI Stealth 18 HX AI 18” 240Hz QHD+ Gaming Laptop: Intel Ultra 9-275HX, NVIDIA Geforce RTX 5080, 32GB DDR5, 2TB NVMe SSD, Wi-Fi 7, Win 11 Home :Midnight Black A2XWIG-045US

(12)
$3,999.00$3,587.85
FREE delivery Sat, Jan 3
Loading...
MSI Stealth A18 AI+ A3XWIG-013CA 18" UHD+ mini LED 120Hz Gaming Laptop, AMD Ryzen AI 9 HX 370, RTX 5080, 64GB DDR5, 2TB NVMe SSD, Windows 11 Home

MSI Stealth A18 AI+ A3XWIG-013CA 18" UHD+ mini LED 120Hz Gaming Laptop, AMD Ryzen AI 9 HX 370, RTX 5080, 64GB DDR5, 2TB NVMe SSD, Windows 11 Home

(1)
$4,499.00
FREE delivery Sat, Jan 3
Loading...
Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

(40)
$1,399.00
FREE delivery Feb 24 - Mar 5
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

(69)
$11.69
FREE delivery Sun, Mar 15 on your first order
1K+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

(77)
$49.97
FREE delivery Fri, Feb 27
Loading...
Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

(40)
$1,399.00
FREE delivery Feb 24 - Mar 5
Loading...
Lenovo ThinkPad E16 Business Laptop (16" FHD+ Touchscreen, Intel 13th Gen 10-Core i7-1355U, 40GB RAM, 2TB SSD) Backlit, Fingerprint, FHD Webcam, Ethernet, Thunderbolt 4, Win 11 Pro w/ AI Copilot

Lenovo ThinkPad E16 Business Laptop (16" FHD+ Touchscreen, Intel 13th Gen 10-Core i7-1355U, 40GB RAM, 2TB SSD) Backlit, Fingerprint, FHD Webcam, Ethernet, Thunderbolt 4, Win 11 Pro w/ AI Copilot

(0)
$5,116.61
FREE delivery Jun 23 - Jul 3Only 3 left in stock.
Loading...
Samsung Galaxy S24 FE, AI Smartphone, Unlocked Android Smartphone, 128GB Storage, 8GB Ram, 6.7" Display, 50MP Camera - Graphite (CAD Version & Warranty)

Samsung Galaxy S24 FE, AI Smartphone, Unlocked Android Smartphone, 128GB Storage, 8GB Ram, 6.7" Display, 50MP Camera - Graphite (CAD Version & Warranty)

(47)
$749.95$661.74
PrimeFREE delivery Sat, Jun 14
Loading...
Beelink SER9 Pro Mini Desktop PC with AMD Ryzen AI 9 HX 370 12C/24T, 32GB DDR5 1TB NVMe M.2 SSD, Triple Display Output, WiFi 6, USB4, 2.5G RJ45, Bluetooth 5.2 W-11 Mini Gaming Computer

Beelink SER9 Pro Mini Desktop PC with AMD Ryzen AI 9 HX 370 12C/24T, 32GB DDR5 1TB NVMe M.2 SSD, Triple Display Output, WiFi 6, USB4, 2.5G RJ45, Bluetooth 5.2 W-11 Mini Gaming Computer

(6)
$1,679.00
PrimeFREE delivery Sat, Jun 14
Loading...
1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

(69)
$11.69
FREE delivery Sun, Mar 15 on your first order
1K+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

(77)
$49.97
FREE delivery Fri, Feb 27
Loading...
Translation Earbuds Real Time - AI 144 Language Translator Earbuds, Audifonos Traductores Inglés Español, 3-in-1 Translating Device, Translate Ear Buds for Travel Learning with Charging Cradle

Translation Earbuds Real Time - AI 144 Language Translator Earbuds, Audifonos Traductores Inglés Español, 3-in-1 Translating Device, Translate Ear Buds for Travel Learning with Charging Cradle

(30)
$99.99
FREE delivery Sun, Jan 4
300+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

(69)
$11.69
FREE delivery Sun, Mar 15 on your first order
1K+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

(77)
$49.97
FREE delivery Fri, Feb 27
Loading...
Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

(40)
$1,399.00
FREE delivery Feb 24 - Mar 5
Loading...
soundcore by Anker P20i True Wireless Earbuds, 10mm Drivers with Big Bass, Bluetooth 5.3, 30H Long Playtime, IPX5 Water-Resistant, 2 Mics for AI Clear Calls, 22 Preset EQs, Customization via App

soundcore by Anker P20i True Wireless Earbuds, 10mm Drivers with Big Bass, Bluetooth 5.3, 30H Long Playtime, IPX5 Water-Resistant, 2 Mics for AI Clear Calls, 22 Preset EQs, Customization via App

(61,759)
$29.99
FREE delivery Sat, Jun 14 on your first order
4K+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

(69)
$11.69
FREE delivery Sun, Mar 15 on your first order
1K+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

(77)
$49.97
FREE delivery Fri, Feb 27
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device, Écouteurs traducteurs Anglais-français, Clear Voice Translation Headphones with Charging Case for Travel & Learning Global Recycled Standard

(78)
$99.99
FREE delivery Thu, Apr 9
100+ bought in past month
Loading...
1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

1080p Wireless Doorbell Camera Without Receiver, AI Human Detection, 2-Way Audio, Night Vision, Cloud Storage (Sold Separately), Real-Time Alerts, Battery-Powered, 2.4Ghz Wi-Fi Olny (Black)

(69)
$11.69
FREE delivery Sun, Mar 15 on your first order
1K+ bought in past month
Loading...
Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

Real-Time AI Translation Earbuds - 198 Languages 3-in-1 Translating Device,Écouteurs traducteurs Anglais-français, Clear Voice Translation with Charging Case for Travel & Learning Global Recycled Standard

(77)
$49.97
FREE delivery Fri, Feb 27
Loading...
Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

Acer Nitro V 16 AI Gaming Laptop, 16" WUXGA 180Hz Display, AMD Ryzen 5 240, GeForce RTX 5050, 16GB DDR5, 512GB SSD, Backlit Keyboard, Copilot, Wi-Fi 6E, Win 11, Black, 1TB Docking Station Set

(40)
$1,399.00
FREE delivery Feb 24 - Mar 5