Skip to content

Add xAI Grok Imagine Image 2.0 to the model registry - #158

Merged
adambalogh merged 1 commit into
mainfrom
og/compassionate-thompson-1ktiq2
Sep 7, 2026
Merged

Add xAI Grok Imagine Image 2.0 to the model registry#158
adambalogh merged 1 commit into
mainfrom
og/compassionate-thompson-1ktiq2

Conversation

@adambalogh

@adambalogh adambalogh commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

xAI shipped a new image-generation model, grok-imagine-image-2.0
(~2026-08-11), alongside the already-registered grok-imagine-image
(SupportedModel.GROK_2_IMAGE). Per xAI's own pricing docs
(docs.x.ai/docs/models), it's a higher-quality tier — it jumped from #14 to
#2 on public text-to-image/editing leaderboards within a week of release —
offered at $0.04/image (low/1K) to $0.08/image (medium/2K), with no
deprecation notice
on the older grok-imagine-image model. This is
therefore an additive registration, not a replacement.

Pricing citation

  • docs.x.ai/docs/models lists three xAI image models: grok-imagine-image
    ($0.02/image, already registered), grok-imagine-image-quality
    ($0.05/image, not registered), and grok-imagine-image-2.0 ($0.04/image
    low/1K, $0.08/image medium/2K).
  • The gateway has no per-request image-quality tiering yet (that's tracked in
    the still-open Add image quality tier support for image generation models #108), so grok-imagine-image-2.0 is registered at its
    default/low tier price, $0.04/image, matching the pattern used for the
    other flat per_image_price_usd entries.

Changes

  • tee_gateway/model_registry.py: GROK_IMAGINE_IMAGE_2_0 enum entry under
    the xAI section (same shape as GROK_2_IMAGE — hosted-URL response format,
    no reference-image support registered since that isn't wired for xAI in
    llm_backend.py/image_generation.py today), plus _MODEL_LOOKUP aliases
    (grok-imagine-image-2.0, grok-imagine-image-2-0).
  • tests/test_pricing.py: resolve + alias tests, mirroring the
    seedream-5.0-lite / glm-image image-model tests.
  • CLAUDE.md: xAI provider row and image-generation list updated.

Testing

  • uv run --group test python -m pytest tests/test_pricing.py -q — 141
    passed (was 139).
  • make lint — ruff format/check + mypy clean.
  • uv run --group test python -m pytest tee_gateway/test/ tests/test_pricing.py tests/test_opengradient_field.py -q — 405 passed, 6 skipped.

Companion PR

chat-api PR adding this to the served catalog: OpenGradient/chat-api#290

Notes

There's an unrelated open PR (#156, branch og/compassionate-thompson-iujsyi)
adding Z.ai GLM-5.3/5.3-Flash from a previous run of this same routine check —
no file overlap (that PR only touches the Z.ai section).


🤖 Generated with Claude Code

https://claude.ai/code/session_01DxEfKGgZjAouaG3ad1Nrwv

xAI shipped grok-imagine-image-2.0 (~2026-08-11) as a higher-quality
image model alongside the existing grok-imagine-image, per xAI's own
pricing docs (docs.x.ai/docs/models). Registered as an additive entry
(not a replacement) at $0.04/image, the low/1K tier price; xAI's
pricing page shows no deprecation of grok-imagine-image.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DxEfKGgZjAouaG3ad1Nrwv
@adambalogh
adambalogh marked this pull request as ready for review September 7, 2026 12:36
@adambalogh
adambalogh merged commit 8d47002 into main Sep 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants