Error 400
-
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
- 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:
- Update the model list for the xAI provider to include the current models (especially grok-4.6 and grok-4.5).
- Allow users to manually enter a custom model ID.
- 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 to see the link]
You must be logged in to reply to this topic.