You can use the chat completion endpoint with OpenAI SDK under two lines of code change.

You can pass any of the OpenAI parameters directly in the client.chat.completions.create method.

To use Keywords AI parameters, you can pass them in the extra_body parameter. In the above example, customer_identifier is the Keywords AI parameter. These parameters will take precedence over the OpenAI parameters if they are conflicting.