Перейти к содержимому

OpenAI API Python Tutorial: Your First API Call | AI Engineer Course #4

AI Dev Playbook

0:00 / 0:00

OpenAI API Python Tutorial: Your First API Call | AI Engineer Course #4

15 просмотров · 13 дн. назад
AI Dev Playbook
46 подписчиков
15 просмотров · 13 дн. назад
Make your first OpenAI API call in Python with the Responses API. Learn how to steer the model with instructions, use message roles, control length and temperature, and calculate the exact token cost of every request with gpt-6-luna. In this lesson you'll learn: ✅ What happens in one API call ✅ client.responses.create and output_text ✅ Instructions vs input ✅ Developer and user message roles ✅ max_output_tokens, temperature and reasoning effort ✅ Measuring tokens and cost with response.usage ✅ Choosing between GPT-6 Luna, Sol and Astra ⏱️ Chapters 0:00 Introduction 0:20 What happens in one API call 0:46 The basic call 1:08 Steer it with instructions 1:35 Messages with roles 1:56 Control length and randomness 2:25 Measure tokens and cost 3:00 Choosing a model 3:26 Recap and next lesson 📚 AI Engineer with Python: a free 12-lesson course ◀ Previous: Lesson 3: Python Essentials for AI ▶ Next: Lesson 5: Prompt Engineering That Works ▶ Full playlist:    / @techwithxutilhub   📘 Course book (PDF) + all code: [add your link] Tools used: Python 3.11+, OpenAI Responses API, gpt-6-luna. Model names and prices checked against OpenAI's docs in September 2026. 🔔 Subscribe for the next lesson. #OpenAI #Python #AIEngineer