xAI
xaixAI's 3 models on ModelRunner span Image-to-Image, Image-to-Video and Text-to-Image, from $0.02 per image upward.
3 public models — every one runnable in a free playground, through the REST API and JavaScript SDK, or from an AI assistant over MCP.
xAI models & pricing

Grok Imagine Image Edit
xai
Edit one to three reference images with a text instruction, preserving the original composition and returning the modified image.

Grok Imagine Image
xai
Generate high-quality images from a text prompt, with aspect-ratio control and a standard or high-resolution (2k) output.

Grok Imagine 1.5 Image to Video
xai
Turn a still image into a short video clip guided by a motion prompt, with synchronized audio generated automatically and included free.
What you can build with xAI models
- Edit a photo from a text instruction Grok Imagine Image Edit
- Add, remove, or replace an object in an image Grok Imagine Image Edit
- Restyle or re-light an existing image while keeping its composition Grok Imagine Image Edit
- Change the background or colors of a product photo Grok Imagine Image Edit
- Generate several edit variations of one source image at once Grok Imagine Image Edit
- Generate an image from a text description Grok Imagine Image
- Create photorealistic scenes and portraits from a prompt Grok Imagine Image
- Produce digital illustration or concept art from words Grok Imagine Image
Browse by capability
Call a xAI model in one request
Every endpoint shares the same lifecycle: submit to the queue, poll the status URL, fetch the result. Swap the endpoint to switch models — nothing else changes.
cURL
curl -X POST https://queue.modelrunner.run/xai/grok-imagine/image/edit \
-H "Authorization: Key $MRUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "..." }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }Use xAI models from Claude & Cursor
Connect the ModelRunner MCP server once and your AI assistant can run every xAI model on this page as a tool — authorized via OAuth, results returned as hosted URLs in the conversation.
Claude Code
claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcpFrequently asked questions
What xAI models can I run on ModelRunner?
The catalog has 3 public xAI models: Grok Imagine Image Edit, Grok Imagine Image and Grok Imagine 1.5 Image to Video. They cover image-to-image, image-to-video and text-to-image. Each one has its own page with a free playground, the full input schema, and copy-paste code.
How much do xAI models cost?
Pay-per-use, with no subscription: the 2 xAI models billed per image start at $0.02, and every page publishes its own rate — some are tiered, so a lower resolution or a shorter clip costs less per run. You buy credits and pay only for what you generate.
How do I call a xAI model from the API?
POST to https://queue.modelrunner.run/xai/grok-imagine/image/edit with an Authorization: Key header and the input fields as the top-level JSON body (no wrapper object), then poll the returned status_url and fetch the result from response_url. The JavaScript SDK (@modelrunner/client) wraps that in a single subscribe() call, which is the one place an { input } object is used.
Can I run xAI models from Claude or Cursor?
Yes. Connect the ModelRunner MCP server (https://mcp.modelrunner.run/mcp) once and all 3 xAI models become tools your assistant can call with run_model — authorized over OAuth 2.1, so no API key goes into a config file. Results come back as hosted URLs in the conversation.
More on ModelRunner
Browse the full model catalog, compare live per-configuration rates on the pricing page, see curated sets on explore, or view every model creator.
