Sample usage for OpenAI APIs
The responses_api_examples.py script shows how to:
- send a basic prompt using the
responsesendpoint - retrieve a response by ID to demonstrate stateful behavior
- continue a conversation by referencing
previous_response_id - call the built-in
web_searchtool
Run the script after setting OPENAI_API_KEY in your environment.