This integration allows you to leverage Grok AI, X's powerful large language model, within your Mazaal AI workflows. Connect to Grok's advanced AI capabilities for text generation, image analysis, and image creation.
- Ask Grok: Send text prompts to Grok AI for natural language responses
- Vision Prompt: Send images to Grok for visual analysis and description
- Generate Image: Create images based on text prompts
- Custom API Call: Make custom API calls to the Grok API for advanced use cases
To use this integration, you'll need a Grok API key:
- Visit X's developer portal and log in to your account
- Navigate to your account settings or developer dashboard
- Look for the API section and generate a new API key
- Copy and securely store your API key
- Enter this API key when configuring the Grok connection in Mazaal AI
Grok offers different models with various capabilities:
- Text Models: Core language models for text generation (e.g., grok-3-beta, grok-3-mini-beta)
- Vision Models: Models that can process and analyze images (e.g., grok-vision-beta, grok-2-vision-1212)
- Image Generation Models: Models that can create images from text prompts (e.g., grok-2-image-1212)
The "Ask Grok" action sends text prompts to Grok AI and receives natural language responses:
{
"model": "grok-3-beta",
"prompt": "Explain quantum computing in simple terms",
"temperature": 0.7,
"maxTokens": 1024
}
Perfect for:
- Question answering
- Content generation
- Code explanation
- Problem solving
The "Vision Prompt" action sends images to Grok for analysis:
{
"model": "grok-vision-beta",
"prompt": "What can you tell me about this image?",
"image": "{{steps.image_url.output}}"
}
Use cases:
- Image captioning
- Object identification
- Scene description
- Visual question answering
The "Generate Image" action creates images based on text descriptions:
{
"model": "grok-2-image-1212",
"prompt": "A futuristic city with flying cars under a purple sky",
"responseFormat": "url"
}
Applications:
- Creative content generation
- Visual concept exploration
- Design inspiration
- Marketing assets
For advanced users who need direct access to the Grok API:
{
"url": "/chat/completions",
"method": "POST",
"body": {
"model": "grok-3-beta",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, who are you?"}
]
}
}
- Be Specific: Detailed prompts yield better results
- Set the Right Temperature: Lower values (0.1-0.3) for factual responses, higher values (0.7-0.9) for creative outputs
- Use System Messages: Guide the model's behavior with appropriate system messages
- Consider Token Limits: Keep requests within token limits to avoid truncated responses
- Authentication Errors: Verify your API key is valid and correctly entered
- Model Unavailability: Ensure the selected model exists and is available in your region
- Rate Limiting: If you encounter rate limits, implement appropriate backoff strategies
- Unexpected Outputs: Try refining your prompt or adjusting parameters for better results
For support questions, feature requests, or bug reports, please contact support@mazaal.ai