Vibe Coder · Unit 10: APIs · Lesson 11 of 13

The Responses API

Engineers: OpenAI’s current API for model calls, how it maps to what you know, and where it differs.

Read the short notes and pictures.Do everything inside a blue frame.

The other major API

OpenAI’s Responses API covers the same ground as the Messages API with different names and a few different defaults. Implementing your feature against both, behind one interface, keeps your product portable.

A 3D scene of coloured blocks and cards. It maps across: instructions, input, tools, structure.
Instructions, input, tools and structure.

Mapping the concepts

System prompt

Instructions.

Messages

Input items.

Tool use

Function calling, plus hosted tools.

Structured output

A JSON schema response format.

A 3D scene of coloured blocks and cards. : You keep state, It keeps state.
State can be kept by you or by the API.

One interface, two providers

  1. Define your own function

    Inputs and outputs in your terms.

  2. Write an adapter per provider

    Small and tested.

  3. Run the same evaluation

    Same inputs, compare outputs.

  4. Choose by task

    And keep the switch.

ActivityBuild stepOne AI feature

Add a second provider

Implement your feature against the Responses API behind the same interface, with the same schema and tests. Run your inputs through both and record quality, latency and cost.

Done when

A provider switch is now a configuration change.

Keep these

  • The Responses API covers the same concepts.
  • It can hold state and offers hosted tools.
  • Hide providers behind your own interface.