Models


xai

Grok 3 Mini Beta

(grok-3-mini-beta)

Mid
Grok 3 Mini BetaBy xAI
Grok 3 Mini is a lightweight, smaller thinking model. Unlike traditional models that generate answers immediately, Grok 3 Mini thinks before responding. It's ideal for reasoning-heavy tasks that don't demand extensive domain knowledge, and shines in math-specific and quantitative use cases, such as solving challenging puzzles or math problems. Transparent "thinking" traces accessible. Defaults to low reasoning, can boost with setting `reasoning: { effort: "high" }` Note: That there are two xAI endpoints for this model. By default when using this model we will always route you to the base endpoint. If you want the fast endpoint you can add `provider: { sort: throughput}`, to sort by throughput instead.
$0.30Input(Per Million)
$0.50Output(Per Million)
131.1KContext Window
xai

Grok 3 Beta

(grok-3-beta)

Expensive
Grok 3 BetaBy xAI
Grok 3 is the latest model from xAI. It's their flagship model that excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge in finance, healthcare, law, and science. Excels in structured tasks and benchmarks like GPQA, LCB, and MMLU-Pro where it outperforms Grok 3 Mini even on high thinking. Note: That there are two xAI endpoints for this model. By default when using this model we will always route you to the base endpoint. If you want the fast endpoint you can add `provider: { sort: throughput}`, to sort by throughput instead.
$3.00Input(Per Million)
$15.00Output(Per Million)
131.1KContext Window
xai

Grok 2 Vision 1212

(grok-2-vision-1212)

Mid
Grok 2 Vision 1212By xAI
Grok 2 Vision 1212 advances image-based AI with stronger visual comprehension, refined instruction-following, and multilingual support. From object recognition to style analysis, it empowers developers to build more intuitive, visually aware applications. Its enhanced steerability and reasoning establish a robust foundation for next-generation image solutions. To read more about this model, check out xAI's announcement: https://x.ai/blog/grok-1212
$2.00Input(Per Million)
$10.00Output(Per Million)
32.8KContext Window
xai

Grok 2 1212

(grok-2-1212)

Mid
Grok 2 1212By xAI
Grok 2 1212 introduces significant enhancements to accuracy, instruction adherence, and multilingual support, making it a powerful and flexible choice for developers seeking a highly steerable, intelligent model.
$2.00Input(Per Million)
$10.00Output(Per Million)
131.1KContext Window
xai

Grok 2

(grok-2)

Expensive
Grok 2By xAI
Grok 2 is xAI's frontier language model with state-of-the-art reasoning capabilities, best for complex and multi-step use cases. To use a faster version, see the (https://x.ai/blog/grok-2).
$3.00Input(Per Million)
$15.00Output(Per Million)
32.8KContext Window
xai

Grok 3 Fast

(grok-3-fast)

Expensive
Grok 3 FastBy xAI
Grok 3 Fast is a faster version of Grok 3. It's their flagship model that excels at enterprise use cases like data extraction, coding, and text summarization. Possesses deep domain knowledge in finance, healthcare, law, and science. Excels in structured tasks and benchmarks like GPQA, LCB, and MMLU-Pro where it outperforms Grok 3 Mini even on high thinking. Note: That there are two xAI endpoints for this model. By default when using this model we will always route you to the base endpoint. If you want the fast endpoint you can add `provider: { sort: throughput}`, to sort by throughput instead.
$5.00Input(Per Million)
$25.00Output(Per Million)
131.1KContext Window
xai

Grok 3 Mini Fast

(grok-3-mini-fast)

Mid
Grok 3 Mini FastBy xAI
Grok 3 Mini is a lightweight, smaller thinking model. Unlike traditional models that generate answers immediately, Grok 3 Mini thinks before responding. It's ideal for reasoning-heavy tasks that don't demand extensive domain knowledge, and shines in math-specific and quantitative use cases, such as solving challenging puzzles or math problems. Transparent "thinking" traces accessible. Defaults to low reasoning, can boost with setting `reasoning: { effort: "high" }` Note: That there are two xAI endpoints for this model. By default when using this model we will always route you to the base endpoint. If you want the fast endpoint you can add `provider: { sort: throughput}`, to sort by throughput instead.
$0.60Input(Per Million)
$4.00Output(Per Million)
131.1KContext Window
xai

Grok 4

(grok-4)

Expensive
Grok 4By xAI
Grok 4 is xAI's latest reasoning model with a 256k context window. It supports parallel tool calling, structured outputs, and both image and text inputs. Note that reasoning is not exposed, reasoning cannot be disabled, and the reasoning effort cannot be specified. Pricing increases once the total tokens in a given request is greater than 128k tokens. See more details on the [xAI docs](https://docs.x.ai/docs/models/grok-4-0709)
$3.00Input(Per Million)
$15.00Output(Per Million)
256KContext Window
xai

Grok Code Fast 1

(grok-code-fast-1)

Cheapest
Grok Code Fast 1By xAI
Grok Code Fast 1 is a speedy and economical reasoning model that excels at agentic coding. With reasoning traces visible in the response, developers can steer Grok Code for high-quality work flows.
$0.20Input(Per Million)
$1.50Output(Per Million)
256KContext Window
xai

Grok 4 Fast

(grok-4-fast)

Cheapest
Grok 4 FastBy xAI
Grok 4 Fast is xAI's latest multimodal model with SOTA cost-efficiency and a 2M token context window. It comes in two flavors: non-reasoning and reasoning (controllable via the `reasoning` parameter). See the official [news post](http://x.ai/news/grok-4-fast).
$0.20Input(Per Million)
$0.50Output(Per Million)
2MContext Window
xai

Grok 4.1 Fast

(grok-4-1-fast)

Cheapest
Grok 4.1 FastBy xAI
Grok 4.1 Fast is xAI's best agentic tool-calling model that shines in real-world use cases like customer support and deep research. Features a 2M token context window and vision support. Reasoning can be enabled/disabled via the `reasoning` parameter.
$0.20Input(Per Million)
$0.50Output(Per Million)
2MContext Window
xai

Grok 4.2

(grok-4.2)

Mid
Grok 4.2By xAI
xAI latest flagship model (public beta). 2M context window with improved reasoning. Starts at $2/M input tokens.
$2.00Input(Per Million)
$6.00Output(Per Million)
2MContext Window
xai

Grok 4.1 Fast

(grok-4.1-fast)

Cheapest
Grok 4.1 FastBy xAI
xAI most cost-efficient model with 2M token context window. Reasoning and non-reasoning variants. Ideal for high-volume workloads, long documents, and agent workflows.
$0.20Input(Per Million)
$0.50Output(Per Million)
2MContext Window
xai

Grok 2 Image 1212

(grok-2-image-1212)

Grok 2 Image 1212By xAI
Grok 2 Image is xAI's image generation model. It processes text prompts to generate high-quality images with a datestamp of 2023-12-12. This model internally uses a chat model to revise the prompt before generating the image, enhancing the quality and relevance of the output.
$0.07 - $0.07All variants included (sizes & qualities)
  • Standard: $0.07 for size 1024x1024
(Per image)
xai

Grok 2 Image

(grok-2-image)

Grok 2 ImageBy xAI
Grok 2 Image is xAI's image generation model. It processes text prompts to generate high-quality images. This model internally uses a chat model to revise the prompt before generating the image, enhancing the quality and relevance of the output. This alias points to the latest stable version.
$0.07 - $0.07All variants included (sizes & qualities)
  • Standard: $0.07 for size 1024x1024
(Per image)
xai

Grok 2 Image Latest

(grok-2-image-latest)

Grok 2 Image LatestBy xAI
Grok 2 Image Latest is xAI's most current image generation model. It processes text prompts to generate high-quality images. This model internally uses a chat model to revise the prompt before generating the image, enhancing the quality and relevance of the output. This alias always points to the latest version with the newest features.
$0.07 - $0.07All variants included (sizes & qualities)
  • Standard: $0.07 for size 1024x1024
(Per image)