From 1d71846fac48c8e2c8a5bbc509fc5b7a2414532c Mon Sep 17 00:00:00 2001 From: Swapnil Roy Date: Mon, 13 Jul 2026 20:12:28 +0530 Subject: [PATCH 1/2] feat: add grok-imagine-image-quality, grok-imagine-video, grok-imagine-video-1.5 models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add xAI Grok Imagine image quality and video generation models with correct general config types and pricing schema. Image models use the image key (per-image pricing): - grok-imagine-image: 2¢ ($0.02/image) - grok-imagine-image-quality: 5¢ ($0.05/image) Video models use additional_units.video_seconds (per-second pricing, matching the Vertex AI Veo pattern): - grok-imagine-video: 5¢/sec ($0.05/sec) - grok-imagine-video-1.5: 8¢/sec ($0.08/sec) Co-authored-by: Cursor --- general/x-ai.json | 18 ++++++++++++++ pricing/x-ai.json | 62 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/general/x-ai.json b/general/x-ai.json index b51591280..781a77fd9 100644 --- a/general/x-ai.json +++ b/general/x-ai.json @@ -282,6 +282,24 @@ }, "disablePlayground": true }, + "grok-imagine-image-quality": { + "type": { + "primary": "image_generation" + }, + "disablePlayground": true + }, + "grok-imagine-video": { + "type": { + "primary": "video" + }, + "disablePlayground": true + }, + "grok-imagine-video-1.5": { + "type": { + "primary": "video" + }, + "disablePlayground": true + }, "grok-4.20-reasoning-latest": { "type": { "primary": "chat", diff --git a/pricing/x-ai.json b/pricing/x-ai.json index db817d0ea..309052038 100644 --- a/pricing/x-ai.json +++ b/pricing/x-ai.json @@ -580,13 +580,19 @@ }, "grok-imagine-image": { "pricing_config": { + "currency": "USD", "pay_as_you_go": { - "request_token": { - "price": 0 - }, - "response_token": { - "price": 0 + "image": { + "default": { + "default": { + "price": 2 + } + } } + }, + "calculate": { + "request": { "operation": "multiply", "operands": [{ "value": "0" }, { "value": "input_tokens" }] }, + "response": { "operation": "multiply", "operands": [{ "value": "1" }, { "value": "rates.image" }] } } } }, @@ -602,6 +608,52 @@ } } }, + "grok-imagine-image-quality": { + "pricing_config": { + "currency": "USD", + "pay_as_you_go": { + "image": { + "default": { + "default": { + "price": 5 + } + } + } + }, + "calculate": { + "request": { "operation": "multiply", "operands": [{ "value": "0" }, { "value": "input_tokens" }] }, + "response": { "operation": "multiply", "operands": [{ "value": "1" }, { "value": "rates.image" }] } + } + } + }, + "grok-imagine-video": { + "pricing_config": { + "currency": "USD", + "pay_as_you_go": { + "request_token": { "price": 0 }, + "response_token": { "price": 0 }, + "additional_units": { + "video_seconds": { + "price": 5 + } + } + } + } + }, + "grok-imagine-video-1.5": { + "pricing_config": { + "currency": "USD", + "pay_as_you_go": { + "request_token": { "price": 0 }, + "response_token": { "price": 0 }, + "additional_units": { + "video_seconds": { + "price": 8 + } + } + } + } + }, "grok-imagine-image-2026-03-02": { "pricing_config": { "pay_as_you_go": { From 43b97823ae70ff16a5aa57ed6266973c4d952c0f Mon Sep 17 00:00:00 2001 From: Swapnil Roy Date: Mon, 13 Jul 2026 20:43:19 +0530 Subject: [PATCH 2/2] image-pro is now image-quality --- general/x-ai.json | 6 ------ pricing/x-ai.json | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/general/x-ai.json b/general/x-ai.json index 781a77fd9..b8e3139dc 100644 --- a/general/x-ai.json +++ b/general/x-ai.json @@ -276,12 +276,6 @@ }, "disablePlayground": true }, - "grok-imagine-image-pro": { - "type": { - "primary": "image_generation" - }, - "disablePlayground": true - }, "grok-imagine-image-quality": { "type": { "primary": "image_generation" diff --git a/pricing/x-ai.json b/pricing/x-ai.json index 309052038..b2d87a632 100644 --- a/pricing/x-ai.json +++ b/pricing/x-ai.json @@ -596,18 +596,6 @@ } } }, - "grok-imagine-image-pro": { - "pricing_config": { - "pay_as_you_go": { - "request_token": { - "price": 0 - }, - "response_token": { - "price": 0 - } - } - } - }, "grok-imagine-image-quality": { "pricing_config": { "currency": "USD",