Quickstart with OpenAI::Client
mainFor a quick test, you can instantiate a new client by passing your access_token directly. It is highly recommended to set log_errors: true during development to see the specific error responses returned by OpenAI, though this should be disabled in production to prevent leaking private data into logs.
client = OpenAI::Client.new(
access_token: "access_token_goes_here",
log_errors: true
)