Spiral gives your agent every tool with one account. Browse the tools →

opencode · ImageReleased 2026-08-06

How to Use Grok Imagine Image 2.0 Text to Image in opencode

Grok Imagine Image 2.0 Text to Image turns written briefs into posters, product concepts, and illustrations with planned typography. Unlike Grok Imagine Image 2.0 Edit, it creates the starting image from text.

Prompts to try with Grok Imagine Image 2.0 Text to Image in opencode

Copy an example into opencode, or ask in your own words.

Read the homepage styles and use Grok Imagine Image 2.0 Text to Image to create a 16:9, 2K header illustration of a ceramic workshop. Put the workbench on the right and leave the left third clear for the heading.

Grok Imagine Image 2.0 Text to Imageopencode
Try asking
  • Read the game's art brief and use Grok Imagine Image 2.0 Text to Image to create a square concept of one brass compass on weathered wood. Show engraved markings and worn edges at 2K with medium quality.

  • Use Grok Imagine Image 2.0 Text to Image to make a portrait poster for our demo event. Set the exact title 'Build night' above 'October 12'; use large black lettering on white paper, 2K, and medium quality.

  • Generate a product photo with Grok Imagine Image 2.0 Text to Image: a matte black water bottle on wet slate, soft morning light, 1:1. Tell me the price first. Save the result in ./assets.

  • Make four logo concepts for a coffee brand called "Northline" with Grok Imagine Image 2.0 Text to Image.

How to set up Grok Imagine Image 2.0 Text to Image in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run Grok Imagine Image 2.0 Text to Image

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "fal",
        "model": "xai/grok-imagine-image/v2.0/text-to-image",
        "input": {
          "prompt": "Abstract human silhouette, golden particles ready to burst outward representing joy, data visualization style, emotional expression through particles, artistic…"
        }
      }'

Then paste one of the prompts above: opencode finds Grok Imagine Image 2.0 Text to Image on Spiral, shows the price and runs it.

Grok Imagine Image 2.0 Text to Image providers and prices

Spiral runs Grok Imagine Image 2.0 Text to Image through fal. Open a card for today's price, with every fee included.

falImage
Grok Imagine Image 2.0 · Text to Image
xai/grok-imagine-image/v2.0/text-to-image

Settings you can ask for

Grok Imagine Image 2.0 Text to Image works from your prompt. Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Number of images1 to 101

Number of images to generate.

Aspect ratio2:1, 20:9, 19.5:9, 16:9, 4:3, 3:2, 1:1, 2:3 and 8 more1:1

Aspect ratio of the generated image. Use auto to let the provider choose.

Resolution1k, 1.5k, or 2k1k

Resolution of the generated image: 1k, 1.5k, or 2k.

Output formatjpeg, png, or webpjpeg

The format of the generated image.

Image passthroughon or offoff

Send edit references and return provider images without resizing or re-encoding, preserving transparency and metadata. The returned native format may differ from output_format.

Qualitylow, medium, or automedium

Quality level of the generated image. auto lets xAI choose; it currently uses low for generation.

Every API field of Grok Imagine Image 2.0 · Text to Image is on its tool page: open its card above.

What can you do with Grok Imagine Image 2.0 Text to Image in opencode?

Create visual assets that match the project you are building with Grok Imagine Image 2.0. Turn design requirements into image briefs and review the results in the actual page layout.

Event poster concepts

Create a poster from a written brief or revise supplied artwork. Specify the event title, date, and text hierarchy, then proofread the lettering.

Packaging design exploration

Visualize a carton or label from text, or revise an existing packaging image. Describe the printing surface and provide the exact label copy.

Website header artwork

Generate a scene from a brief or rework supplied artwork for a website header. State where the subject sits and reserve a clear area for page copy.

Game art concepts

Develop a character, prop, or location from text, or restyle an existing concept. Specify one visual treatment and review each image for consistent details.

Editorial illustration drafts

Turn an article idea into a pencil drawing, painted scene, or photographic concept. Define one subject and the detail that connects it to the story.

Grok Imagine Image 2.0 Text to Image success rate and speed on Spiral

Success and speed over the last 24 hours, across every run of these tools on Spiral.

Success rate
96.7%
Fastest median run time
1m 30s
Runs, last 24 hours
30
ToolSuccessMedian timeRuns
Grok Imagine Image 2.0 · Text to Image96.7%1m 30s30

Questions about Grok Imagine Image 2.0 Text to Image in opencode

Can opencode use Grok Imagine Image 2.0 Text to Image?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Grok Imagine Image 2.0 Text to Image like any built-in tool.

How much does Grok Imagine Image 2.0 Text to Image cost in opencode?

$0.052 per image at 1K, low quality ($0.065 at 1.5K, $0.078 at 2K); other qualities $0.078 at 1K ($0.091 at 1.5K, $0.104 at 2K). You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need a fal account to use Grok Imagine Image 2.0 Text to Image in opencode?

No. Spiral runs Grok Imagine Image 2.0 Text to Image on its own fal account. You sign in to Spiral once and never paste a key.

How long does it take to set up Grok Imagine Image 2.0 Text to Image in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while Grok Imagine Image 2.0 Text to Image runs?

Grok Imagine Image 2.0 Text to Image runs in the background. opencode starts the run, checks on it and gives you the image when it's ready.

What is Grok Imagine Image 2.0 good at?

It is useful for visual work that combines pictures and lettering, such as posters and packaging concepts. The maker highlights typography, layout, and small text as strengths.

Can Grok Imagine Image 2.0 put words inside an image?

Yes. Supply the exact wording, then describe where it belongs and which line should be largest; proofread the result before using it.

How should I request fine detail?

Use medium quality and 2K output when small details need to be recognizable. Describe the details themselves, such as stitching or a brushed metal surface.

Is Grok Imagine Image 2.0 limited to realistic pictures?

No. It also supports illustrated treatments, including anime, oil painting, and pencil drawing.

What prompting habit should I avoid?

Avoid long lists of unwanted objects and effects. Describe the objects, materials, and composition you want to see instead.

Get started

Start using Grok Imagine Image 2.0 Text to Image in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options