Add xAI Grok Imagine Image 2.0 to the model registry - #158
Merged
Conversation
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
marked this pull request as ready for review
September 7, 2026 12:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-imagemodel. This istherefore an additive registration, not a replacement.
Pricing citation
docs.x.ai/docs/modelslists 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/imagelow/1K, $0.08/image medium/2K).
the still-open Add image quality tier support for image generation models #108), so
grok-imagine-image-2.0is registered at itsdefault/low tier price, $0.04/image, matching the pattern used for the
other flat
per_image_price_usdentries.Changes
tee_gateway/model_registry.py:GROK_IMAGINE_IMAGE_2_0enum entry underthe 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.pytoday), plus_MODEL_LOOKUPaliases(
grok-imagine-image-2.0,grok-imagine-image-2-0).tests/test_pricing.py: resolve + alias tests, mirroring theseedream-5.0-lite/glm-imageimage-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— 141passed (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