{"id":49,"date":"2026-10-17T14:15:43","date_gmt":"2026-10-17T14:15:43","guid":{"rendered":"http:\/\/plugin-docs.com\/?post_type=doc&#038;p=49"},"modified":"2026-10-17T18:26:19","modified_gmt":"2026-10-17T18:26:19","slug":"connect-openai","status":"publish","type":"doc","link":"https:\/\/dragwyb.com\/docs\/connect-openai\/","title":{"rendered":"Connect OpenAI"},"content":{"rendered":"<p>Dragwyb Click to Chat supports OpenAI as an AI Assistant provider. To connect it, add an OpenAI API key in the provider settings, choose an available model, and set OpenAI as the active provider. The actual models available to select can depend on the provider integration, account access, and current API availability.<\/p>\n\n\n\n<h2>Create or locate an OpenAI API key<\/h2>\n<ol>\n<li>Open <a href=\"https:\/\/platform.openai.com\/settings\/organization\/api-keys\" target=\"_blank\" rel=\"noopener noreferrer\">OpenAI API keys<\/a> and sign in to the intended OpenAI account.<\/li>\n<li>Create or select an API key according to OpenAI&#8217;s current account instructions.<\/li>\n<li>Keep the key private. Do not include it in a system prompt, public support request, documentation page, or screenshot.<\/li>\n<\/ol>\n\n<h2>Connect OpenAI in WordPress<\/h2>\n<ol>\n<li>In WordPress admin, open <strong>Click to Chat \u2192 AI Assistant<\/strong>.<\/li>\n<li>Select <strong>AI Engine &amp; Prompt<\/strong> and locate <strong>AI Providers &amp; API Keys<\/strong>.<\/li>\n<li>Find the <strong>OpenAI<\/strong> provider card and enter the key in the <strong>API Key<\/strong> field.<\/li>\n<li>Use the screen&#8217;s save action to store the provider credential. The plugin&#8217;s provider settings endpoint requires the WordPress <code>manage_options<\/code> capability.<\/li>\n<li>Once connected, choose a model from <strong>Active Model<\/strong> if the selector is shown.<\/li>\n<li>Set OpenAI as the active provider using the provider card&#8217;s active toggle and save the AI Engine settings.<\/li>\n<\/ol>\n<p>In version 1.2.0, the default configured OpenAI model is <code>gpt-4o-mini<\/code>. This is a default value, not a guarantee that the model is available to every OpenAI account or will remain unchanged after model updates.<\/p>\n\n<h2>Test the connection<\/h2>\n<ol>\n<li>Open <strong>Chat Preview<\/strong> in the AI Assistant screen or a controlled page where the chatbot is enabled.<\/li>\n<li>Ask a simple, non-sensitive question.<\/li>\n<li>Confirm that the assistant returns a response and that the configured provider\/model is the one you intended to use.<\/li>\n<li>If the request fails, check the API key, account access, available model list, and OpenAI account\/project restrictions.<\/li>\n<li>Review the plugin&#8217;s <strong>Error Logs<\/strong> for recorded request errors. Also check the OpenAI account&#8217;s usage and billing dashboard for provider-side issues.<\/li>\n<\/ol>\n<p>A saved key alone does not prove that the API connection is working. Do not assume the plugin&#8217;s request counters show the amount billed by OpenAI.<\/p>\n\n<h2>Related configuration<\/h2>\n<p>For Google&#8217;s provider setup, see <a href=\"https:\/\/dragwyb.com\/docs\/docs\/dragwyb-click-to-chat\/connect-google-gemini\/\">Connect Google Gemini<\/a>. To configure the system prompt, response parameters, and usage controls, read <a href=\"https:\/\/dragwyb.com\/docs\/docs\/dragwyb-click-to-chat\/ai-assistant\/\">AI Assistant and Response Behavior<\/a>.<\/p>\n<p>This guide is based on the inspected version 1.2.0 source. No live OpenAI API request was performed as part of this documentation update.<\/p>","protected":false},"excerpt":{"rendered":"<p>Connect OpenAI to Dragwyb Click to Chat with an API key, select an available model, and troubleshoot assistant responses.<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":48,"menu_order":0,"template":"","class_list":["post-49","doc","type-doc","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/types\/doc"}],"version-history":[{"count":1,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/49\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/49\/revisions\/396"}],"up":[{"embeddable":true,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/48"}],"wp:attachment":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/media?parent=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}