generate_image
Generate AI images from text descriptions using Grok's image models. Create custom visuals by providing detailed prompts and specify quantity and output format.
Instructions
Creates AI-generated images using Grok's image generation models.
Just describe what you want to see, and this tool will generate it. You can
create multiple variations at once by adjusting the 'n' parameter. The model
might revise your prompt to get better results - you'll see that in the response.
Args:
prompt: What you want the image to show (be descriptive!)
n: How many images to generate (default is 1)
response_format: Either "url" for image links or "b64_json" for base64 data
model: Which image model to use (default is grok-2-image-1212)
Returns a dict with the generated images and any revised prompt used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-2-image-1212 | |
| n | No | ||
| prompt | Yes | ||
| response_format | No | url |
Input Schema (JSON Schema)
{
"properties": {
"model": {
"default": "grok-2-image-1212",
"title": "Model",
"type": "string"
},
"n": {
"default": 1,
"title": "N",
"type": "integer"
},
"prompt": {
"title": "Prompt",
"type": "string"
},
"response_format": {
"default": "url",
"title": "Response Format",
"type": "string"
}
},
"required": [
"prompt"
],
"type": "object"
}