AI Provider for Grok
This plugin provides Grok (by xAI) integration for the WP AI Client SDK. It enables WordPress sites to use Grok models for text generation and related AI capabilities. Features: Text generation with Grok models Function calling support Vision input support (for compatible models) Automatic provider registration Available models are dynamically discovered from the Grok API. Requirements: PHP 7.4 or higher WP AI Client plugin must be installed and activated Grok API key from xAI Purchased API tokens from x.ai — a valid token balance is required for API requests to work Usage The provider automatically registers itself on the init hook. Once both plugins are active and your API key is configured, you can start generating text: Basic Text Generation $text = AI_Client::prompt( 'Explain quantum computing.' )->using_provider( 'grok' )->generate_text(); With System Instructions $text = AI_Client::prompt( 'Summarize the history of WordPress.' )->using_provider( 'grok' )->using_system_instruction( 'Be concise and accurate.' )->using_temperature( 0.2 )->using_max_tokens( 500 )->generate_text(); Vision (Image Input) $text = AI_Client::prompt( 'Describe this image.' )->using_provider( 'grok' )->with_file( 'https://example.com/photo.jpg', 'image/jpeg' )->generate_text(); Requires a Grok model with vision capabilities. JSON Output $json = AI_Client::prompt( 'Analyze this topic: WordPress plugins' )->using_provider( 'grok' )->as_json_response( $schema )->generate_text(); For full usage examples including chat history, function calling, and feature detection, see the README on GitHub. External services This plugin connects to the xAI Grok API to provide AI-powered text generation capabilities within WordPress. The xAI Grok API is a third-party service operated by xAI Corp. What data is sent and when API key: Your xAI API key is sent with every request for authentication. Model listing: When the plugin checks provider availability or lists available models, it sends a request to the xAI API to retrieve the current list of Grok models. Text generation prompts: When your site uses the plugin to generate text, the prompt text (and any attached images or files, system instructions, and conversation history) is sent to the xAI API for processing. All communication is sent to: https://api.x.ai/v1 Data is only sent when the plugin is actively used to generate text or when checking model availability. No data is sent passively or in the background. Service links xAI website: https://x.ai xAI API documentation: https://docs.x.ai/developers/models xAI Terms of Service: https://x.ai/legal/terms-of-service xAI Privacy Policy: https://x.ai/legal/privacy-policy Contributing We welcome contributions! You can help by: Reporting bugs or suggesting features via GitHub Issues Submitting pull requests on GitHub Please read our Contributing Guide before submitting a pull request.
Top keywords
- text16×3.46%
- ai13×2.81%
- api13×2.81%
- xai12×2.60%
- grok9×1.95%
- models7×1.52%
- provider7×1.52%
- ai client6×1.30%
- client6×1.30%
- generate6×1.30%
- generate text6×1.30%
- sent6×1.30%
Plug ChatBot
Plug ChatBot helps WordPress businesses answer common customer questions, guide visitors to the right service, and collect useful follow-up details when the team is unavailable. The administrator can connect OpenAI, Grok, or both, then choose which service prepares live customer replies. Business files are managed separately for each provider so information is sent only to the selected document library. Current capabilities include: OpenAI and xAI Grok customer chat integrations Business-friendly dashboard and guided setup experience Provider-specific business knowledge files Custom AI identity, welcome message, conversation shortcuts, and business guidelines Optional visitor name and email capture with an optional phone number Optional conversation history stored in WordPress Team email copies of completed conversations Optional OpenAI voice replies with an AI-generated voice disclosure OpenAI-only extra content safety when OpenAI is the active provider Live widget design preview Brand colour, widget position, reply length, and usage protection controls External services This plugin connects to external AI services only when the corresponding integration or feature is configured and used. OpenAI OpenAI may receive: Visitor chat messages and configured business instructions when OpenAI is the active provider Optional visitor contact details included in conversation context Business files uploaded under the OpenAI Business Knowledge view Optional content-safety requests when OpenAI is active Optional text sent for voice generation when OpenAI is active Service information: API documentation: https://platform.openai.com/docs/api-reference API pricing: https://openai.com/api/pricing/ Privacy policy: https://openai.com/policies/row-privacy-policy/ Terms of use: https://openai.com/policies/terms-of-use/ xAI xAI may receive: Visitor chat messages and configured business instructions when Grok is the active provider Optional visitor contact details included in conversation context Business files uploaded under the Grok Business Knowledge view Document-management requests when a xAI Management API Key is configured Service information: API documentation: https://docs.x.ai/ Console and API keys: https://console.x.ai/ Privacy policy: https://x.ai/legal/privacy-policy Terms of service: https://x.ai/legal/terms-of-service If local conversation history is enabled, the plugin may store visitor email addresses, chat transcripts, and IP addresses in the WordPress database. A short-lived, HTTP-only browser cookie and WordPress transients maintain chatbot state for logged-out visitors. The plugin does not start PHP sessions on frontend page loads. Features Select OpenAI or Grok as the active customer chat service Configure separate authenticated-encrypted API keys and refresh available provider models from the connected account Keep OpenAI-only voice and extra content safety hidden and inactive while Grok is selected Upload, use, stop using, list, and delete business files without exposing storage IDs Enable uploaded-file answers and file analysis separately for each provider Preview the real Plug ChatBot widget style, AI name, welcome message, brand colour, voice status, and widget position before saving Review human-readable completed conversations Configure one or more team email recipients Preserve existing settings during the 2.1.0 upgrade Use capability checks and nonces for administrator settings and AJAX actions