Title: Error 400
Last modified: August 17, 2026

---

# Error 400

 *  Resolved [meinstein19871](https://wordpress.org/support/users/meinstein19871/)
 * (@meinstein19871)
 * [3 days, 20 hours ago](https://wordpress.org/support/topic/error-400-22/)
 * Hi,
 * I’m trying to use the **xAI Grok** provider in AI Blog Automator and I’m consistently
   getting this error:
 * **AI API call failed: API request failed with status code: 400** Current Configuration:
    - **AI Provider:** xAI Grok (Grok models via xAI API)
    - **Model selected:** Grok 2 latest
    - **API Key:** Valid key generated from console.x.ai
 * What’s happening:
 * When the plugin tries to generate a post, the API request fails with a **400 
   Bad Request**. Root Cause:
 * The model name **“Grok 2 latest”** is no longer valid on the xAI API.
 * Current valid model IDs on the xAI API (as of August 2026) are:
    - grok-4.6
    - grok-4.5
    - grok-4.3
    - grok-4.20
    - grok-build-0.1
 * Using an outdated model name causes xAI to reject the request with a 400 error.
   Additional Notes:
    - The xAI API base URL is [https://api.x.ai/v1](https://api.x.ai/v1)
    - xAI is largely OpenAI-compatible, but some parameters and model naming conventions
      differ slightly from OpenAI.
    - It appears the plugin’s current xAI integration may still be using older model
      names or an incomplete mapping.
 * Suggested Fix:
    1. Update the model list for the xAI provider to include the current models (especially
       grok-4.6 and grok-4.5).
    2. Allow users to manually enter a custom model ID.
    3. Ensure the request is sent in the correct format expected by the xAI API.
 * Please let me know if you need any additional details (screenshots, exact request
   logs, etc.).
 * Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-400-22%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [bluteem](https://wordpress.org/support/users/bluteem/)
 * (@bluteem)
 * [3 days, 11 hours ago](https://wordpress.org/support/topic/error-400-22/#post-18995382)
 * Thanks for the detailed report — you were correct.
   Older xAI model IDs were still
   present in our model list, which caused `400 Bad Request` responses when using
   Grok via xAI. Therefore, we’ve now updated the plugin to current xAI models (`
   grok-4.6`, `grok-4.5`, `grok-4.3`, `grok-4.20`, `grok-build-0.1`), added migration
   from deprecated Grok-2 IDs, and added a custom model ID override field so you
   can enter any valid xAI model manually.Endpoint remains `https://api.x.ai/v1/
   chat/completions`.Please update to the next Pro release and retry generation.

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-400-22%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/ai-blog-automator/assets/icon-256x256.png?rev=3435901)
 * [AI Blog Automator](https://wordpress.org/plugins/ai-blog-automator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-blog-automator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-blog-automator/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-blog-automator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-blog-automator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-blog-automator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [bluteem](https://wordpress.org/support/users/bluteem/)
 * Last activity: [3 days, 11 hours ago](https://wordpress.org/support/topic/error-400-22/#post-18995382)
 * Status: resolved