Skip to main content

Overview

xAI’s 4.20 generation. 2M context, vision, file input, reasoning; the rate doubles above 200K prompt tokens.

Specs

Pricing

Above a long prompt this model costs more per token, because the infrastructure serving it charges more there. The threshold is on the prompt, so you know which rate applies before you send.

Example

Agent query example

Ask the API which models fit, instead of hardcoding an id: