TollNode

Grok Imagine Image 2 API and MCP for AI agents

TollNode gives Claude, Cursor or any AI agent Grok Imagine Image 2, xAI's image model for bold, detailed images at 1K or 2K, over API and MCP, from $0.082 per image, with no subscription.

Ask for 'A retro 1970s travel poster that reads VISIT MARS, a sleek...' and get a finished image link back in seconds.

No subscription · Sign-up optional · From $0.082 per call · Charged only when it works · No xAI account needed

Claude Code

Make this image: A retro 1970s travel poster that reads VISIT MARS, a sleek rocket over red dunes...

TollNode · xAI · 2k$0.109 · 1 image

ResultDetail
File1 image link, does not expire
Resolution2k

Real result, shown below.

Works in Claude Code, Cursor, Codex, VS Code and any MCP agent.

Grok Imagine Image 2 examples

Made by this node in our own tests, from the request shown under each.

Grok Imagine Image 2 generation output: A retro 1970s travel poster that reads VISIT MARS, a sleek rocket over red dunes and two moons, grainy print texture, bold typography

“A retro 1970s travel poster that reads VISIT MARS, a sleek rocket over red dunes and two moons, grainy print texture, bold typography”

AI-generatedresolution: 2kaspect_ratio: 2:3

The request that made it

Send the same body to get this kind of result. Change the prompt or the options to get your own.

request body
{
  "prompt": "A retro 1970s travel poster that reads VISIT MARS, a sleek rocket over red dunes and two moons, grainy print texture, bold typography",
  "resolution": "2k",
  "aspect_ratio": "2:3"
}

What you control with Grok Imagine Image 2

Failed calls are never charged. Image and audio links returned by TollNode don't expire.

What people ask their AI to do with it

Use it as a Grok Imagine Image 2 MCP server in Claude, Cursor or Codex

Connect once. Then just ask.

Paste this into Claude Code, Cursor or Codex. It connects TollNode and gives your agent a small wallet. Add a few dollars of USDC and you're done.

terminal
npx agentcash add https://tollnode.com

Copy for your AI agent

Paste this into your agent so it knows what this node does and how to call it.

prompt
You can use TollNode's Grok Imagine Image 2 node to make an image. Call POST https://tollnode.com/api/v1/nodes/grok-imagine-image-2 with prompt (required), resolution (optional), aspect_ratio (optional). The price depends on resolution (1k, 2k; default 2k) and is charged only when a result is returned. Over MCP, call the "grok-imagine-image-2" tool; use list_models to see prices. Give me the file link when it is done.

Price

from $0.082

per image

The price depends on the resolution you choose. If you don't choose, you get 2k.

1k$0.082 per image
2kdefault$0.109 per image

Charged only when a call returns a result. Failed or empty calls cost $0.

Grok Imagine Image 2 without a xAI account

FAQ

Is this the official xAI API?
No. TollNode is an independent service. It gives your agent access to Grok Imagine Image 2 through its own API and MCP server, priced per image, with no xAI account needed.
Can I use it as a Grok Imagine Image 2 MCP server in Claude?
Yes. Add https://tollnode.com/mcp in Claude Code, Claude Desktop or Cursor, and the "grok-imagine-image-2" tool appears with its options and prices.
What options can I choose?
The resolution can be 1k or 2k; the default is 2k. The price follows the option you pick, shown in the price table above.
What if nothing comes back?
You're not charged. TollNode only collects payment when a usable result is returned.
How long are the links valid?
They don't expire. Download the file or keep the link.
How do I pay for Grok Imagine Image 2?
Your agent sends the request, gets an HTTP 402 with the exact price (from $0.082 per call), signs a USDC payment on Base and retries. Or use an account balance with an API key. Either way you are charged only when a result comes back.
What does the Grok Imagine Image 2 response look like?
A JSON object with a link to the finished file. The link does not expire, so you can download it later or keep the link.

Ready in a minute

Connect your AI
For developers: endpoint, inputs and an example response

POST https://tollnode.com/api/v1/nodes/grok-imagine-image-2

Input

FieldTypeNotes
prompt*stringWhat to create or change
resolutionenumOutput resolution; sets the price. Default 2k (1k, 2k)
aspect_ratioenumAspect ratio, default 1:1 (1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 2:1, 1:2)

Example response

{
  "images": [
    "https://tollnode.com/api/v1/files/00000000-0000-0000-0000-000000000000/0"
  ]
}

Also described in the OpenAPI file and llms.txt. Setup for every app: Agents & MCP.