[Providers](https://spiral.ai/providers) › [xAI](https://spiral.ai/providers/xai)

# How to Use xAI Grok Imagine in Any AI Agent

To use xAI Grok Imagine in Grok, connect Spiral to Grok once, then ask for what you want in plain words. Grok can then reach all 3 xAI Grok Imagine tools on Spiral, priced per run from one balance.

## xAI tools and prices

- [Grok Imagine Video 1.5 · Video Generation](https://spiral.ai/tools/xai/grok-imagine-video-1.5) (xAI): $0.104 per second at 480p ($0.182 at 720p, $0.325 at 1080p). Input image: $0.013. Each reference image: $0.013.
- [Grok Imagine Image 2.0 · Text to Image](https://spiral.ai/tools/xai/grok-imagine-image-2.0) (xAI): $0.052 per image at 1K ($0.065 at 1.5K, $0.078 at 2K); medium quality $0.078 at 1K ($0.091 at 1.5K, $0.104 at 2K).

## Use xAI in your AI agent

- [xAI in Amp](https://spiral.ai/integrations/amp/xai)
- [xAI in ChatGPT](https://spiral.ai/integrations/chatgpt/xai)
- [xAI in Claude](https://spiral.ai/integrations/claude-desktop/xai)
- [xAI in Claude Code](https://spiral.ai/integrations/claude-code/xai)
- [xAI in Cline](https://spiral.ai/integrations/cline/xai)
- [xAI in Codex](https://spiral.ai/integrations/codex/xai)
- [xAI in Cursor](https://spiral.ai/integrations/cursor/xai)
- [xAI in Devin](https://spiral.ai/integrations/devin/xai)
- [xAI in dots](https://spiral.ai/integrations/dots/xai)
- [xAI in Factory Droid](https://spiral.ai/integrations/factory-droid/xai)
- [xAI in Gemini](https://spiral.ai/integrations/gemini/xai)
- [xAI in Gemini CLI](https://spiral.ai/integrations/gemini-cli/xai)
- [xAI in Google Antigravity](https://spiral.ai/integrations/antigravity/xai)
- [xAI in goose](https://spiral.ai/integrations/goose/xai)
- [xAI in Grok](https://spiral.ai/integrations/grok/xai)
- [xAI in Grok Build](https://spiral.ai/integrations/grok-build/xai)
- [xAI in Hermes](https://spiral.ai/integrations/hermes/xai)
- [xAI in Instinct](https://spiral.ai/integrations/instinct/xai)
- [xAI in Manus](https://spiral.ai/integrations/manus/xai)
- [xAI in Muse](https://spiral.ai/integrations/muse/xai)
- [xAI in Muse Code](https://spiral.ai/integrations/muse-code/xai)
- [xAI in n8n](https://spiral.ai/integrations/n8n/xai)
- [xAI in Notion](https://spiral.ai/integrations/notion/xai)
- [xAI in OpenClaw](https://spiral.ai/integrations/openclaw/xai)
- [xAI in opencode](https://spiral.ai/integrations/opencode/xai)
- [xAI in Perplexity](https://spiral.ai/integrations/perplexity/xai)
- [xAI in Raycast](https://spiral.ai/integrations/raycast/xai)
- [xAI in VS Code](https://spiral.ai/integrations/vscode/xai)
- [xAI in Windsurf](https://spiral.ai/integrations/windsurf/xai)
- [xAI in Zapier](https://spiral.ai/integrations/zapier/xai)
- [xAI in Your Own AI Agent](https://spiral.ai/docs/quickstarts/your-own-agent)

## What can you do with xAI in an AI agent?

### Ads and social clips

Short vertical or square clips from a written brief.

### B-roll

Fill gaps in an edit with generated shots that match the scene.

### Storyboards that move

Turn a script's scenes into rough cuts to review.

### Product teasers

Short launch clips without a shoot.

### Explainer scenes

Visualize a concept in a few seconds of video.

### Concept testing

Try several directions before paying for production.

## Related

- [Vizard](https://spiral.ai/providers/vizard)
- [OpenRouter](https://spiral.ai/providers/openrouter)
- [OpenAI](https://spiral.ai/providers/openai)
- [Replicate](https://spiral.ai/providers/replicate)
- [Mistral](https://spiral.ai/providers/mistral)
- [WaveSpeed AI](https://spiral.ai/providers/wavespeed)

## Common questions

**Which AI agents can use xAI Grok Imagine?**

Any agent Spiral connects to: Claude, ChatGPT, Gemini, Grok and Perplexity, coding agents such as Cursor, Claude Code and Codex, and workflow tools such as Zapier and n8n. Each agent's guide below shows its setup.

**How much does xAI Grok Imagine cost through Spiral?**

Each xAI Grok Imagine tool is priced per run, shown before it starts, and paid from one Spiral balance. Each run is charged for its measured usage.

**Do I need a xAI Grok Imagine account to use it in an AI agent?**

No. Spiral runs xAI Grok Imagine on its own account and charges your Spiral balance, so your agent needs no xAI Grok Imagine key.

**How do I set up xAI Grok Imagine in my agent?**

Connect Spiral to your agent once (a skill, an MCP server, the CLI or the API), then ask for a xAI Grok Imagine tool by name. Each agent's guide on this page has its exact steps.

**Can my agent compare xAI Grok Imagine tools?**

Yes. Ask it to run the same request on two xAI Grok Imagine tools and show both results with what each cost.

**What happens if a run fails in your agent?**

It is not charged. Spiral holds a run's estimated price when it starts and returns it to your balance if the run fails on Spiral's side or the provider's, and your agent gets the error to retry or try another tool.

**Is there a subscription or plan?**

No. Spiral is pay as you go from one prepaid balance, with no plans or minimums, and credits never expire. Auto top-up and balance alerts keep runs from stopping when the balance runs low.

**How is a run priced?**

When a run starts, its estimate is held from your balance; when it finishes, you are charged for the measured usage and the rest of the hold is released. Each tool shows its price before a run.

