Skip to main content
Glama

generate_image

Create AI-generated images from text descriptions using Grok's models. Generate multiple variations and receive images as URLs or base64 data.

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

NameRequiredDescriptionDefault
promptYes
nNo
response_formatNourl
modelNogrok-2-image-1212

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" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/merterbak/Grok-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server