Mindket
AdvancedFree

OpenAI API course: Responses, tools, structured output and agents

A black banner titled "OpenAI API" over the line "Responses, tools, structured output and agents".

This OpenAI API course takes a developer from a first Responses API call to a working agent in four lessons. You stream a reply and keep a conversation, let the model call your functions, get JSON that matches your schema and build an agent with the Agents SDK. Every step follows OpenAI's documentation as it stood on 5 November 2026.

What you'll be able to do

  • Make a Responses API call in Python or JavaScript, stream it and carry state across turns.
  • Describe functions in JSON Schema, run the tool-call loop and add web search or file search.
  • Get replies that match your schema with Pydantic or Zod, and handle refusals.
  • Build an Agents SDK app with tools, handoffs, guardrails, sessions and tracing.
All courses

Who it's for

For developers who write Python or JavaScript and want to build on the OpenAI API. You need an OpenAI platform account with an API key, Python 3.10 or later or Node.js 22 or later, and a terminal. The lessons assume you have read the Claude API course.

Lessons

  1. 1OpenAI API tutorial: the Responses API in Python and JavaScriptAn OpenAI API tutorial for developers: get a key, install the SDK, call the Responses API in Python and JavaScript, stream it and keep conversation state.12 min
  2. 2OpenAI function calling: let the model call your codeOpenAI function calling step by step: describe a function in JSON Schema, turn on strict mode, run the tool-call loop and add web search or file search.12 min
  3. 3OpenAI Structured Outputs: JSON that matches your schemaOpenAI Structured Outputs in the Responses API: pass a JSON Schema in text.format, parse replies with Pydantic or Zod, and handle refusals and schema limits.12 min
  4. 4OpenAI Agents SDK: build your first agent in PythonAn OpenAI Agents SDK tutorial: define an Agent, run it with Runner, add function tools, hand off to specialists, add guardrails, keep sessions and read traces.12 min

Frequently asked questions

What do I need to follow the OpenAI API course?

An OpenAI platform account, an API key with billing set up, and Python 3.10 or later. The JavaScript samples need Node.js 22 or later. Usage is billed by tokens, so expect a small bill while you test.

Does the course use Chat Completions?

No. Every lesson uses the Responses API, which OpenAI recommends for new projects. Lesson 1 maps the Chat Completions fields you may know onto it, so older code ports over.

How is this different from the Claude API course?

The tasks match, and the API shapes differ. Each lesson points out where OpenAI works another way, such as the server-side conversation state in lesson 1, and skips what the Claude course already explains.

Which model ids do the lessons use?

The ids on the models page on 5 November 2026, mainly gpt-6-astra. Ids change, so each lesson dates them and tells you where to copy the current ones.

What should I learn after this course?

The RAG course is next. It shows how to give a model your own documents to search, which goes deeper than the file search tool in lesson 2.

Share this course

See finished AI agents

Browse agents built by other developers on Mindket, with their setup notes, then list one of your own.

Browse AI agents

All courses · All articles