# xAI models: APIs and prices

Grok models with live search and reasoning, plus video. XiaoZhan AIhub offers 7 xAI models (Text generation, Image generation, Video generation). Call them with one API key through the OpenAI, Anthropic or Gemini SDK; prices are in credits (60 credits = ¥1) and every model page lists the full price.

- Page: https://qd.zsopc.com/en/vendors/xai
- Models: 7
- Last updated: 2026-11-17

## Text generation

### Grok 4.5

xAI Grok 4.5 flagship. 500K context, reasoning and multimodal input, and video generation right in the playground.

- Model ID: `grok-4.5`
- Page: https://qd.zsopc.com/en/models/grok-4.5 (Markdown: https://qd.zsopc.com/en/models/grok-4.5.md)
- Context window: 500,000 tokens
- Updated: 2026-11-17
- Price:
  - Input: 808.8 credits (≈ ¥13.48 / ≈ $2) per 1M tokens
  - Output: 2,426 credits (≈ ¥40.44 / ≈ $6) per 1M tokens
  - Cached input: 121.32 credits (≈ ¥2.02 / ≈ $0.3) per 1M tokens
  - Long-context tier (prompt ≥ 200,000 tokens): input 1,618 credits (≈ ¥26.96 / ≈ $4), output 4,853 credits (≈ ¥80.88 / ≈ $12)
  - Per server-side tool call (web search etc.): 2.02 credits (≈ ¥0.034 / ≈ $0.005)

### Grok 4.6

xAI Grok 4.6 flagship. 500K context, reasoning and multimodal input, and video generation right in the playground.

- Model ID: `grok-4.6`
- Page: https://qd.zsopc.com/en/models/grok-4.6 (Markdown: https://qd.zsopc.com/en/models/grok-4.6.md)
- Context window: 500,000 tokens
- Updated: 2026-11-17
- Price:
  - Input: 808.8 credits (≈ ¥13.48 / ≈ $2) per 1M tokens
  - Output: 2,426 credits (≈ ¥40.44 / ≈ $6) per 1M tokens
  - Cached input: 202.2 credits (≈ ¥3.37 / ≈ $0.5) per 1M tokens
  - Long-context tier (prompt ≥ 200,000 tokens): input 1,618 credits (≈ ¥26.96 / ≈ $4), output 4,853 credits (≈ ¥80.88 / ≈ $12)
  - Per server-side tool call (web search etc.): 2.02 credits (≈ ¥0.034 / ≈ $0.005)

### Grok 4.7

xAI Grok 4.7, the latest flagship. 500K context, reasoning, image and video understanding, and video generation right in the playground.

- Model ID: `grok-4.7`
- Page: https://qd.zsopc.com/en/models/grok-4.7 (Markdown: https://qd.zsopc.com/en/models/grok-4.7.md)
- Context window: 500,000 tokens
- Updated: 2026-11-17
- Price:
  - Input: 808.8 credits (≈ ¥13.48 / ≈ $2) per 1M tokens
  - Output: 2,426 credits (≈ ¥40.44 / ≈ $6) per 1M tokens
  - Cached input: 202.2 credits (≈ ¥3.37 / ≈ $0.5) per 1M tokens
  - Long-context tier (prompt ≥ 200,000 tokens): input 1,618 credits (≈ ¥26.96 / ≈ $4), output 4,853 credits (≈ ¥80.88 / ≈ $12)
  - Per server-side tool call (web search etc.): 2.02 credits (≈ ¥0.034 / ≈ $0.005)

## Image generation

### Grok Imagine (Image)

xAI Grok Imagine image generation (standard). /v1/images/generations.

- Model ID: `grok-imagine-image`
- Page: https://qd.zsopc.com/en/models/grok-imagine-image (Markdown: https://qd.zsopc.com/en/models/grok-imagine-image.md)
- Updated: 2026-11-17
- Price:
  - Per output image: 28.31 credits (≈ ¥0.472 / ≈ $0.07)

### Grok Imagine (Image · Quality)

xAI Grok Imagine image generation (high quality). /v1/images/generations.

- Model ID: `grok-imagine-image-quality`
- Page: https://qd.zsopc.com/en/models/grok-imagine-image-quality (Markdown: https://qd.zsopc.com/en/models/grok-imagine-image-quality.md)
- Updated: 2026-11-17
- Price:
  - Per output image: 28.31 credits (≈ ¥0.472 / ≈ $0.07)

## Video generation

### Grok Imagine Video

xAI Grok Imagine text-to-video (asynchronous task).

- Model ID: `grok-imagine-video`
- Page: https://qd.zsopc.com/en/models/grok-imagine-video (Markdown: https://qd.zsopc.com/en/models/grok-imagine-video.md)
- Updated: 2026-11-17
- Price:
  - Per second of output: 283.08 credits (≈ ¥4.72 / ≈ $0.7)

### Grok Imagine Video 1.5

xAI Grok Imagine 1.5 video generation (asynchronous task; text-to-video, image-to-video and multi-image reference).

- Model ID: `grok-imagine-video-1.5-preview`
- Page: https://qd.zsopc.com/en/models/grok-imagine-video-1.5-preview (Markdown: https://qd.zsopc.com/en/models/grok-imagine-video-1.5-preview.md)
- Updated: 2026-11-17
- Price:
  - Per second of output: 586.38 credits (≈ ¥9.77 / ≈ $1.45)

Prices are in credits, 60 credits = ¥1. The prices above are what is charged today (limited-time discounts included); ≈¥ / ≈$ use the platform's published rates.

## FAQ

### How do I call xAI models?

Create an API key on XiaoZhan AIhub, point your SDK's base_url at https://qd.zsopc.com/v1 and put the model ID from the list above in the model field. The OpenAI, Anthropic and Gemini SDKs all work.

### How are xAI models billed?

Each model is billed its own way: text models per input and output token, image models per image, video models per second or per token. Prices are in credits (60 credits = ¥1); each model page lists the full price.
