Skip to Content
View all events

OpenAI’s Python APIs & Agents SDK: A Code-Intensive Intro with Paul Deitel

Published by Pearson

Intermediate content levelIntermediate

Use text, images, audio, code & moderation APIs and the Agents SDK

In this live course, Paul Deitel—bestselling author and one of the world’s most experienced programming-language trainers—demonstrates:

  • Generating and manipulating text, images, speech, and code, and moderating text and images.
  • Performing coding tasks with OpenAI's latest Codex model.
  • The fundamentals of creating autonomous single- and multi-agent systems with the OpenAI Agents SDK and built-in and custom tools.

Join Paul Deitel for an aggressively paced, code-intensive, presentation-only intro to genAI (generative AI) programming using OpenAI's APIs and agentic programming with the official openai-python and openai-agents Python libraries. In fully coded examples, Paul demonstrates multimodal genAI APIs and introduces building single-agent and multi-agent systems.

You’ll learn many aspects of the OpenAI APIs and GPT-based models, including text summarization, sentiment analysis, vision (accessible image descriptions), language detection and translation, and named entity recognition via the Responses API. Image generation via the Images API. Image editing via the Images and Responses APIs. Speech recognition, speech synthesis, and generating closed captions for video via the Audio API, and speech-to-text (STT) and text-to-speech (TTS) models. Text and image content moderation via the Moderation API. Generating and manipulating Python code via the Responses API and Codex models. Intro to building intelligent, autonomous AI agents and orchestrating multiple agents via the Agents SDK. Note: These technologies are evolving quickly. Paul updates the code examples, APIs and genAI models as appropriate for each offering.

What you’ll learn and how you can apply it

  • Review a typical Python environment and how to obtain your API key to work with the OpenAI APIs and Agents SDK after the course.
  • Leverage your Python skills and the OpenAI APIs to build multimodal AI apps that understand, generate and manipulate text, images, speech, video closed captions and code, and moderate text and images.
  • Leverage your Python skills and the OpenAI Agents SDK to build single-agent and multi-agent systems that can autonomously reason, use tools and execute multi-step tasks.

This live event is for you because...

  • You’re a Python developer who sees exciting genAI and agentic AI technologies popping up everywhere, and you want to stay ahead of the curve and enhance your career opportunities with a code-intensive intro to them.
  • You're a Python developer who wants to integrate OpenAI's genAI and agentic capabilities into your existing Python workflows.
  • You’re a manager contemplating Python projects using genAI and agentic technologies, and want a code-based intro for you and your staff.
  • You're a technical lead or architect evaluating whether and how to incorporate OpenAI APIs and agentic capabilities into your team's products, and you want a guided survey of the APIs.

Prerequisites

  • Python programming experience.
  • Paul presents this course’s content in convenient Jupyter Notebooks using the JupyterLab interface, which you can learn about at https://jupyterlab.readthedocs.io/en/latest/.
  • Feel free to contact Paul Deitel directly at paul@deitel.com to confirm whether this aggressively paced, presentation-only course is appropriate for you.

Course Set-up

Recommended Preparation

Recommended Follow-up

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Segment 1: Setup and Configuration

  • Optional for attendees who want to run the examples after the course or in parallel with Paul during the course.
  • Creating an OpenAI developer account.
  • Obtaining and securing your API key.

Segment 2: Introduction to the OpenAI APIs and Models

  • Overview of the OpenAI APIs.
  • Latest GPT, GPT mini and GPT nano models.
  • Choosing the right model for your task.

Segment 3: Text Generation via the Responses API

  • Text summarization: Summary abstract paragraphs and key points, markdown-formatted responses.
  • Sentiment analysis.
  • Accessible image descriptions and uploading local images’ bytes as Base64-encoded characters in “data:” URLs.
  • Language detection and translation.
  • Named Entity Recognition (NER) and structured JSON responses.

Q&A and Break: 5 Minutes

Segment 4: Speech Recognition and Synthesis

  • Speech-to-text (STT) for speech recognition with the Audio API transcription endpoint.
  • Transcription quality and Word Error Rates (WER)
  • Text-to-speech (speech synthesis) in multiple languages with the Audio API speech endpoint.
  • OpenAI voices and stylistic controls.

Segment 5: Image Generation

  • Create original images with the latest image-generation model.
  • Image resolution and quality settings.
  • Decoding Base64-encoded image data.
  • Generating images in various artistic styles.
  • Understanding C2PA (Coalition for Content Provenance and Authenticity) metadata and verifying image authenticity and edit history.
  • Styling an image via the Images API edit endpoint and a text prompt.
  • Image-to-image style transfer via the Responses API.

Q&A and Break: 5 Minutes

Segment 6: Creating Video Closed Captions

  • Extracting audio tracks from video files.
  • Transcribing audio with timestamps in WebVTT format for closed captions.
  • Playing videos with closed captions in the free VLC Media Player.

Segment 7: Content Moderation

  • Detecting offensive or harmful content in text and images.
  • Understanding moderation categories and confidence scores.

Q&A and Break: 5 Minutes

Segment 8: Code Generation with OpenAI Codex

  • Introduction to OpenAI Codex.
  • Generating Python code from natural language descriptions using the Responses API and the latest Codex models.
  • Adding type hints, comments and docstrings to existing code.
  • Explaining code.
  • Translating code between programming languages.
  • Generating unit tests.

Segment 9: Building AI Agents with the OpenAI Agents SDK

  • Building a single-agent system with goals, instructions and a reasoning model.
  • Specifying tools agent use.
  • Working with OpenAI’s built-in tools (Web Search, File Search, Code Interpreter, Image Generation).
  • Designating functions as custom tools that agents can call.
  • Building a multi-agent system.
  • Handling agent errors and retries.
  • Monitoring agent execution and decision-making.
  • Overview of third-party custom tools.

Final Q&A

Your Instructor

  • Paul J. Deitel

    Paul J. Deitel, CEO and Chief Technical Officer of Deitel & Associates, Inc., is a graduate of MIT with over 44 years of experience in computing. He holds the Java Certified Programmer and Java Certified Developer designations and is an Oracle Java Champion. He is one of the world’s most experienced programming-languages trainers, having taught professional courses to software developers since 1992. His video courses on platforms like O’Reilly Online Learning have garnered millions of views, with his Java Fundamentals LiveLessons, Python Fundamentals LiveLessons and C# Fundamentals LiveLessons each ranking #1 at various times among thousands of video products. He has delivered hundreds of programming courses to academic, industry, government and military clients of Deitel & Associates, Inc. internationally, including UCLA, SLB (formerly Schlumberger), IBM, Siemens, Sun Microsystems (now Oracle), Dell, Fidelity, NASA at the Kennedy Space Center, the National Severe Storm Laboratory, White Sands Missile Range, Rogue Wave Software, Boeing, Cisco, Puma, iRobot and many more. He and his co-author, Dr. Harvey M. Deitel, are among the world’s best-selling programming-language textbook/professional book/video/interactive multimedia authors.

    linkedinXlinksearch

Skills covered

  • Python
  • OpenAI