Blog

Grok Imagine Prompt Guide: Images, Video and API (2026)

Unicorn API Team · · 12 min read

Diagram of a Grok Imagine prompt built from five parts turning into six image variations and a video frame

A Grok Imagine prompt works best when it reads like a one-line shot description: what is in frame, what it is doing, where it is, how it is lit and what it should look like. That is most of the craft. Failed generations usually come from one of two extremes: a bare noun (“a cat”) that leaves every decision to the model, or a pile of thirty comma-separated adjectives that pull it in different directions.

This guide gives you a formula that holds up for both stills and video, twelve copy-ready examples, the mistakes that waste credits, and working code for running the same prompts through Unicorn API, where the Grok Imagine image and video models sit behind one API key next to the rest of the model catalog.

What makes a good Grok Imagine prompt?

Grok Imagine is xAI’s family of generation models. Grok Imagine is the text-to-image model: you give it a natural-language description and it returns images that match. The video models animate a still frame or a text description. All of them read full sentences well, so you do not need the keyword soup that older diffusion models rewarded. (A diffusion model is the kind of generator that starts from random noise and refines it, step by step, into an image that fits your text.)

A reliable Grok Imagine prompt has five parts, in this order:

  1. Subject: the one thing the image is about. “An elderly fisherman” beats “a person”.
  2. Action or pose: what the subject is doing. “Mending a net on his knees” gives the model a composition.
  3. Setting: where, and what is in the background. Name it concretely: “on a wooden pier in a grey harbour”.
  4. Light and mood: time of day, light source, colour temperature. “Overcast morning, soft diffuse light, muted blues.”
  5. Camera and style: lens, framing, medium. “Close-up, 85mm portrait, shallow depth of field, documentary photo.”

Then add constraints: what you do not want. Grok Imagine has a habit of adding props, signage or lettering you never asked for, so a short tail like “no text, no watermark, nothing else in frame” earns its place.

Why the order matters

Image models give more weight to what comes first. If you open with “cinematic, moody, 8k, trending” and only mention the fisherman at word twenty, you get a moody scene in which the fisherman is an afterthought. Lead with the subject and the model builds the frame around it.

Specific beats long

Each word should make a decision the model would otherwise make for you. “Beautiful” makes no decision. “Backlit by a low sun, rim light on the hair” makes three. For images, 25 to 60 words is usually the sweet spot. Past that, instructions start contradicting each other.

Here is the difference in practice:

  • Weak: “Fisherman, harbour, cinematic, beautiful, highly detailed, 4k.”
  • Strong: “An elderly fisherman mending a green net on his knees, on a wooden pier in a grey harbour, overcast morning with soft diffuse light, close-up 85mm portrait with shallow depth of field, documentary photo. No text, no watermark.”

How to write a Grok Imagine prompt for images

The formula covers the words. The rest of a good result comes from settings and workflow around the prompt.

Choose the aspect ratio first, outside the prompt

Grok Imagine supports 1:1, 2:3, 3:2, 16:9 and 9:16. Set it as a field (in the API, aspect_ratio), not as words like “wide shot, landscape format”. Then write the composition to suit it: a 9:16 frame wants a vertical subject (a standing figure, a tower, a waterfall), while 16:9 suits horizons and two-person scenes. If you plan to animate the image later, pick the video’s aspect ratio now so you never have to crop.

Write once, then choose from variations

A text-only request to Grok Imagine returns six variations for one flat price (two when you attach reference images). Use that. Run a prompt, look at all six, and only rewrite if every variation misses in the same way. If one of six is right, the prompt is fine and you got normal randomness. If all six put the subject in the wrong place, the prompt is the problem.

Use reference images for edits and consistency

The ref_images field lets you pass existing images. When you do, the prompt should say what to keep and what to change, in that order: “Keep the same man, jacket and street. Change the shirt to bright red and make it night with wet pavement.” Short, imperative edit instructions work better than re-describing the whole scene. Common edit prompts follow the same shape: swap a colour, change the season, replace an object (“turn the car into a motorcycle, keep the rider and the road”).

Say what to leave out

Negative cues are plain phrases at the end of the prompt. The ones that pay off most often:

  • “No text, no watermark, no logos” for stray lettering and signage.
  • “Plain background” or “empty studio backdrop” for product shots.
  • “Nothing else in frame” when extra props creep in.
  • “Natural hands, five fingers” for close-ups of hands.

When the image needs real text

If the lettering itself matters (a poster headline, a label, a menu), you are fighting the model. GPT Image 1.5 is built for prompt adherence and legible text, and is the better choice for those jobs. For cheap, fast edits with many references, Nano Banana 2 Lite accepts up to 10 reference images. Our Nano Banana logo design guide covers text-heavy prompting in more depth.

Comparison of a weak and a strong image prompt and the images each produces
Naming subject, setting, light and exclusions turns a cluttered result into a usable one.

Grok Imagine prompt examples you can copy

Each example follows the formula. Swap the subject and keep the structure, and you have a reusable template.

Image prompts

  1. Portrait: “A young ceramicist with clay on her forearms, laughing while shaping a bowl on a wheel, in a cluttered sunlit studio, warm afternoon window light, 50mm portrait with shallow depth of field, film photo. No text.”
  2. Product shot: “A matte black stainless steel water bottle standing upright on a slab of grey stone, empty studio backdrop in pale sand colour, soft key light from the left with a gentle shadow, commercial product photography. No text, no logos, nothing else in frame.”
  3. Landscape: “A narrow mountain road winding through autumn birch forest, a single red car far in the distance, low fog in the valley, early morning blue hour, aerial wide shot, landscape photography.”
  4. Anime: “A schoolgirl with a yellow umbrella waiting at a rural bus stop in heavy rain, rice fields behind her, overcast grey light with glowing puddles, anime film still, hand-painted background.”
  5. Fantasy: “A towering library carved into a cliff face, wooden walkways and rope bridges between shelves, a lone scholar carrying a lantern, golden dusk light through mist, epic fantasy concept art, wide shot.”
  6. Food: “A bowl of tonkotsu ramen with a halved soft egg and charred pork, steam rising, on a dark wooden counter in a small ramen bar, warm overhead pendant light, close-up from a 45-degree angle, editorial food photography. No text.”
  7. Edit (with a reference image): “Keep the same person, pose and framing. Change the outfit to a navy wool coat and the background to a snowy city street at night with warm shop lights.”

Video prompts

For video, describe the motion and the camera. If you are animating one of your stills, do not re-describe the picture; the frame already sets the look.

  1. Slow reveal: “Slow drone shot rising over a rocky coastline at sunset, waves breaking against the rocks, camera tilts down to reveal a lighthouse.”
  2. Portrait animation (start frame): “She looks up from the wheel and smiles at the camera; slow push-in, clay spins steadily.”
  3. Product turntable (start frame): “The bottle rotates slowly a full turn on the stone; light glints along the edge; static camera.”
  4. Atmosphere loop (start frame): “Rain falls steadily, ripples spread across the puddles, the umbrella sways slightly in the wind; locked-off camera.”
  5. Action: “A skateboarder drops into an empty concrete pool and carves along the wall; handheld camera follows at board height, afternoon sun, light lens flare.”

How to prompt Grok Imagine videos

Video prompting has different failure modes from stills. The model has to invent what happens between frames, so vague motion produces wobbly, morphing results.

One subject, one action, one camera move

The most common mistake in Grok Imagine videos is asking for a sequence: “she walks in, sits down, picks up the cup and then looks out the window.” That is four shots. Pick one action and one camera move per clip (“she lifts the cup to her lips; slow push-in”) and cut the rest into separate clips.

Name camera moves the way a cinematographer would

The model understands standard terms: push-in, pull-back, pan left, tilt up, tracking shot, orbit, handheld, locked-off (camera does not move), drone rise. Use one. “Dynamic camera” means nothing in particular.

Match duration to the action

A head turn takes two seconds. A wave breaking takes four. If you ask for 15 seconds of a head turn, the model will fill the time with drift and odd extra motion. Start short and extend only when the action needs it.

Which Grok video model to use

Grok Imagine Video 1.5Grok Imagine Video 1.0
InputImage-to-video only (start frame required)Text-to-video or image-to-video
Duration1 to 15 seconds6 to 30 seconds
Resolution480p, 720p, 1080p480p, 720p, 1080p
Aspect ratiosauto, 1:1, 16:9, 9:16, 3:2, 2:31:1, 16:9, 9:16, 3:2, 2:3
Per-second rateSame rate for bothSame rate for both
Best forShort clips from a still you have already approved, with strong motion qualityClips longer than 15 seconds, or when you have no start frame

Grok Imagine Video 1.5 is the default choice when you have a start frame: it costs the same per second and can go as short as one second, which is ideal for cheap drafts. Note that it can be busy at peak times, so build retries into anything automated. Grok Imagine Video 1.0 is the one to use for pure text-to-video or for clips up to 30 seconds.

Once a clip is right, Grok Imagine Upscale raises it to 720p or 1080p. It takes a task_id that refers to an earlier Grok Imagine generation rather than a new prompt; the API documentation lists which job ids it accepts.

Running a Grok Imagine prompt through the API

The Grok app is fine for one-off experiments. When you want to run the same Grok Imagine prompt across a product catalogue, test variants side by side, or plug generation into an app, the Grok Imagine API route is simpler: one key, one bill, exact prices before each run. The workflow:

  1. Create a key on the API keys page and export it as UNICORN_API_KEY.
  2. Optionally check the price with POST /v1/models/price.
  3. Submit a job to POST /v1/jobs with a model id and an input object.
  4. Poll GET /v1/jobs/{id} until status is "succeeded".
  5. Read the result URLs from outputs.

If you would rather test prompts by hand first, the image playground runs the same models in the browser.

A single image job with curl

# Submit the job
curl -s https://api.unicornapi.net/v1/jobs \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine",
    "input": {
      "prompt": "A red fox resting in a snowy forest at dawn, soft light, highly detailed. No text, no watermark.",
      "aspect_ratio": "3:2"
    }
  }'

# Poll with the id from the response until status is "succeeded"
curl -s https://api.unicornapi.net/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $UNICORN_API_KEY"

Still to video in Python

This script generates stills from one prompt, prints every variation, then animates the first one as a cheap five-second 480p draft with Grok Imagine Video 1.5.

import os
import time
import requests

API = "https://api.unicornapi.net"
HEADERS = {"Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}"}


def run_job(model, inputs, poll_seconds=3):
    """Submit a job and block until it succeeds."""
    resp = requests.post(
        f"{API}/v1/jobs",
        headers=HEADERS,
        json={"model": model, "input": inputs},
        timeout=30,
    )
    resp.raise_for_status()
    job = resp.json()
    while job["status"] != "succeeded":
        if job["status"] in ("failed", "canceled"):
            raise RuntimeError(f"Job {job['id']} ended with status {job['status']}")
        time.sleep(poll_seconds)
        poll = requests.get(f"{API}/v1/jobs/{job['id']}", headers=HEADERS, timeout=30)
        poll.raise_for_status()
        job = poll.json()
    return job


# 1. Stills: one prompt, several variations
image_job = run_job("grok-imagine", {
    "prompt": (
        "A lighthouse keeper in a yellow raincoat climbing a spiral staircase "
        "inside a stone lighthouse, warm lantern light against blue dusk through "
        "the window, 35mm film photo. No text, no watermark."
    ),
    "aspect_ratio": "16:9",
})
for i, out in enumerate(image_job["outputs"]):
    print(f"variation {i}: {out['url']}")

# 2. Animate the variation you like (here: the first one)
start_frame = image_job["outputs"][0]["url"]
video_job = run_job("grok-imagine-video-1-5-preview", {
    "image": start_frame,
    "prompt": "He keeps climbing at a steady pace, lantern swinging gently; slow push-in.",
    "duration": 5,
    "resolution": "480p",
    "aspect_ratio": "16:9",
})
print("video:", video_job["outputs"][0]["url"])

Two details make this work well. The image and video share the 16:9 aspect ratio, so nothing gets cropped. And the video prompt only describes motion, because the start frame already defines the lighthouse, the raincoat and the light. If you work inside Cursor or Claude Code, the agent integration lets your coding agent call the same endpoints directly.

Pipeline from prompt to image job to video job to upscale through an API
The full API workflow: generate stills, pick one, animate it, then upscale the keeper.

What each Grok Imagine prompt costs

Every request is priced in credits. On a monthly plan a credit costs $0.01 (Starter $25, Creator $50, Studio $100, Pro $200 per month); top-up credits cost $0.015 each and never expire. Fractional prices round up to whole credits. Full details are on the pricing page.

RequestCreditsOn a planAs top-up
Grok Imagine image, default (multiplied by n if set)4$0.04$0.06
Video 1.5, 2 s, 480p (motion test)4.8, billed 5$0.05$0.075
Video 1.5, 5 s, 480p12$0.12$0.18
Video 1.5, 5 s, 720p22.5, billed 23$0.23$0.345
Video 1.5, 10 s, 1080p80$0.80$1.20
Video 1.0, 6 s, 720p27$0.27$0.405
Video 1.0, 30 s, 1080p240$2.40$3.60
Upscale to 720p / 1080p10 / 20$0.10 / $0.20$0.15 / $0.30

The pricing shape suggests a sensible workflow: iterate on motion at 480p and short durations, where a test costs a few credits, and only render the final clip at 1080p. A 1080p clip costs over 3x what the same clip costs at 480p, so drafting at full resolution is the quickest way to burn a budget.

You can confirm any price before running it. Send the model and the input you intend to use to the price endpoint:

curl -s https://api.unicornapi.net/v1/models/price \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"grok-imagine-video-1-5-preview","input":{"duration":5,"resolution":"720p"}}'

For comparison on stills: GPT Image 1.5 costs 3 credits at low quality, 4 at medium and 22 at high, and Nano Banana 2 Lite costs 4 credits. The same Grok Imagine prompt often transfers to these models with little change, so it is cheap to run one prompt across all three and keep the best.

Common Grok Imagine prompt mistakes

These are the patterns that most often turn a good idea into a wasted run.

  • Stacking quality tags. “8k, ultra HD, masterpiece, trending” adds noise, not detail. Describe light and lens instead.
  • Contradictions. “Minimalist” and “highly detailed busy market” in the same prompt force the model to pick one, and it may not pick yours.
  • Burying the subject. If the subject appears after the style words, expect it to be small or missing.
  • Rewriting after one bad image. Judge a prompt on all its variations, not the first one.
  • Describing the picture in a video prompt. With a start frame, re-describing the scene can cause the model to drift away from it. Describe motion only.
  • Several actions in one clip. Split sequences into separate clips and edit them together.
  • Drafting at 1080p. Test at 480p first; upscale or re-render the winner.
  • Asking for legible text. Use a text-strong model for signage and labels instead of fighting this one.

Spicy mode, real people and content limits

Grok imagine spicy mode is a setting in the consumer Grok app. It is not a word you can add to a Grok Imagine prompt, and it is not an API parameter: API requests run under the provider’s content policies however the prompt is phrased. Grok drew heavy criticism after users generated sexualized images of real people, mostly women and girls, by uploading a photo and asking for edits. Expect prompts that target real, identifiable people in sexual or degrading ways to be refused, and do not try to engineer around that. Beyond the policy question, generating intimate imagery of someone without consent is illegal in many places.

For everything else, the method in this guide holds: lead with the subject, make every word a decision, set the format as a field, say what to leave out, and keep video prompts to one action and one camera move. Get one Grok Imagine prompt right, keep its structure as a template, and you can reuse it across images, video and upscaling from a single key.

Frequently asked questions

What is the best Grok Imagine prompt format?

Write one or two plain sentences in this order: subject, action or pose, setting, light and mood, then camera and style. Finish with a short list of exclusions such as "no text, no watermark". Set aspect ratio as an API field or app setting, not as words in the prompt. The order puts the most important information first, which keeps the model from fixating on a minor detail.

How long should a Grok Imagine prompt be?

For images, 25 to 60 words is usually enough: long enough to pin down subject, setting, light and style, short enough that no instruction contradicts another. For image-to-video, shorter is better, often 10 to 25 words, because the start frame already defines the look. The prompt only needs to describe the motion and the camera move.

Is Grok Imagine no longer free?

Free access inside the Grok app depends on xAI's current plans and limits, which have changed over time, so check the app for today's terms. If you want predictable access, the API route is pay-per-request: through Unicorn API a default Grok Imagine image request is 4 credits, and you can query the exact price of any request before running it.

What is Grok Imagine spicy mode, and does it work through the API?

Spicy mode is a setting in the consumer Grok app, not a prompt keyword or an API parameter. API requests run under the provider's content policies regardless of how the prompt is worded. Grok faced heavy criticism after users generated sexualized images of real people from uploaded photos, so expect requests involving real people or explicit content to be refused, and never generate them without consent.

Is there a Grok Imagine API?

Yes. Unicorn API exposes the Grok Imagine image model, Grok Imagine Video 1.5 (image-to-video, 1 to 15 seconds), Grok Imagine Video 1.0 (text or image to video, 6 to 30 seconds) and an upscaler. You submit a job to POST /v1/jobs, poll GET /v1/jobs/{id} until it succeeds, and download the output URL, all with one API key and one credit balance.

How do I stop Grok Imagine adding text or extra objects?

End the prompt with explicit exclusions: "no text, no watermark, no logos, plain background, nothing else in frame". Also remove vague words like "epic" or "busy" that invite clutter, and name the background concretely. If you need clean, legible lettering in the image itself, a model built for text such as GPT Image 1.5 is usually the better tool.