Skip to main content
Glama

generate_image

Create images from text descriptions using xAI's Grok Imagine model. Specify prompts, quantity, aspect ratios, and output formats to generate visual content.

Instructions

Generate images from text descriptions using xAI's Grok Imagine model. Returns image URLs or base64 data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesText description of the image to generate
nNoNumber of images to generate (1-10)
modelNoImage generation model (default: grok-2-image)grok-2-image
aspect_ratioNoAspect ratio (e.g., '16:9', '1:1', '4:3')
response_formatNoResponse format: 'url' or 'b64_json'url

Latest Blog Posts

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/joemccann/xai-mcp-server'

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