Skip to main content
OpenAIResponses is a class for interacting with OpenAI models using the Responses API. This class provides a streamlined interface for working with OpenAI’s newer Responses API, which is distinct from the traditional Chat API. It supports advanced features like tool use, file processing, and knowledge retrieval.

Authentication

Set your OPENAI_API_KEY environment variable. You can get one from OpenAI here.

Example

Use OpenAIResponses with your Agent:
View more examples here.

Parameters

For more information, please refer to the OpenAI Responses docs as well. OpenAIResponses is a subclass of the Model class and has access to the same params.