The OpenAI API SDK is a Python client library for sending programmatic requests to OpenAI models and retrieving responses. Install it with pip, then load OPENAI_API_KEY from an environment file rather than storing credentials in source code.
A minimal integration assigns the API key, calls chat.completions.create with a model and user message, and returns the generated text. The same client can support automated RAG evaluation by comparing expected and generated answers.


