The Grok Family
Models
Grok is our family of flagship LLMs. Our latest models are grok-2-1212
and grok-2-vision-1212
. We recommend that all customers use the grok-2-1212
model family. The grok-beta
models are early models that are now deprecated.
The grok-2-1212
models have a knowledge cutoff date of July 17, 2024.
grok-2-vision-1212
| 32768 | Text Input $2.00 Image Input $2.00 Text Completion $10.00 | ||
grok-2-1212
| 131072 | Text Input $2.00 Text Completion $10.00 | ||
grok-vision-beta | 8192 | Text Input $5.00 Image Input $5.00 Text Completion $15.00 | ||
grok-beta | 131072 | Text Input $5.00 Text Completion $15.00 |
Model Constraints
- No access to realtime events
- Chat models
- No role order limitation: You can mix
system
,user
, orassistant
roles in any sequence for your conversation context.
- No role order limitation: You can mix
- Image input models
- Maximum image size:
10MiB
- Maximum number of images: No limit
- Supported image file types:
jpg/jpeg
orpng
. - Any image/text input order is accepted (e.g. text prompt can precede image prompt)
- Maximum image size:
- Embedding models
- We do not offer embedding models by default.
- To request access, please email support@x.ai with details about your intended use case.
Model Aliases
Some models have aliases to help user automatically migrate to the next version of the same model. In general:
<modelname>
is aliased to the latest stable version.<modelname> - latest
is aliased to the latest version. This is suitable for users who want to access the latest features.<modelname> - <date>
refers directly to a specific model release. This will not be updated and is for workflows that demand consistency.
For most users, the aliased <modelname>
or <modelname> - latest
are recommended, as you would receive the latest features automatically.
Billing and Availability
Your model access might vary depending on various factors such as geographical location, account limitations, etc.
For how the bills are charged or managing a team's API key permissions, visit Billing and Teams Management for more information.
For the most up-to-date information on your team's model availability, visit Models Page on xAI Console.
Model Input and Output
Each model can have one or multiple input and output capabilities. The input capabilities refer to which type(s) of prompt can the model accept in the request message body. The output capabilities refer to which type(s) of completion will the model generate in the response message body.
This is a prompt example for models with text
input capability:
json
[
{
"role": "system",
"content": "You are Grok, a chatbot inspired by the Hitchhikers Guide to the Galaxy."
},
{
"role": "user",
"content": "What is the meaning of life, the universe, and everything?"
}
]
This is a prompt example for models with text
and image
input capabilities:
json
[
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,<base64_image_string>",
"detail": "high"
},
},
{
"type": "text",
"text": "Describe what's in this image."
}
]
}
]
Context Window
The context window determines the maximum amount of token accepted by the model in the prompt.
For more information on how token is counted, visit Consumption and Rate Limits.
If you are sending the entire conversation history in the prompt for use cases like chat assistant, the sum of all the prompts in your conversation history must be no greater than the context window.