Last updated: August 14, 2026

Grok Imagine API β€” Endpoints, Models, and What It Actually Costs

Quick Answer

Yes β€” the grok imagine api is live. Image 2.0 ships as grok-imagine-image-2.0 on xAI's own API, alongside the video model, so image generation is no longer consumer-app only.

The grok api now covers three generation surfaces: /v1/images/generations for text to image, /v1/images/edits for prompt-driven editing with source images, and /v1/videos/generations for clips up to 15 seconds.

Published xai api pricing is $0.04 per image and $0.080 per second of video, billed per call with no free tier β€” if you'd rather generate without wiring up a key, the panel below runs the same class of models on credits.

This page is maintained as a status tracker, not a one-time write-up. Model IDs, endpoint coverage, and published rates are re-checked against xAI's own documentation and updated here when they move β€” the date above is when it was last verified.

See API Pricing Compared

Status board Β· verified August 14, 2026

Does Grok Imagine Have an API? Current State of the xAI Image API

For most of Grok Imagine's life the honest answer to this question was no β€” image generation shipped to the consumer app first and the API followed later, which is the pattern xAI has repeated with every generation model it has released. That gap has now closed. As of August 2026, xAI documents Imagine Image 2.0, the older image tiers, and the video model as callable endpoints under the same API key you'd already be using for the text models. Here's exactly what is live, at what price, and what the documentation still lists as forthcoming.

Live β€” general availability

Image generation, image editing, and video generation are all callable today on api.x.ai. There is no waitlist, no preview flag, and no separate Imagine-specific key: the grok imagine api integration path is the same key, base URL, and auth header as the language models.

CapabilityModel ID / endpointPublished priceStatus
Text to image (Image 2.0)grok-imagine-image-2.0 Β· POST /v1/images/generations$0.04 / imageLive
Image editing from a source imagegrok-imagine-image-2.0 Β· POST /v1/images/edits$0.04 / output image, inputs also billedLive
Previous-generation image tiersgrok-imagine-image-quality Β· grok-imagine-image$0.05 / image Β· $0.02 / imageLive
Video generationgrok-imagine-video-1.5 Β· POST /v1/videos/generations$0.080 / second, up to 15sLive
Multi-image editing (up to 3 sources)grok-imagine-image-2.0 Β· /v1/images/editsPer output image, plus input imagesLive
Reference-to-video, video extension, Files APIListed under "More Capabilities" in xAI's docsNot publishedDocumented, verify before building

The release order is the thing to remember

Image 2.0 landed in the consumer app on August 7, 2026, and the API surface for it is documented under the Imagine API rather than as a separate product. If you're searching grok imagine api release date and finding posts that say no API exists, check their date β€” a large amount of the commentary written in the days right after the consumer launch has since been overtaken by the docs.

Endpoint names circulating in blog posts are still worth checking

Third-party aggregators and gateway resellers list model IDs that don't always match xAI's own catalogue β€” grok-2-image and similar names show up widely and do not appear in the current documentation. Treat any endpoint or model string as unconfirmed until you see it at docs.x.ai, and prefer the docs over a wrapper's model list when the two disagree.

Pricing is per output, not per token

The grok imagine api cost model is flat per image regardless of prompt length, and per second for video. Edits bill for input images as well as output, so a three-source composite is not the same cost as a single text-to-image call. There's no image generation api free tier on xAI's side β€” billing starts on the first successful call.

Nothing here is a permanent statement

Everything above is a snapshot of what xAI published as of August 14, 2026. Rates on generation APIs move, model IDs get deprecated in favour of successors, and capabilities listed as forthcoming become live without much announcement. Re-check the numbers against xAI's documentation before you budget a project around them.

Sources: xAI's own model catalogue and Imagine API guides at docs.x.ai, checked August 14, 2026. Prices quoted are xAI's published list rates and exclude any volume or enterprise arrangement.

How to use the Grok API for images

The Grok Image Generation API in Practice

The endpoints follow the shape most text to image api clients already expect, which is the main reason integration tends to be a short job rather than a project. Below is the minimum viable call and what each surface accepts.

Minimal text-to-image request

curl https://api.x.ai/v1/images/generations \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-image-2.0",
    "prompt": "A collage of London landmarks in a stenciled street-art style"
  }'

Request shape as published in xAI's Imagine API guide. Optional fields cover output count (up to 10 images per request), aspect ratio, resolution, and response format β€” check the current docs for exact field names before you hard-code them.

Text to image

POST /v1/images/generations with a model and a prompt. Up to 10 images per request, with aspect ratio and resolution configurable. This is the ai image generation api surface most people are after when they search for the grok image 2.0 api.

Editing an existing image

POST /v1/images/edits with a prompt plus an image object carrying a url and type. Source images can be passed by URL or base64. This covers the prompt-driven transformations β€” restyle, alter, recompose β€” rather than region-level selection.

Multi-image composition

The same edits endpoint accepts up to three source images in one request, for combining subjects, transferring a style from one image to another, or composing a scene from separate references. Each input image is billed alongside the output.

Video generation

POST /v1/videos/generations with grok-imagine-video-1.5, a prompt, and optionally a source still to animate. Duration is configurable up to 15 seconds. As an ai video generation api it's priced per second of output, so cost scales with clip length rather than request count.

Auth and client compatibility

One xAI key covers text, image, and video β€” there's no separate Imagine credential. The endpoint paths mirror the conventional images API shape, so most teams point an existing OpenAI-compatible client at the xAI base URL rather than adopting a new SDK, and xAI publishes its own SDK if you'd rather use it.

What isn't in the API

The region-level editing tools from the consumer app β€” magic wand style local edits and the interactive selection workflow β€” aren't exposed as their own programmatic controls. Prompt-driven editing is, and for many workflows that's equivalent, but if your product depends on pixel-region selection, verify that surface exists before you design around it.

If you don't want to build an integration

Generating Programmatically vs. Generating Right Now

An API being live doesn't automatically make it the right tool. Wiring up a key, adding billing, handling retries and content responses, and shipping a UI around it is a few days of work minimum β€” and it's wasted work if what you actually need is a few hundred images for a campaign, or a way to test prompts before committing to an integration. xImagineai covers that second case.

Build the integration

Call the xAI Imagine API directly

The right choice when generation is a feature of your product β€” user-triggered renders, batch pipelines, anything that has to run without a human in the loop. You get $0.04 per image, full parameter control, and the ability to scale to whatever your rate limits allow. You also own the engineering: key management, error handling, moderation responses, storage of outputs, and the cost of every retry.

  • Best for: product features, automated pipelines, high volume
  • Time to first output: hours to days, depending on your stack
  • Ongoing cost: metered per image and per second, no floor and no ceiling

Skip the integration

Generate on xImagineai instead

A browser panel over the same class of models, billed in credits rather than per API call. Each image costs 6 credits, credits don't reset daily, and new accounts start with free trial credits β€” so the cost of trying a prompt is zero rather than a billing event. Image and video models sit on one balance, including Grok-class image generation, Kling, Veo, Seedance and MiniMax H3, which is the practical way to compare outputs before you commit an integration to a single vendor.

  • Best for: campaigns, prototyping prompts, one-off projects, non-engineers on the team
  • Time to first output: sign in and type
  • Ongoing cost: 6 credits per image, about $0.13–$0.18 an image on annual plans, 12-month validity

To be straight about it: xImagineai does not currently publish a public developer API or API keys. It's a hosted generation product, not an API reseller. If your requirement is genuinely programmatic β€” code calling an endpoint on a schedule β€” the xAI API above is the path, and this page will keep tracking it. If your requirement is output rather than integration, the panel gets you there in a minute instead of a sprint, and the credits work across every model on the site rather than one vendor's catalogue.

GROK IMAGINE

Auto-Routing Generation Module

DROP IMAGE TO EDIT

PNG, JPG up to 10MB

Required
Spicy Mode
●System Ready
0 Credits Available
100%
GROK IMAGINE

Examples

Configure generation parameters to initialize

Image Remix

Image Remix

Remix a source image into a vivid creative direction with bold visual energy.

Bold Visual Idea

Bold Visual Idea

A playful high-contrast image with dynamic composition and social-ready framing.

Tokyo Character Poster

Tokyo Character Poster

A precise poster-style character composition with cyberpunk detail and strong vertical layout.

Hero Fusion Edit

Hero Fusion Edit

Turn a character reference into a glowing mythic hero portrait with cloud-like energy.

Anime Lighting Pass

Anime Lighting Pass

Enhance an anime-style scene with cinematic lighting, bloom, and expressive detail.

Expressive Anime Duo

Expressive Anime Duo

A cinematic anime-style character scene with expressive eyes and glowing volumetric light.

Grok Imagine API pricing

AI Image API Pricing Comparison: xAI, MiniMax, Subscriptions, and Credits

Four different ways to pay for the same broad capability, and they aren't directly comparable until you normalise them. The table below puts xai api pricing next to the alternatives people actually weigh it against.

Grok API Pricing vs. the Alternatives

Published rates as of August 14, 2026. Metered API pricing and credit pricing bill on different units β€” the cost examples below the table translate between them.

xAI Imagine APIMiniMax H3 APISuperGrok plansxImagineai credits
How you access itREST endpoints + SDKsREST endpointsConsumer app only, no APIBrowser panel, no public API
Image rate$0.04 / imageVideo-focused modelBundled in subscription6 credits / image β‰ˆ $0.13–$0.18 on annual plans
Video rate$0.080 / second, up to 15s$0.13 / second at 2KIn-app generation onlyCredits, shared with image balance
Setup before first outputAPI key, billing, codeAPI key, billing, codeSubscribe, then use the appSign in and type a prompt
Multiple vendors on one balance
Free to tryβœ— billed from the first callSmall daily free allowanceFree trial credits on signup
Unused capacity expiresN/A β€” pay per callN/A β€” pay per callDaily reset, no rollover12-month validity on annual plans

Translating the units

What a Real Workload Costs on Each

  • 1,000 images via the xAI Imagine API$40 metered, plus your integration time
  • 1,000 images on xImagineai (6,000 credits)β‰ˆ $126–$180 on annual plans, no integration
  • A 10-second Grok video via the API$0.80 at $0.080 / second
  • A 10-second 2K MiniMax H3 clip via API$1.30 at $0.13 / second
  • Testing 40 prompt variations before you pick one$1.60 metered, or free trial credits on the panel

Read that honestly: per image, the API is the cheaper unit. At $0.04 metered against 6 credits β€” roughly $0.13 to $0.18 β€” on an annual plan, the grok imagine api cost undercuts the panel by a wide margin at volume, and if you're generating tens of thousands of images programmatically, that gap is the whole argument for building the integration. What the credit price buys instead is everything you don't build: no key, no billing setup, no retry and moderation handling, and several vendors' image and video models on one balance rather than one catalogue. That's worth paying for on a campaign, a prototype, or a comparison run, and it stops being worth it once generation becomes a product feature. Video runs the other way against MiniMax: $0.080 per second is well under H3's published $0.13 per second at 2K, though the two aren't like-for-like on resolution or clip length. Every figure here is a published list rate on the date above, and generation pricing moves β€” re-check before you build a budget on it.

XImagineAI Pricing for AI Image & Video Generation

X Imagine AI brings Grok Imagine image generation, Grok Video creation, and Spicy Mode together on a single platform β€” with credits you can buy annually, subscribe to monthly, or purchase once and use across included tools. No X Premium subscription. No hitting a daily generation limit mid-project. 15,000+ creators, studios, and agencies have already made the switch.

Best Value
Flexible
One-Time

Annual Starter

$14$10/month

Total $120 Β· All credits available immediately

  • 4,000 AI generation credits
  • Grok Imagine image generation β€” full access
  • Grok Video generation β€” cinematic AI video
  • Spicy Mode unlocked
  • Flux-based engine β€” advanced processing
  • Professional-grade output quality
  • Priority generation queue β€” no wait
  • 12-month credit validity
  • $120 billed once for the year
  • No X Premium subscription needed

Annual Creator

$24$20/month

Total $240 Β· All credits available immediately

  • 9,600 AI generation credits
  • Grok Imagine image generation β€” full access
  • Grok Video generation β€” cinematic AI video
  • Image-to-video conversion
  • Spicy Mode β€” unlimited access
  • Flux-based engine β€” advanced processing
  • Professional-grade output quality
  • Priority generation queue β€” no wait
  • 12-month credit validity
  • $240 billed once for the year
  • No X Premium subscription needed

Annual Studio

$49$39/month

Total $468 Β· All credits available immediately

  • 19,200 AI generation credits
  • Grok Imagine image generation β€” unrestricted
  • Grok Video generation β€” cinematic AI video
  • Image-to-video conversion
  • Spicy Mode β€” unlimited access
  • Flux-based engine β€” advanced features
  • Ultra-high resolution output
  • Priority generation β€” no queue
  • Batch image processing
  • 12-month credit validity
  • $468 billed once for the year
  • Priority technical support

Annual Scale

$89$59/month

Total $708 Β· All credits available immediately

  • 33,600 AI generation credits
  • Grok Imagine image generation β€” unrestricted
  • Grok Video generation β€” cinematic AI video
  • Image-to-video conversion
  • Spicy Mode β€” unlimited access
  • Flux-based engine β€” advanced features
  • Ultra-high resolution output
  • Priority generation β€” no queue
  • Batch image processing
  • 12-month credit validity
  • $708 billed once for the year
  • Priority technical support

Grok Imagine API β€” Developer FAQ

Related pages

Where to Go Next

This page tracks the API surface. These cover the models themselves, the video alternative, and what generation costs without a metered key.

2

Grok Imagine 2.0

Model

What Image 2.0 actually shipped β€” generation, editing, the magic wand workflow, and how it compares to the 1.5 video release. The consumer side of what this API exposes.

See Image 2.0
H

MiniMax H3

Video

The video model most often weighed against Grok's, with published API pricing at $0.13 per second at 2K and an online panel that skips the 42.5GB local install.

Compare MiniMax H3
$

Credit pricing

Pricing

What generation costs without a metered API key. One-time and annual credit packs, usable across every image and video model on the site, no monthly commitment.

See pricing

Don't Wait on a Roadmap to Start Generating

The API is live if you want to build against it β€” and if you just need output today, the panel runs the same class of image and video models on credits, with free trial credits to start.

See Credit Pricing

xImagineai is an independent platform, not affiliated with xAI or Grok. API details and prices on this page are xAI's published figures as of August 14, 2026 β€” verify at docs.x.ai before building.